CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.96k stars 1.38k forks source link

Isotropic_remeshing: Collapse Short Edges #6851

Open HoBool opened 2 years ago

HoBool commented 2 years ago

Issue Details

As this picture shown, the inside surface of this hole is meshed badly; So I want to remesh it, but only the inside surface. The outside surface is simple, but enough, so i wan't change it. Are there any functions that can collapse these short mesh edges ? (Some thing like "collapse_short_edges" in Pymesh: https://pymesh.readthedocs.io/en/latest/mesh_processing.html)

Remesh

Source Code

My source Code is the same as the example: Polygon_mesh_processing/isotropic_remeshing_example.cpp

Only the input file is different, see the zip-file in Attachment. Core_NewWS7.zip (off file type is not supported, so i compressed it in zip.)

Environment

janetournois commented 2 years ago

CGAL::Polygon_mesh_processing::isotropic_remeshing comes with a large set of options to activate/deactivate the different remeshing steps. You can use parameters::do_split(false).do_collapse(true).do_flip(false).number_of_relaxation_steps(0).do_project(false) to have only the collapse step

HoBool commented 2 years ago

Thank You, Jane, It works; (I know it, that CGAL can do this !!!)

HoBool commented 2 years ago

Hallo, @janetournois

After many times of trying the different remesh steps, i still can't get a perfect remeshed geometry. For the simple mesh, it works ok. (But there are still short edges)

For complicate case (like this [Mesh_Datei](https://gist.github.com/FuzhangHePTW/c118e6b83eee9aac312417a96ec3bd9e)), the remeshing with `parameters::do_split(false).do_collapse(true).do_flip(false).number_of_relaxation_steps(0).do_project(false) ` almost doesnot work. (target_edge_length = 1; nb_iter = 3) Is there some way to solve this ? Ps. I know the roughly diameter of the insider surface, which needed to be remeshed. For example, is there some way to pick up this surface...
janetournois commented 2 years ago

It is possible to remesh only a set of faces of the input surface, if you know how to select them

HoBool commented 2 years ago

that is exact the problem. Is it the way like this example: corefinement_difference_remeshed ? I try about one hour to understand it, but failed... Can you tell me, in which direction should i look for ?