mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
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:
committed by
Thomas Krijnen
parent
9211f80625
commit
3bef32bb87
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user