From 3bef32bb874b6f535164711bbefed85bdb8ac08f Mon Sep 17 00:00:00 2001 From: Stinkfist0 Date: Mon, 1 Oct 2018 19:59:18 +0300 Subject: [PATCH] IfcGeom::Kernel::get_layers: remove what would appear to be unnecessary code (yields 0 layers in my tests). The LayerAssignments() calls can take up to 95 % of the function's execution time yielding no results. --- src/ifcgeom/IfcGeomFunctions.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index 416a5d51d0..dc0a98e213 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -1807,20 +1807,6 @@ std::map IfcGeom::Kerne layers[(*jt)->Name()] = *jt; } } - - IfcRepresentationItem::list::ptr items = r->as(); - for (IfcRepresentationItem::list::it it = items->begin(); it != items->end(); ++it) { - IfcPresentationLayerAssignment::list::ptr a = (*it)-> - // LayerAssignments renamed from plural to singular, LayerAssignment, so work around that -#ifdef USE_IFC4 - LayerAssignment(); -#else - LayerAssignments(); -#endif - for (IfcPresentationLayerAssignment::list::it jt = a->begin(); jt != a->end(); ++jt) { - layers[(*jt)->Name()] = *jt; - } - } } return layers; }