From 47dc1a6c68e6c98557aff152b636079d17c5beab Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sat, 18 Jul 2026 13:00:37 +0500 Subject: [PATCH] edit_true_north: handle unsetting case when `TrueNorth` is already `None` --- .../ifcopenshell/api/georeference/edit_true_north.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_true_north.py b/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_true_north.py index 5a39f917f4..58ab003e98 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_true_north.py +++ b/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_true_north.py @@ -65,6 +65,9 @@ def edit_true_north(file: ifcopenshell.file, true_north: Optional[Union[tuple[fl ifcopenshell.util.element.remove_deep2(file, old_true_north) continue + if true_north is None: + continue + if context.TrueNorth: if file.get_total_inverses(context.TrueNorth) != 1: context.TrueNorth = file.create_entity("IfcDirection")