Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions BGL/include/CGAL/boost/graph/parameters_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,45 @@ CGAL_add_named_parameter(symmetry_direction_t, symmetry_direction, symmetry_dire
CGAL_add_named_parameter(preserve_order_t, preserve_order, preserve_order)
CGAL_add_named_parameter(adjust_directions_t, adjust_directions, adjust_directions)
CGAL_add_named_parameter(segment_t, segment_map, segment_map)

// parameters added for minimal angle remeshing
CGAL_add_named_parameter(max_error_threshold_t, max_error_threshold, max_error_threshold)
CGAL_add_named_parameter(min_angle_threshold_t, min_angle_threshold, min_angle_threshold)
CGAL_add_named_parameter(max_mesh_complexity_t, max_mesh_complexity, max_mesh_complexity)
CGAL_add_named_parameter(smooth_angle_delta_t, smooth_angle_delta, smooth_angle_delta)
CGAL_add_named_parameter(apply_edge_flip_t, apply_edge_flip, apply_edge_flip)
CGAL_add_named_parameter(edge_flip_strategy_t, edge_flip_strategy, edge_flip_strategy)
CGAL_add_named_parameter(flip_after_split_and_collapse_t, flip_after_split_and_collapse, flip_after_split_and_collapse)
CGAL_add_named_parameter(relocate_after_local_operations_t, relocate_after_local_operations, relocate_after_local_operations)
CGAL_add_named_parameter(relocate_strategy_t, relocate_strategy, relocate_strategy)
CGAL_add_named_parameter(keep_vertex_in_one_ring_t, keep_vertex_in_one_ring, keep_vertex_in_one_ring)
CGAL_add_named_parameter(use_local_aabb_tree_t, use_local_aabb_tree, use_local_aabb_tree)
CGAL_add_named_parameter(collapsed_list_size_t, collapsed_list_size, collapsed_list_size)
CGAL_add_named_parameter(decrease_max_errors_t, decrease_max_errors, decrease_max_errors)
CGAL_add_named_parameter(verbose_progress_t, verbose_progress, verbose_progress)
CGAL_add_named_parameter(apply_initial_mesh_simplification_t, apply_initial_mesh_simplification, apply_initial_mesh_simplification)
CGAL_add_named_parameter(apply_final_vertex_relocation_t, apply_final_vertex_relocation, apply_final_vertex_relocation)
CGAL_add_named_parameter(samples_per_face_in_t, samples_per_face_in, samples_per_face_in)
CGAL_add_named_parameter(samples_per_face_out_t, samples_per_face_out, samples_per_face_out)
CGAL_add_named_parameter(max_samples_per_area_t, max_samples_per_area, max_samples_per_area)
CGAL_add_named_parameter(min_samples_per_triangle_t, min_samples_per_triangle, min_samples_per_triangle)
CGAL_add_named_parameter(bvd_iteration_count_t, bvd_iteration_count, bvd_iteration_count)
CGAL_add_named_parameter(sample_number_strategy_t, sample_number_strategy, sample_number_strategy)
CGAL_add_named_parameter(sample_strategy_t, sample_strategy, sample_strategy)
CGAL_add_named_parameter(use_stratified_sampling_t, use_stratified_sampling, use_stratified_sampling)
CGAL_add_named_parameter(sum_theta_t, sum_theta, sum_theta)
CGAL_add_named_parameter(sum_delta_t, sum_delta, sum_delta)
CGAL_add_named_parameter(dihedral_theta_t, dihedral_theta, dihedral_theta)
CGAL_add_named_parameter(dihedral_delta_t, dihedral_delta, dihedral_delta)
CGAL_add_named_parameter(feature_difference_delta_t, feature_difference_delta, feature_difference_delta)
CGAL_add_named_parameter(feature_control_delta_t, feature_control_delta, feature_control_delta)
CGAL_add_named_parameter(inherit_element_types_t, inherit_element_types, inherit_element_types)
CGAL_add_named_parameter(use_feature_intensity_weights_t, use_feature_intensity_weights, use_feature_intensity_weights)
CGAL_add_named_parameter(vertex_optimize_count_t, vertex_optimize_count, vertex_optimize_count)
CGAL_add_named_parameter(vertex_optimize_ratio_t, vertex_optimize_ratio, vertex_optimize_ratio)
CGAL_add_named_parameter(stencil_ring_size_t, stencil_ring_size, stencil_ring_size)
CGAL_add_named_parameter(optimize_strategy_t, optimize_strategy, optimize_strategy)
CGAL_add_named_parameter(face_optimize_type_t, face_optimize_type, face_optimize_type)
CGAL_add_named_parameter(edge_optimize_type_t, edge_optimize_type, edge_optimize_type)
CGAL_add_named_parameter(vertex_optimize_type_t, vertex_optimize_type, vertex_optimize_type)
CGAL_add_named_parameter(optimize_after_local_operations_t, optimize_after_local_operations, optimize_after_local_operations)
11 changes: 11 additions & 0 deletions Documentation/doc/biblio/geom.bib
Original file line number Diff line number Diff line change
Expand Up @@ -152061,3 +152061,14 @@ @inproceedings{tang2009interactive
year={2009},
organization={ACM}
}

@article{hu2016error,
title={Error-bounded and feature preserving surface remeshing with minimal angle improvement},
author={Hu, Kaimo and Yan, Dong-Ming and Bommes, David and Alliez, Pierre and Benes, Bedrich},
journal={IEEE transactions on visualization and computer graphics},
volume={23},
number={12},
pages={2560--2573},
year={2016},
publisher={IEEE}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Copyright (c) 2016 GeometryFactory SARL (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
// Author(s) : Andreas Fabri
//
// Warning: this file is generated, see include/CGAL/licence/README.md

#ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_MINIMAL_ANGLE_REMESHING_H
#define CGAL_LICENSE_POLYGON_MESH_PROCESSING_MINIMAL_ANGLE_REMESHING_H

#include <CGAL/config.h>
#include <CGAL/license.h>

#ifdef CGAL_POLYGON_MESH_PROCESSING_MINIMAL_ANGLE_REMESHING_COMMERCIAL_LICENSE

# if CGAL_POLYGON_MESH_PROCESSING_MINIMAL_ANGLE_REMESHING_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE

# if defined(CGAL_LICENSE_WARNING)

CGAL_pragma_warning("Your commercial license for CGAL does not cover "
"this release of the Polygon Mesh Processing - Minimal Angle Remeshing package.")
# endif

# ifdef CGAL_LICENSE_ERROR
# error "Your commercial license for CGAL does not cover this release \
of the Polygon Mesh Processing - Minimal Angle Remeshing package. \
You get this error, as you defined CGAL_LICENSE_ERROR."
# endif // CGAL_LICENSE_ERROR

# endif // CGAL_POLYGON_MESH_PROCESSING_MINIMAL_ANGLE_REMESHING_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE

#else // no CGAL_POLYGON_MESH_PROCESSING_MINIMAL_ANGLE_REMESHING_COMMERCIAL_LICENSE

# if defined(CGAL_LICENSE_WARNING)
CGAL_pragma_warning("\nThe macro CGAL_POLYGON_MESH_PROCESSING_MINIMAL_ANGLE_REMESHING_COMMERCIAL_LICENSE is not defined."
"\nYou use the CGAL Polygon Mesh Processing - Minimal Angle Remeshing package under "
"the terms of the GPLv3+.")
# endif // CGAL_LICENSE_WARNING

# ifdef CGAL_LICENSE_ERROR
# error "The macro CGAL_POLYGON_MESH_PROCESSING_MINIMAL_ANGLE_REMESHING_COMMERCIAL_LICENSE is not defined.\
You use the CGAL Polygon Mesh Processing - Minimal Angle Remeshing package under the terms of \
the GPLv3+. You get this error, as you defined CGAL_LICENSE_ERROR."
# endif // CGAL_LICENSE_ERROR

#endif // no CGAL_POLYGON_MESH_PROCESSING_MINIMAL_ANGLE_REMESHING_COMMERCIAL_LICENSE

#endif // CGAL_LICENSE_POLYGON_MESH_PROCESSING_MINIMAL_ANGLE_REMESHING_H
1 change: 1 addition & 0 deletions Installation/include/CGAL/license/gpl_package_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Polygon_mesh_processing/core Polygon Mesh Processing - Core
Polygon_mesh_processing/distance Polygon Mesh Processing - Distance
Polygon_mesh_processing/measure Polygon Mesh Processing - Geometric Measure
Polygon_mesh_processing/meshing_hole_filling Polygon Mesh Processing - Meshing and Hole Filling
Polygon_mesh_processing/minimal_angle_remeshing Polygon Mesh Processing - Minimal Angle Remeshing
Polygon_mesh_processing/orientation Polygon Mesh Processing - Orientation
Polygon_mesh_processing/predicate Polygon Mesh Processing - Predicate
Polygon_mesh_processing/repair Polygon Mesh Processing - Repair
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ The page \ref bgl_namedparameters "Named Parameters" describes their usage.
- `CGAL::Polygon_mesh_processing::triangulate_faces()`
- \link PMP_meshing_grp `CGAL::Polygon_mesh_processing::isotropic_remeshing()` \endlink
- \link PMP_meshing_grp `CGAL::Polygon_mesh_processing::split_long_edges()` \endlink
- `CGAL::Polygon_mesh_processing::minimal_angle_remeshing()`
- `CGAL::Polygon_mesh_processing::random_perturbation()`
- `CGAL::Polygon_mesh_processing::extrude_mesh()`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ maximizes the minimum angle of all the angles of the triangles in the triangulat

\subsubsection Remeshing

- Isotropic Remeshing

The incremental triangle-based isotropic remeshing algorithm introduced by Botsch et al
\cgalCite{botsch2004remeshing}, \cgalCite{botsch2010PMP} is implemented in this package.
This algorithm incrementally performs simple operations such as edge splits, edge collapses,
Expand All @@ -125,12 +127,52 @@ function `CGAL::Polygon_mesh_processing::split_long_edges()` should be called on
constrained edges before remeshing.

\cgalFigureBegin{iso_remeshing, iso_remeshing.png}
Isotropic remeshing. (a) Triangulated input surface mesh.
Isotropic remeshing.
(a) Triangulated input surface mesh.
(b) Surface uniformly and entirely remeshed.
(c) Selection of a range of faces to be remeshed.
(d) Surface mesh with the selection uniformly remeshed.
\cgalFigureEnd

- Minimal Angle Remeshing

The incremental error-bounded and feature preserving surface remeshing algorithm with minimal
angle improvement introduced by Hu et al. \cgalCite{hu2016error} is implemented in this package.
This algorithm iteratively performs carefully prioritized local operations, such as edge split,
edge collapse, edge flips (optional), vertex relocate and Laplacian smoothing, whenever they do
not violate the approximation error bound and improve the mesh otherwise. By greedily searching
for the coarsest mesh with minimal interior angle above the `minimal angle threshold` and the
`maximal error threshold` provided by the user, this approach can explicitly control the
approximation error and implicitly preserve the sharp features, such as creases, boundaries,
darts, cusps, corners and tips.

A triangular mesh can be remeshed using the function
`CGAL::Polygon_mesh_processing::minimal_angle_remeshing()`, as illustrated by
\cgalFigureRef{PMPFigMinimalAngleRemeshing}. A lot of parameters are provided to make the algorithm
more flexible, but only the max_error_threshold, min_angle_threshold and max_mesh_complexity
are essential to control the optimization process. In most cases, users are supposed to perform
the remeshing using the parameters with default values.

\cgalFigureAnchor{PMPFigMinimalAngleRemeshing}
<center>
<img src="minimal_angle_remeshing.png" style="max-width:70%;"/>
</center>
\cgalFigureCaptionBegin{PMPFigMinimalAngleRemeshing}
Minimal angle remeshing. The input surface mesh (a) has 7.2k vertices. From (b) to (e) are the
results with different min_angle_threshold. The angle distributions and their corresponding
approximation error are show below each result, in blue bars and red curves respectively. The
max_error_threshold is set to 0.2\% of the diagonal length of the input surface mesh's bounding
box.
\cgalFigureCaptionEnd

Compared with the isotropic remeshing introduced by Botsch et al. \cgalCite{botsch2004remeshing}, \cgalCite{botsch2010PMP},
the minimal angle remeshing algorithm is slower (see Hu et al. \cgalCite{hu2016error}) since it has to explicitly bound the
`maximal error threshold` before applying each local operator. However, it has the following advantages: 1) the maximal
approximation error with the original mesh can be explicitly bounded; 2) the sharp features can be implicitly preserved,
without having to detect or specify them in advance; 3) the minimal angle of the result, which is input-dependent in isotropic
remeshing, can be explicitly controlled. If users are interested in these advantages while do not care too much about the
running time, applying the minimal angle remeshing algorihtm might be a good choice.

\subsubsection Smoothing

Smoothing of a triangulated mesh region can be achieved with algorithms that aim at either mesh smoothing or shape smoothing.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading