diff --git a/libsrc/occ/occ_face.cpp b/libsrc/occ/occ_face.cpp index 2e60469a..a092a3a0 100644 --- a/libsrc/occ/occ_face.cpp +++ b/libsrc/occ/occ_face.cpp @@ -63,7 +63,7 @@ namespace netgen auto & orientation = edge_orientation[edgenr]; double s0, s1; auto cof = BRep_Tool::CurveOnSurface (edge, face, s0, s1); - if(edge.Orientation() == TopAbs_FORWARD) + if(edge.Orientation() == TopAbs_FORWARD || edge.Orientation() == TopAbs_INTERNAL) { curve_on_face[FORWARD][edgenr] = cof; orientation += FORWARD; @@ -75,6 +75,15 @@ namespace netgen orientation += REVERSED; edge_on_face[REVERSED][edgenr] = edge; } + if(edge.Orientation() == TopAbs_INTERNAL) + { + // add reversed edge + auto r_edge = TopoDS::Edge(edge.Reversed()); + auto cof = BRep_Tool::CurveOnSurface (r_edge, face, s0, s1); + curve_on_face[REVERSED][edgenr] = cof; + orientation += REVERSED; + edge_on_face[REVERSED][edgenr] = r_edge; + } if(orientation > BOTH) throw Exception("have edge more than twice in face " + ToString(nr) + " " + properties.GetName() + ", orientation: " + ToString(orientation));