mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
fix errors getting layer assignments in ifc2x3 #4330
This commit is contained in:
@@ -47,7 +47,13 @@ class Usecase:
|
||||
for subelement in self.file.traverse(self.settings["representation"]):
|
||||
if subelement.is_a("IfcRepresentationItem"):
|
||||
[styled_items.add(s) for s in subelement.StyledByItem or []]
|
||||
[presentation_layer_assignments.add(s) for s in subelement.LayerAssignment]
|
||||
# IFC2X3 is using LayerAssignments
|
||||
for s in (
|
||||
subelement.LayerAssignment
|
||||
if hasattr(subelement, "LayerAssignment")
|
||||
else subelement.LayerAssignments
|
||||
):
|
||||
presentation_layer_assignments.add(s)
|
||||
# IfcTessellatedFaceSet inverses
|
||||
[textures.add(t) for t in getattr(subelement, "HasTextures", []) or []]
|
||||
[colours.add(t) for t in getattr(subelement, "HasColours", []) or []]
|
||||
|
||||
Reference in New Issue
Block a user