From 416dcaa6a181899c68e152664f58fbff1dcf4c62 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Fri, 30 Sep 2016 09:15:06 +0200 Subject: [PATCH] Bugfix: Poisson requires *oriented* normals --- .../Plugins/Point_set/Surface_reconstruction_plugin.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.cpp index 0479c0d5fd0..1271ca985b7 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.cpp @@ -402,6 +402,13 @@ namespace SurfaceReconstruction CGAL::jet_estimate_normals(points.begin_or_selection_begin(), points.end(), CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()), 2 * neighbors); + + points.set_first_selected + (CGAL::mst_orient_normals(points.begin_or_selection_begin(), points.end(), + CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()), + 2 * neighbors)); + points.delete_selection(); // remove unoriented points + } }