From 8f8862d23d5b1c3819b3ccb9afb7492cedfc102c Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 18 Apr 2023 13:17:20 +0200 Subject: [PATCH] get_mappeditem_transformation() --- src/ifcopenshell-python/ifcopenshell/util/placement.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ifcopenshell-python/ifcopenshell/util/placement.py b/src/ifcopenshell-python/ifcopenshell/util/placement.py index b2564a69d6..fe6e8f78bb 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/placement.py +++ b/src/ifcopenshell-python/ifcopenshell/util/placement.py @@ -91,6 +91,11 @@ def get_cartesiantransformationoperator3d(inst): return m4 +def get_mappeditem_transformation(item): + m4 = ifcopenshell.util.placement.get_axis2placement(item.MappingSource.MappingOrigin) + return get_cartesiantransformationoperator(item.MappingTarget) @ m4 + + def get_storey_elevation(storey): if storey.ObjectPlacement: matrix = get_local_placement(storey.ObjectPlacement)