CGAL/cgal

Curvature Adaptive Remeshing

ipadjen opened this issue · 0 comments

Ivan Pađen's final submission for GSoC 2023.

Project description

Surface remeshing improves mesh quality, optimizes data storage, and enhances visualization. This is beneficial for applications such as numerical simulations and animation. The goal of this project was to implement the curvature-adaptive surface remeshing by Dunyach et al. (2013) into the CGAL's isotropic remeshing framework. The method operates iteratively and performs the following steps:

  • Edge collapsing and splitting based on targeted resolution,
  • Edge flipping to improve valence (target is 6 in the interior and 4 on boundary),
  • Tangential smoothing to optimize vertex distribution, and
  • Vertex reprojection onto the original surface to preserve exactness.

The main contributions of this project were made in edge collapsing and splitting, and the tangential smoothing. The new edge splitting and collapsing rules depend on the the local target edge length which is calculated from the vertex sizing field. The sizing field is derived from the discrete curvature implemented in a previous GSoC's contribution. This means that regions with a larger absolute curvature will result in smaller triangles and vice-versa.

The new tangential smoothing was implemented to account for varying edge lengths. Weights of the tangential smoothing are proportional to the triangle area divided by the sizing field at triangle's barycenter.

The implementation is independent of a data structure and it works on whole meshes, as well as selected surfaces. It also works with feature preservation and constraints. Finally, the functionality was incorporated in GUI through the polygon mesh processing plugin of the CGAL's Polyhedron demo.

Links

Result examples

List of commits:

5c9d691 Fix Adaptive_sizing_field template issue
3f53375 Fix for a failing MVSC test
7d74f2c Add STL 'limits' include to address the failing test
3af80ef Update removed arguments
bc9f724 Cleanup the example
e7d97cd Remove temp todos
905dc8d Move Sizing_field_base one directory down
b2263f0 Add constructor with VPMap input in Adaptive_sizing_field
9102274 Update polyhedron demo with ball_radius np in Adaptive_sizing_field
78b066e Introduce ball_radius NP for curvature calculation in Adaptive_sizing_field
6ee0394 Update documentation
eaaa45e Move Sizing_field_base.h out of internal
7404714 Add adaptive sizing information to the user manual
7f3e02b Documentation update
ec3e7a2 Use any argument convertible to double for overloads
b0ff465 Update Concepts/PMPSizingField docs
1dfd137 UpdateSizing_field_base docs
a1a3ca7 Merge branch 'master' into PMP-add_sizing_in_isotropic_remeshing-GF
e34d186 Document Sizing_field_base
7444401 boost::optional to std::optional C++ 17 update
788be29 Changes for documentation
852bcac Remove precondition for vpmap
f365d43 Fix vpmap return error
856d70d Place Sizing_field_base under PMP namespace as Uniform and Adaptive classes
acc4e00 Add precondition that sizing field and remeshing vpmap must be the same
6230227 Update documentation
42eb3de Rename Sizing_field to Sizing_field_base
4243680 Try to fix failing test
0ab31d0 Add template argument to constructor
e17ea37 Fix templating error in isotropic remeshing overload
d5b6c9c First attempt at sizing field docs
5f9c8f3 Add PMPSizingField concept to docs
ee9fb3f Remove todos
f18bf38 Target length fix
66556c9 Replace pmesh with vertex property maps in sizing field classes
69fbe8b Handle the special case when target_edge_length is 0
66b48d4 Add precondition 'remeshing mesh == sizing field mesh'
5370a43 Documentation update in remesh.h
87a312d Reintroduce constraints_are_short_enough for adaptive remeshing
ae6d3e7 Add split_long_edges functionality using adaptive sizing field as an input
f6a8b2d Move sizing classes to 'public' headers
b1fa9d5 Remove extra code in tangential smoothing
307e9c8 Add remeshing quality test
bc5e974 Remove the adaptive sizing field dependency in remesh.h
1f0bfdb Remove extra
1967041 Change example input to be analogous to uniform sizing
8ad2ba7 Fix polyhedron demo with TBB
0a4360c Move sizing map calculation to constructor
3ad5df3 Move curvature map typedef to function
b40debf Choose betwen curvature calc for selection and whole mesh
c3c28e7 Change face subset back to working example with vector
9a45f8d Change selection option to set
f257115 (WIP) figuring out FaceRange curvature calculation
205d4ea Fix sizing field calculation
9d708d7 Use C++17 CTAD in example
5f89a6d Add adaptive remeshing to Polyhedorn demo, PMP plugin
8057d79 Add UI support for adaptive remeshing in Polyhedron demo (WIP)
c7e0256 Add constexpr to differentiate uniform and adaptive fields
37f71c3 Make tangential relaxation work with both uniform and adaptive sizing field
9497735 Fix merge
ae55b4f Merge remote-tracking branch 'cgal-public-dev/gsoc2023-adaptive_remesh-ipadjen' into PMP-add_sizing_in_isotropic_remeshing-GF
af92c4a Add first code for tangential relaxation with sizing (WIP)
18aaa7b Prep sizing for tangential relaxation (WIP)
d064ca2 Replace std with cgal where applicable, fix assertion
584de69 Make a (temp) property map for curvature calculation
bf62d9c Fix default remeshing overload
efaf372 Refactor sizing map update
d4f27c3 Add sizing field calculation from curvature
285f54c Merge PR #6760 into gsoc2023-adaptive_remesh-ipadjen
437cf48 Create a vertex property map that will contain sizing info (WIP) Also, update target length checks
e4fcde0 Add initial preparations for adaptive sizing field Add Adaptive_sizing_field header with edge min and max limits, and tolerance Adjust the example