From 8e1e0aec79e82d4876f7c4feebb89e4b7612f9e5 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Fri, 21 Mar 2025 16:30:56 +1100 Subject: [PATCH] Fix #6404. See #1227. Fix IFC2X3 wall creation with new wall engine. --- .../ifcopenshell/api/geometry/regenerate_wall_representation.py | 2 +- src/ifcopenshell-python/ifcopenshell/util/representation.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/regenerate_wall_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/regenerate_wall_representation.py index 0b748d7e0c..43bb761f81 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/geometry/regenerate_wall_representation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/regenerate_wall_representation.py @@ -548,7 +548,7 @@ class Regenerator: material = ifcopenshell.util.element.get_material(wall, should_skip_usage=True) if not material or not material.is_a("IfcMaterialLayerSet"): return [] - return [PrioritisedLayer(l.Priority or 0, l.LayerThickness) for l in material.MaterialLayers] + return [PrioritisedLayer(getattr(l, "Priority", 0) or 0, l.LayerThickness) for l in material.MaterialLayers] def combine_layers(self, layers, override_priorities): results = [] diff --git a/src/ifcopenshell-python/ifcopenshell/util/representation.py b/src/ifcopenshell-python/ifcopenshell/util/representation.py index f5233005af..a628ea6c88 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/representation.py +++ b/src/ifcopenshell-python/ifcopenshell/util/representation.py @@ -480,7 +480,7 @@ def get_reference_line(wall: ifcopenshell.entity_instance, fallback_length: floa if axis := ifcopenshell.util.representation.get_representation(wall, "Plan", "Axis", "GRAPH_VIEW"): for item in ifcopenshell.util.representation.resolve_representation(axis).Items: if item.is_a("IfcPolyline"): - points = item.Points + points = [p[0] for p in item.Points] elif item.is_a("IfcIndexedPolyCurve"): points = item.Points.CoordList else: