From d2337dc692949e36e50193c53efd14ef80d484e7 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 21 Sep 2018 12:06:10 +0200 Subject: [PATCH] Missing FindFromKey() overload on older versions of occt --- src/ifcgeom/IfcGeomWires.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/ifcgeom/IfcGeomWires.cpp b/src/ifcgeom/IfcGeomWires.cpp index bc7294a15c..ffaad79b7e 100644 --- a/src/ifcgeom/IfcGeomWires.cpp +++ b/src/ifcgeom/IfcGeomWires.cpp @@ -115,18 +115,17 @@ namespace { TopExp::MapShapesAndAncestors(w, TopAbs_VERTEX, TopAbs_EDGE, map); bool all_linear = true, single_circle = false, first = true; - TopTools_ListOfShape edges; - if (map.FindFromKey(v, edges)) { - TopTools_ListIteratorOfListOfShape it(edges); - for (; it.More(); it.Next()) { - const TopoDS_Edge& e = TopoDS::Edge(it.Value()); - double _, __; - Handle(Geom_Curve) crv = BRep_Tool::Curve(e, _, __); - const bool is_line = crv->DynamicType() == STANDARD_TYPE(Geom_Line); - const bool is_circle = crv->DynamicType() == STANDARD_TYPE(Geom_Circle); - all_linear = all_linear && all_linear; - single_circle = first && is_circle; - } + + const TopTools_ListOfShape& edges = map.FindFromKey(v); + TopTools_ListIteratorOfListOfShape it(edges); + for (; it.More(); it.Next()) { + const TopoDS_Edge& e = TopoDS::Edge(it.Value()); + double _, __; + Handle(Geom_Curve) crv = BRep_Tool::Curve(e, _, __); + const bool is_line = crv->DynamicType() == STANDARD_TYPE(Geom_Line); + const bool is_circle = crv->DynamicType() == STANDARD_TYPE(Geom_Circle); + all_linear = all_linear && all_linear; + single_circle = first && is_circle; } if (all_linear) {