-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mesh.volume() and Mesh.is_closed() don't work with Boxes and Cylinders #1171
Comments
Thanks for reporting. import vedo
box = vedo.Box().triangulate().clean()
print("Box :", box.volume(), box.is_closed(), box.is_manifold())
cylinder = vedo.Cylinder().triangulate().clean()
print("Cylinder:", cylinder.volume(), cylinder.is_closed(), cylinder.is_manifold())
pyramid = vedo.Pyramid() # not necessary, already triangulated
print("Pyramid :", pyramid.volume(), pyramid.is_closed(), pyramid.is_manifold())
sphere = vedo.Sphere()
print("Sphere :", sphere.volume(), sphere.is_closed(), sphere.is_manifold()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Calculating the volume of a Box or a Cylinder seems to always return zero for Box and Cylinder objects, even though they plot just fine and seem overall well-formed. Similarly,
is_closed()
seems to always return False. Pyramids and Spheres work fine. I'm thinking it may be related to the fact that Boxes and Cylinders are wholly composed of non-triangular cells, since callingtriangulate()
causes them to give nonzero volumes (but they still don't register as closed).The text was updated successfully, but these errors were encountered: