From ba36b7cd410600752295c9bb00b885437a86b7be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 7 Jun 2019 10:52:31 +0200 Subject: [PATCH] Update Smoothing Polyhedron GUI and clean some sneaky use_explicit --- .../NamedParameters.txt | 7 -- .../Plugins/PMP/Smoothing_plugin.cpp | 3 +- .../Plugins/PMP/Smoothing_plugin.ui | 72 ++++++++++++------- 3 files changed, 46 insertions(+), 36 deletions(-) diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/NamedParameters.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/NamedParameters.txt index 9b8341f867b..2a66e57f543 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/NamedParameters.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/NamedParameters.txt @@ -359,13 +359,6 @@ Parameter used in `clip()` functions to clip a volume rather than a surface. Default: `false` \cgalNPEnd -\cgalNPBegin{use_explicit_scheme} \anchor PMP_use_explicit_scheme -A flag to indicate whether a normalized explicit scheme for smoothing along the curvature flow is used instead of solving a linear system. -\n -\b Type : `bool` \n -\b Default is `false` -\cgalNPEnd - \cgalNPBegin{use_compact_clipper} \anchor PMP_use_compact_clipper Parameter used in `clip()` functions to indicate whether the boundary of the clipper should be considered as part of the clipping volume or not. diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Smoothing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Smoothing_plugin.cpp index 4aa9d480803..431705fe6cd 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Smoothing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Smoothing_plugin.cpp @@ -158,7 +158,7 @@ public Q_SLOTS: const unsigned int nb_iter = ui_widget.smooth_iter_spinBox->value(); const bool projection = ui_widget.projection_checkBox->isChecked(); - const bool ignore_safety_measures = true; //ui_widget.use_safety_measures_checkBox->isChecked(); @fixme + const bool ignore_safety_measures = ui_widget.sanity_checkBox->isChecked(); const bool constrain_border_vertices = ui_widget.border_button->isChecked() && !CGAL::is_closed(pmesh); const bool use_angle_smoothing = ui_widget.angle_smoothing_checkBox->isChecked(); const bool use_area_smoothing = ui_widget.area_smoothing_checkBox->isChecked(); @@ -278,7 +278,6 @@ public Q_SLOTS: const unsigned int nb_iter = ui_widget.smooth_iter_spinBox->value(); const bool constrain_border_vertices = ui_widget.border_button->isChecked() && !CGAL::is_closed(pmesh); - const bool use_explicit = ui_widget.explicit_checkBox->isChecked(); QApplication::setOverrideCursor(Qt::WaitCursor); diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Smoothing_plugin.ui b/Polyhedron/demo/Polyhedron/Plugins/PMP/Smoothing_plugin.ui index e55835e2c06..8214060d7ea 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Smoothing_plugin.ui +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Smoothing_plugin.ui @@ -17,6 +17,9 @@ + + 1 + 1000 @@ -33,12 +36,8 @@ 6 - - - - - - Use Explicit Scheme + + 0.000001000000000 @@ -51,6 +50,9 @@ + + The time step should not be too large or the smoothing will be unsatisfactory + Time Step: @@ -61,18 +63,14 @@ + + If you are using a selection item, this will combine your selected vertices and the border vertices + Constrain Border Vertices - - - - Re-project Vertices - - - @@ -99,7 +97,30 @@ Mesh Smoothing - + + + + true + + + Smooth Mesh + + + false + + + + + + + By default, a serie of checks are performed when a displacement is computed (e.g. is the minimul angle around the vertex not reduced?). However, sometimes local bad moves are necessary to achieve a better result overall. + + + Do not apply worsening moves + + + + Qt::Vertical @@ -119,19 +140,6 @@ - - - - true - - - Smooth Mesh - - - false - - - @@ -139,6 +147,16 @@ + + + + Reprojection on the initial surface will not happen if there are self-intersections in the mesh, except if worsening moves are allowed (the option just above). + + + Re-project Vertices + + +