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.
This commit is contained in:
Stinkfist0
2018-10-01 19:59:18 +03:00
committed by Thomas Krijnen
parent 9211f80625
commit 3bef32bb87
-14
View File
@@ -1807,20 +1807,6 @@ std::map<std::string, IfcSchema::IfcPresentationLayerAssignment*> IfcGeom::Kerne
layers[(*jt)->Name()] = *jt;
}
}
IfcRepresentationItem::list::ptr items = r->as<IfcRepresentationItem>();
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;
}