From aaf008f0076722564f9cad2faa58524f0e225a04 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 25 Feb 2025 18:13:02 +0500 Subject: [PATCH] Fix adding transom to door #6230 (d23cfcb) --- .../ifcopenshell/api/geometry/add_door_representation.py | 5 ++++- .../ifcopenshell/api/geometry/add_window_representation.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_door_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_door_representation.py index 6b4fd7e510..fc60a25bbc 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_door_representation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_door_representation.py @@ -622,7 +622,7 @@ class Usecase: window_lining_size = V(overall_width, lining_depth, window_lining_height) window_position = V(0, 0, overall_height - window_lining_height) frame_size = V(door_opening_width, frame_depth, frame_height) - window_lining_items, frame_items, glass_items = create_ifc_window( + current_window_items = create_ifc_window( builder, window_lining_size, window_lining_thickness, @@ -633,6 +633,9 @@ class Usecase: glass_thickness, window_position, ) + window_lining_items = current_window_items["Lining"] + frame_items = current_window_items["Framing"] + glass_items = current_window_items["Glazing"] lining_offset_items = lining_items + door_items + window_lining_items + frame_items + glass_items builder.translate(lining_offset_items, (0, lining_offset, 0)) diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_window_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_window_representation.py index 9de9dc5d55..4477694ca5 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_window_representation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_window_representation.py @@ -181,7 +181,7 @@ def create_ifc_window( glass_thickness: float, position: np.ndarray, x_offsets: Optional[list[float]] = None, -) -> tuple[list[ifcopenshell.entity_instance], list[ifcopenshell.entity_instance], list[ifcopenshell.entity_instance]]: +) -> dict[str, list[ifcopenshell.entity_instance]]: """`lining_thickness` and `x_offsets` are expected to be defined as a list, similarly to `create_ifc_window_frame_simple` `thickness` argument""" lining_items: list[ifcopenshell.entity_instance] = []