edit_true_north: handle unsetting case when TrueNorth is already None

(cherry picked from commit 47dc1a6c68)
This commit is contained in:
Andrej730
2026-07-18 13:00:37 +05:00
committed by Dion Moult
parent c17ea80827
commit 1a2e6872be
@@ -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")