mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
style->instance_id to consider possible IfcPresentationStyleAssignment in ifc2x3/ifc4
This commit is contained in:
committed by
Thomas Krijnen
parent
ecef745c3b
commit
ffd944f4f9
@@ -213,6 +213,15 @@ std::string taxonomy_item_repr(ifcopenshell::geometry::taxonomy::item::ptr i) {
|
|||||||
aggregate_of_instance::ptr styles = *ent->get("Styles");
|
aggregate_of_instance::ptr styles = *ent->get("Styles");
|
||||||
if (styles->size() == 1) {
|
if (styles->size() == 1) {
|
||||||
ent = (*styles->begin())->as<IfcUtil::IfcBaseEntity>();
|
ent = (*styles->begin())->as<IfcUtil::IfcBaseEntity>();
|
||||||
|
// < IFC4X3.
|
||||||
|
if (ent->declaration().name() == "IfcPresentationStyleAssignment") {
|
||||||
|
aggregate_of_instance::ptr styles = *ent->get("Styles");
|
||||||
|
if (styles->size() == 1) {
|
||||||
|
ent = (*styles->begin())->as<IfcUtil::IfcBaseEntity>();
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user