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;