From 35360df540cbe90af91216874ed1fe58d4fdda15 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Thu, 27 Apr 2023 15:35:10 +0200 Subject: [PATCH] Don't add new duplicate segments to mesh, if mesh fulfills HaveSingleSegments() --- libsrc/meshing/boundarylayer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libsrc/meshing/boundarylayer.cpp b/libsrc/meshing/boundarylayer.cpp index 3750cc2d..72924f25 100644 --- a/libsrc/meshing/boundarylayer.cpp +++ b/libsrc/meshing/boundarylayer.cpp @@ -360,6 +360,14 @@ namespace netgen { INDEX_2_HASHTABLE already_added( 2*new_segments.Size() ); + for(auto & seg : mesh.LineSegments()) + { + INDEX_2 i2 (seg[0], seg[1]); + i2.Sort(); + if(!already_added.Used(i2)) + already_added.Set(i2, true); + } + for(auto & seg : new_segments) { INDEX_2 i2 (seg[0], seg[1]);