From 0fd3c69579b5641755baf411542cf9f949e4689d Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 30 Apr 2019 11:54:56 +0200 Subject: [PATCH] FindFromKey() backwards compat --- src/ifcgeom/IfcGeomFunctions.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index 829732aad5..a538dcbeee 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -3449,8 +3449,17 @@ bool IfcGeom::Kernel::triangulate_wire(const TopoDS_Wire& wire, TopTools_ListOfS // Validation for (int i = 1; i <= mape.Extent(); ++i) { +#if OCC_VERSION_HEX >= 0x70000 TopTools_ListOfShape val; if (!mapn.FindFromKey(mape.FindKey(i), val)) { +#else + bool contains = false; + try { + TopTools_ListOfShape val = mapn.FindFromKey(mape.FindKey(i)); + contains = true; + } catch (Standard_NoSuchObject&) {} + if (!contains) { +#endif // All existing edges need to exist in the new faces Logger::Error("Internal error, missing edge from triangulation"); if (faceset_helper_ != nullptr) {