用于表示 3D 多面体的库
是否有提供 3D 多面体并支持计算两个多面体交集的库?
如果有什么不同的话,我想要建模的多面体中没有“孔”。
重点首先是正确性,其次才是速度!
理想情况下,这个库应该:
- 现有的整洁的 python 绑定
- 是独立的,或者具有合理且小的依赖关系
- 支持从任何给定角度查看时计算多面体的轮廓
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
CGAL 提供的远远超出您的要求,但特别包括多面体和类似“布尔”的操作在它们上(不过,我不确定“从任何角度查看”是否是一个原语——我记得我上次使用它时它不在那里,但那是不久前的事了——你可能必须迭代投影适当平面上的树篱)。
Python 绑定位于此处,我相信唯一的“大”依赖项是 Boost Python(用于绑定)。
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).