-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Please note that booleanRes = mm.boolean(
pyvista_to_meshlib(x),
pyvista_to_meshlib(c),
mm.BooleanOperation.Union,
)
if not booleanRes.valid():
print(booleanRes.errorString)
union = booleanRes.mesh Hopefully, the error message will be clear. If not, please attach your input meshes for us. |
Beta Was this translation helpful? Give feedback.
-
Hello @vargonis! It turned out that To find it out I saved the mesh in MehsLib internal format like this; mm.saveMesh(pyvista_to_meshlib(x),"a.mrmesh") I tried to have a look at normals with So, in this case you need to fix faces orientation before converting to meshlib like this: x = boundary.extrude([0, 0, 1], capping=True).triangulate().compute_normals(consistent_normals=True)
After this fix boolean works OK. |
Beta Was this translation helpful? Give feedback.
Hello @vargonis!
It turned out that
pyvista
does not create consistent faces' indices order by default, and really mesh looks like this:(you can see that faces at top are inverted (actually, they are OK but all others are inverted according to
ply
files that you've provided))To find it out I saved the mesh in MehsLib internal format like this;
I tried to have a look at normals with
pyvista
(withplot_normals
) and it seemed OK, but actually it was not,pyvista
fixes normals automatically for visualization(all normals are looking inward on the image)
So, in this case you need to fix faces orientation before converting to meshlib like this:
x