diff --git a/libsrc/occ/occ_edge.cpp b/libsrc/occ/occ_edge.cpp index 7f2c3d66..a952c5e5 100644 --- a/libsrc/occ/occ_edge.cpp +++ b/libsrc/occ/occ_edge.cpp @@ -19,11 +19,14 @@ namespace netgen if(verts.size() != 2) throw Exception("OCC edge does not have 2 vertices"); - // swap start/end if necessary - double d00 = Dist(GetPoint(0), start->GetPoint()); - double d01 = Dist(GetPoint(0), end->GetPoint()); - if(d01 < d00) - swap(start, end); + if(start != end) + { + // swap start/end if necessary + double d00 = Dist(GetPoint(0), start->GetPoint()); + double d01 = Dist(GetPoint(0), end->GetPoint()); + if(d01 < d00) + swap(start, end); + } } double OCCEdge::GetLength() const diff --git a/libsrc/occ/occgeom.cpp b/libsrc/occ/occgeom.cpp index 1b84b5ac..1b245a7f 100644 --- a/libsrc/occ/occgeom.cpp +++ b/libsrc/occ/occgeom.cpp @@ -1130,8 +1130,6 @@ namespace netgen auto edge = TopoDS::Edge(e); if(edge_map.count(tshape)!=0) continue; - if(BRep_Tool::Degenerated(edge)) - continue; edge_map[tshape] = edges.Size(); auto verts = GetVertices(e); auto occ_edge = make_unique(edge, *vertices[vertex_map[verts[0].TShape()]], *vertices[vertex_map[verts[1].TShape()]] );