Open citystrawman opened 1 month ago
Indeed, PMP::isotropic_remeshing()
can only remesh surface patches with manifold geometry, which belong to a MutableFaceGraph
(as mentioned in its doc). If your input mesh has non-manifold geometry, you can remesh your surface patch-per-patch.
However, from your log, it seems that your input mesh is not a valid polygon mesh at all, not only to be remeshed by isotropic_remeshing()
. Non-manifold geometry is allowed, but not non-manifold connectivity. If it is the issue, you can use PMP::polygon_soup_to_polygon_mesh() which may duplicate non-manifold vertices or edges to have a manifold connectivity.
Indeed,
PMP::isotropic_remeshing()
can only remesh surface patches with manifold geometry, which belong to aMutableFaceGraph
(as mentioned in its doc). If your input mesh has non-manifold geometry, you can remesh your surface patch-per-patch.However, from your log, it seems that your input mesh is not a valid polygon mesh at all, not only to be remeshed by
isotropic_remeshing()
. Non-manifold geometry is allowed, but not non-manifold connectivity. If it is the issue, you can use PMP::polygon_soup_to_polygon_mesh() which may duplicate non-manifold vertices or edges to have a manifold connectivity.
May I know what is the difference between Non-manifold geometry
and non-manifold connectivity
?
Sure Think of a vertex with two umbrellas sharing this vertex as a tip point (like a sand hourglass). Both the geometry and connectivity are non-manifold. Now if you duplicate this vertex to separate the 2 umbrellas, the geometry is still non-manifold (unless you change the coordinates of one of the duplicates), but now the connectivity is manifold, as 2 manifold surfaces.
PMP::isotropic_remeshing()
can handle the double-with-2-tips-umbrella, not the double-with-1-tip-umbrella.
However, the tip vertices can be constrained to make sure they remain exactly on both sides.
Sure Think of a vertex with two umbrellas sharing this vertex as a tip point (like a sand hourglass). Both the geometry and connectivity are non-manifold. Now if you duplicate this vertex to separate the 2 umbrellas, the geometry is still non-manifold (unless you change the coordinates of one of the duplicates), but now the connectivity is manifold, as 2 manifold surfaces.
PMP::isotropic_remeshing()
can handle the double-with-2-tips-umbrella, not the double-with-1-tip-umbrella. However, the tip vertices can be constrained to make sure they remain exactly on both sides.
as you said, the tip vertices can be constrained to make sure they remain exactly on both sides
, is this achieved by setting vertex_is_constrained_map
in PMP::isotropic_remeshing()
?
exactly
exactly
Then here comes my latest issue #8388 : in this issue actually what I did was trying to use vertex_is_constrained_map
on some of the tip vertices (I only need some of the vertices because some of the tip vertices are too close and if keep all these vertices the remeshed triangle should be ill shaped), and you can see that vertex_is_constrained_map
caused an unwanted effect: the constrained vertices are not at its original position. Is my idea correct or wrong? if it is wrong, then do you have any idea? Thank you!
Please use the following template to help us solving your issue.
Issue Details
I am imitating Polygon_mesh_processing/corefinement_difference_remeshed.cpp to remesh a non-manifold mesh (its background is here)
In general, what I have done is:
However after isotropic remesh, the off file has some problem. When I open the off file, it pops out warnings:
after clicking OK, the mesh looks weird(I dont know if it is original mesh or it is corrected by meshlab):
![image](https://github.com/user-attachments/assets/ce70aa9b-c1fe-42cd-9b7f-1da764b399f0)
and the console output is as follows:
I am not sure what is the reason for this problem: is it because I do not code it correctly, or is it because
isotropic_remeshing
only supports manifold geometry?Source Code
Environment