From bfaa9ed5f93c2c3a71a92df233d06c13af63ccd8 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 22 Nov 2019 13:12:39 +0100 Subject: [PATCH] Old OCC compatibility --- src/ifcgeom/IfcGeomShapes.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ifcgeom/IfcGeomShapes.cpp b/src/ifcgeom/IfcGeomShapes.cpp index 442574f172..2586da9348 100644 --- a/src/ifcgeom/IfcGeomShapes.cpp +++ b/src/ifcgeom/IfcGeomShapes.cpp @@ -1146,11 +1146,12 @@ namespace { // @todo this creates the ancestor map twice TopExp::Vertices(wire, v0, v1); - TopTools_ListOfShape es; + while (!v0.IsSame(v1)) { - if (!map.FindFromKey(v0, es)) { + if (!map.Contains(v0)) { throw std::runtime_error("Disconnected vertex"); } + const TopTools_ListOfShape& es = map.FindFromKey(v0); TopoDS_Vertex ve0, ve1; TopTools_ListIteratorOfListOfShape it(es); bool added = false;