Fail early on duplicate (non consecutive) points in face loops

This commit is contained in:
Thomas Krijnen
2018-09-17 14:59:15 +02:00
parent 36739b4c78
commit be9ffa7322
+9
View File
@@ -2921,6 +2921,15 @@ bool IfcGeom::Kernel::wire_intersections(const TopoDS_Wire& wire, TopTools_ListO
tree.add(edge_idx++, exp.Current());
}
}
if (wd->NbEdges() != n) {
// If the number of edges differs, BRepTools_WireExplorer did not
// reach every edge, probably due to loops exactly at vertex locations.
// This is not supported by this algorithm which only elimates loops
// due to edge crossings.
throw geometry_exception("Invalid loop");
}
bool intersected = false;