-
It seems like very thin pieces of my mesh are being dropped by Manifold. Is there a way to control the precision so this doesn't happen (ideally in the Python bindings)? I can provide an example if that would be helpful. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Yes, an example would be helpful. Is it related to #560? In general this is a feature of manifold (removing thin cruft from inexact operations). Since our library operates on volumes, thin surfaces don't have much meaning. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the response! I'm not sure if it's related to the issue, but here's an example. I'm using Trimesh here but all the intersection operation does in this case is call directly out to Manifold. I want to construct regions representing visible regions for objects. As part of the testing I was generating very thin regions, and I noticed that part of the regions were being dropped. Here's what I am getting, with the origin not contained in the mesh, versus what I should be getting, with the origin contained in the mesh. Here's the code and meshes to replicate this:
The key thing here for me is that there are points in |
Beta Was this translation helpful? Give feedback.
OK, I have a look at this, this is due to how precision is handled. The view section you have has a large x coordinate, which makes the precision large (0.11459, basically 1e-6*max abs coordinate), so anything smaller than this will be removed by manifold.
There are two solutions for this. The first one would be to increase the precision, i.e. with #542. The other method which works now is to crop the view section to the bounding box of the sphere, and manually override the precision by reimporting the mesh (because cropping is intersection, and this will not improve precision in general).
Example code that works with the second method:
// somehow I cannot get obj import to work Manif…