From fb399595fa8a4a8a6e76d83a961874daef2050bc Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Fri, 14 Feb 2025 19:16:13 +0100 Subject: [PATCH] Skip SwapImproveEdge if one adjacent element has wrong orientation --- libsrc/meshing/improve3.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libsrc/meshing/improve3.cpp b/libsrc/meshing/improve3.cpp index b845cf02..35aa3768 100644 --- a/libsrc/meshing/improve3.cpp +++ b/libsrc/meshing/improve3.cpp @@ -763,6 +763,9 @@ double MeshOptimize3d :: SwapImproveEdge ( if (mesh[ei].IsDeleted()) return 0.0; + + if(WrongOrientation(mesh.Points(), mesh[ei])) + return 0.0; } if(!NeedsOptimization(hasbothpoints))