You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to compute the volume of the union and intersection of two polyhedra that can be concave or convex? I earlier considered using operations on the mesh defined from vertices and faces. However, it gives erroneous volumes (there might be an issue with face orientation; I am unsure what the issue is). My system contains both concave and convex polyhedra, so is there any simple tool in Vedo that would describe whether the faces are facing outward or not? I can write my code for convex polyhedra to check - but I don't know how to implement it for concave polyhedra.
So I am thinking of doing the intersection and union of two polyhedra using operations on volume.
vol1 = Mesh([vertices1,faces1]).binarize()
vol2 = Mesh([vertices2,faces2]).binarize()
vol_intersection = vol1.operation('and',vol2)
I am unsure to proceed further for vedo.volume.Volume object.
Could you guide me on how to find volume of vol_intersection? Thanks!
The text was updated successfully, but these errors were encountered:
Hi the convention is that the outward face is the one that has the order of vertices anticlockwise. See: examples/basic/buildmesh.py
with such convention the volume calculation should work!
You can also try to subdivide the mesh faces for better precision with eg: mesh.sbudivide(3, method=1) https://vedo.embl.es/autodocs/content/vedo/vedo/mesh.html#Mesh.subdivide
Hi Marco,
Is there a way to compute the volume of the union and intersection of two polyhedra that can be concave or convex? I earlier considered using operations on the mesh defined from vertices and faces. However, it gives erroneous volumes (there might be an issue with face orientation; I am unsure what the issue is). My system contains both concave and convex polyhedra, so is there any simple tool in Vedo that would describe whether the faces are facing outward or not? I can write my code for convex polyhedra to check - but I don't know how to implement it for concave polyhedra.
So I am thinking of doing the intersection and union of two polyhedra using operations on volume.
vol1 = Mesh([vertices1,faces1]).binarize()
vol2 = Mesh([vertices2,faces2]).binarize()
vol_intersection = vol1.operation('and',vol2)
I am unsure to proceed further for vedo.volume.Volume object.
Could you guide me on how to find volume of vol_intersection? Thanks!
The text was updated successfully, but these errors were encountered: