Closed FuzhangHe closed 1 year ago
If the issue is mostly due to float accuracy, I would suggest snapping together points with a very small distance bound and then using PMP::stitch_borders().
Hole filling can only fill a hole made of a single border, not bridge a gap between different connected components.
Thanks for the answer. I implied the function _PMP::stitchborders(mesh), but the mesh is still not closed.
Did you perform any snapping beforehand?
I'm not certain if any snapping procedure has been implemented beforehand.
Perhaps a bit more background information would be helpful. The resultant polygon soup is derived from a plan-based boolean operation, not from the CGAL corefinement boolean operation, but rather from a different algorithm. This particular algorithm conducts the boolean operation by breaking down the mesh into a polygon soup and employing homogeneous integer coordinates. The outcome of this boolean operation is a polygon soup set with float accuracy. In physical terms, this polygon soup should form a closed volume.
What I am trying to do, is to connect the polygon soup and calculate the bounded volume.
The point is that the vertices may have drifted slightly apart due to floating point error.
To fix this you can have nearby vertices agree on a precise location.
If you can do this correctly, then the polygon soup should become coherent.
Hallo @MaelRL
The function alpha_warp_3 works, but it takes about 4 seconds to get the desired accuracy.
Also I found the snap_vertices.h, can I use it to snap the vertices? Does the "snap_all_vertices" help, can you please explain how I can use it? Especially how can I define the ToleranceMap, can I just give a value like 0.001?
Issue Details
I'm having an issue with a vector of triangles represented as a polygon soup. This polygon soup is saved in a float accuracy format and I am attempting to calculate its bounded volume. However, the polygon soup does not close as expected, and this seems to be primarily caused by the low accuracy of the points.
The triangles are saved as an .off file.resultIntersect.off
Steps to reproduce:
Despite following the mentioned steps, the resulting surface mesh is not closed.
Source Code
The example hole_filling_example_SM
Environment