From 3257f0020db38d679bcb9255ba61c556cd389fa9 Mon Sep 17 00:00:00 2001 From: Marco Feder Date: Wed, 18 May 2022 10:38:29 +0200 Subject: [PATCH] Fix clockwise_ordering --- source/cgal/surface_mesh.cc | 2 +- tests/cgal/cgal_surface_mesh_01.output | 49 +++++++++++++------------- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/source/cgal/surface_mesh.cc b/source/cgal/surface_mesh.cc index 49aa0839b6..bf535479ee 100644 --- a/source/cgal/surface_mesh.cc +++ b/source/cgal/surface_mesh.cc @@ -55,7 +55,7 @@ namespace Assert(false, ExcInternalError()); break; } - if (clockwise_ordering == false) + if (clockwise_ordering == true) std::reverse(indices.begin(), indices.end()); [[maybe_unused]] const auto new_face = mesh.add_face(indices); diff --git a/tests/cgal/cgal_surface_mesh_01.output b/tests/cgal/cgal_surface_mesh_01.output index b2df3eeeac..6a1b26a53f 100644 --- a/tests/cgal/cgal_surface_mesh_01.output +++ b/tests/cgal/cgal_surface_mesh_01.output @@ -8,7 +8,7 @@ DEAL::OFF 0.00000 0.00000 0.00000 1.00000 0.00000 0.00000 0.00000 1.00000 0.00000 -3 0 1 2 +3 2 1 0 DEAL::deal vertices: 4, cgal vertices 4 DEAL::deal faces: 4, cgal faces 1 @@ -19,7 +19,7 @@ DEAL::OFF 1.00000 0.00000 0.00000 0.00000 1.00000 0.00000 1.00000 1.00000 0.00000 -4 0 1 3 2 +4 2 3 1 0 DEAL::dim= 2, spacedim= 3 DEAL::deal vertices: 3, cgal vertices 3 @@ -30,7 +30,7 @@ DEAL::OFF 0.00000 0.00000 0.00000 1.00000 0.00000 0.00000 0.00000 1.00000 0.00000 -3 0 1 2 +3 2 1 0 DEAL::deal vertices: 4, cgal vertices 4 DEAL::deal faces: 4, cgal faces 1 @@ -41,7 +41,7 @@ DEAL::OFF 1.00000 0.00000 0.00000 0.00000 1.00000 0.00000 1.00000 1.00000 0.00000 -4 0 1 3 2 +4 2 3 1 0 DEAL::dim= 3, spacedim= 3 DEAL::deal vertices: 4, cgal vertices 4 @@ -53,10 +53,10 @@ DEAL::OFF 1.00000 0.00000 0.00000 0.00000 1.00000 0.00000 0.00000 0.00000 1.00000 -3 0 1 2 -3 1 0 3 -3 0 2 3 -3 2 1 3 +3 2 1 0 +3 3 0 1 +3 3 2 0 +3 3 1 2 DEAL::deal vertices: 5, cgal vertices 5 DEAL::deal faces: 5, cgal faces 5 @@ -68,11 +68,11 @@ DEAL::OFF -1.00000 1.00000 0.00000 1.00000 1.00000 0.00000 0.00000 0.00000 1.00000 -4 0 1 3 2 -3 0 2 4 -3 3 1 4 -3 1 0 4 -3 2 3 4 +4 2 3 1 0 +3 4 2 0 +3 4 1 3 +3 4 0 1 +3 4 3 2 DEAL::deal vertices: 6, cgal vertices 6 DEAL::deal faces: 5, cgal faces 5 @@ -85,11 +85,11 @@ DEAL::OFF 0.00000 0.00000 1.00000 1.00000 0.00000 1.00000 0.00000 1.00000 1.00000 -3 1 0 2 -3 3 4 5 -4 0 1 4 3 -4 1 2 5 4 -4 2 0 3 5 +3 2 0 1 +3 5 4 3 +4 3 4 1 0 +4 4 5 2 1 +4 5 3 0 2 DEAL::deal vertices: 8, cgal vertices 8 DEAL::deal faces: 6, cgal faces 6 @@ -104,9 +104,10 @@ DEAL::OFF 1.00000 0.00000 1.00000 0.00000 1.00000 1.00000 1.00000 1.00000 1.00000 -4 0 2 6 4 -4 5 7 3 1 -4 0 4 5 1 -4 3 7 6 2 -4 0 1 3 2 -4 6 7 5 4 +4 4 6 2 0 +4 1 3 7 5 +4 1 5 4 0 +4 2 6 7 3 +4 2 3 1 0 +4 4 5 7 6 + -- 2.39.5