From 42e184c9362e040831789032beb80857d834c8f0 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sun, 16 Feb 2025 17:08:34 +1100 Subject: [PATCH] Fix #5839. Appending an asset now also considers shape aspects. --- .../ifcopenshell/api/project/append_asset.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py b/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py index aca33128aa..9411307a66 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py +++ b/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py @@ -261,7 +261,10 @@ class Usecase: self.base_material_class: ["HasExternalReferences", "HasProperties", "HasRepresentation"], "IfcRepresentationItem": ["StyledByItem", "LayerAssignment"], "IfcRepresentation": ["LayerAssignments"], + "IfcProductDefinitionShape": ["HasShapeAspects"], + "IfcRepresentationMap": ["HasShapeAspects"], } + print('appending type product!') self.existing_contexts = self.file.by_type("IfcGeometricRepresentationContext") element = self.add_element(self.settings["element"]) self.reuse_existing_contexts() @@ -278,6 +281,8 @@ class Usecase: "LayerAssignments" if self.file.schema == "IFC2X3" else "LayerAssignment", ], "IfcRepresentation": ["LayerAssignments"], + "IfcProductDefinitionShape": ["HasShapeAspects"], + "IfcRepresentationMap": ["HasShapeAspects"], } self.existing_contexts = self.file.by_type("IfcGeometricRepresentationContext") element = self.add_element(self.settings["element"])