cgal icon indicating copy to clipboard operation
cgal copied to clipboard

Isotropic_remeshing: Collapse Short Edges

Open HoBool opened this issue 3 years ago • 5 comments

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

  • Operating system (Windows/Mac/Linux, 32/64 bits): Windows
  • Compiler: Visual Studio 2022
  • Release or debug mode:
  • Specific flags used (if any):
  • CGAL version: 5.4
  • Boost version:
  • Other libraries versions if used (Eigen, TBB, etc.):

HoBool avatar Sep 16 '22 12:09 HoBool

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

janetournois avatar Sep 16 '22 12:09 janetournois

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

HoBool avatar Sep 18 '22 10:09 HoBool

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), 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...

HoBool avatar Sep 19 '22 13:09 HoBool

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

janetournois avatar Sep 19 '22 13:09 janetournois

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 ?

HoBool avatar Sep 19 '22 13:09 HoBool