From 3ab8808fa3a3d432dd20b8facdae758dba5cb776 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Tue, 18 Jan 2022 18:24:09 +0100 Subject: [PATCH] do not restrict mesh size on identified edges --- libsrc/meshing/basegeom.hpp | 2 ++ libsrc/occ/occgenmesh.cpp | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/libsrc/meshing/basegeom.hpp b/libsrc/meshing/basegeom.hpp index 49bf8710..642db838 100644 --- a/libsrc/meshing/basegeom.hpp +++ b/libsrc/meshing/basegeom.hpp @@ -196,6 +196,8 @@ namespace netgen size_t GetNFaces() const { return faces.Size(); } const GeometryFace & GetFace(int i) const { return *faces[i]; } + const GeometryEdge & GetEdge(int i) const { return *edges[i]; } + const GeometryVertex & GetVertex(int i) const { return *vertices[i]; } void Clear(); diff --git a/libsrc/occ/occgenmesh.cpp b/libsrc/occ/occgenmesh.cpp index 643d1d9a..606adb29 100644 --- a/libsrc/occ/occgenmesh.cpp +++ b/libsrc/occ/occgenmesh.cpp @@ -495,6 +495,24 @@ namespace netgen continue; } + bool is_identified_edge = false; + // TODO: change to use hash value + const auto& gedge = geom.GetEdge(geom.edge_map.at(e.TShape())); + auto& v0 = gedge.GetStartVertex(); + auto& v1 = gedge.GetEndVertex(); + for(auto & ident : v0.identifications) + { + auto other = ident.from == &v0 ? ident.to : ident.from; + if(other->nr == v1.nr && ident.type == Identifications::CLOSESURFACES) + { + is_identified_edge = true; + break; + } + } + + if(is_identified_edge) + continue; + double localh = len/mparam.segmentsperedge; double s0, s1;