From aa6a1907bae61a8615f0d6545233deccbb104e27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 19 Jun 2019 11:28:53 +0200 Subject: [PATCH] Add some verbose if the solver fails --- .../fig/{mesh_smothing.png => mesh_smoothing.png} | Bin .../CGAL/Polygon_mesh_processing/smooth_shape.h | 7 +++++++ 2 files changed, 7 insertions(+) rename Polygon_mesh_processing/doc/Polygon_mesh_processing/fig/{mesh_smothing.png => mesh_smoothing.png} (100%) diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/fig/mesh_smothing.png b/Polygon_mesh_processing/doc/Polygon_mesh_processing/fig/mesh_smoothing.png similarity index 100% rename from Polygon_mesh_processing/doc/Polygon_mesh_processing/fig/mesh_smothing.png rename to Polygon_mesh_processing/doc/Polygon_mesh_processing/fig/mesh_smoothing.png diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/smooth_shape.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/smooth_shape.h index 2ce20b09db8..f80f55350ba 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/smooth_shape.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/smooth_shape.h @@ -160,9 +160,16 @@ void smooth_shape(const FaceRange& faces, smoother.setup_system(A, bx, by, bz, stiffness, time); if(smoother.solve_system(A, Xx, Xy, Xz, bx, by, bz, solver)) + { smoother.update_mesh(Xx, Xy, Xz); + } else + { +#ifdef CGAL_PMP_SMOOTHING_VERBOSE + std::cerr << "Failed to solve system!" << std::endl; +#endif break; + } #ifdef CGAL_PMP_SMOOTHING_OUTPUT_INTERMEDIARY_STEPS std::stringstream oss;