Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
380 views
in Technique[技术] by (71.8m points)

python - library for representing 3D polyhedra

Are there any libraries that provide 3D polyhedra, and support calculating the intersection of two polyhedra?

If it makes a difference, the polyhedra I want to model do not have 'holes' in them.

The focus would be on correctness first and speed a close second!

Ideally this library would:

  • have existing tidy python bindings
  • be free-standing or have reasonable and small dependencies
  • support calculating the outline of the polyhedron when view from any given angle
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

CGAL offers rather more than you're asking for, but does in particular include polyhedra and "boolean"-like operations on them (I'm not sure about "view from any angle" as a primitive, though -- as I recall it wasn't there when I last used it, but that was a while ago -- you may have to iterate projecting the hedges on the appropriate plane).

The Python bindings are here and I believe the only "big" dependency is Boost Python (used for the bindings).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...