Open tpank opened 1 year ago
This might be a duplicate of https://github.com/mikedh/trimesh/issues/1789
Yeah definitely a wart at best. My only put is that it seems like it is probably pretty expensive and potentially unreliable to do a mesh_a.contains(mesh_b)
query? The points-contains function isn't as reliable as I might hope for since it relies on ray checks and surface normals. Maybe the python-fcl
or manifold3d
have a nice way of helping with this?
PR's super welcome!
Hi,
when processing meshes with hollow spaces,
Trimesh.process(validate=True)
behaves unexpectedly (at least to me):It flips all surface normals pointing outwards. If a mesh contains hollow spaces (so basically submeshes with normals that correctly point inwards), this invalidates the mesh.
If this behaviour is intended, this could be documented in the docstring. Then an additional, separate flag for
Trimesh.process
to trigger the vertex merging and duplicate triangle removal without flipping the normals would be great. If this behaviour is not intended, I would propose to adapt thetrimesh.repair.fix_inversion
function to check for inner meshes.Here is a little example code of the problem: