mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 22:11:36 +00:00
edit_true_north: handle unsetting case when TrueNorth is already None
(cherry picked from commit 47dc1a6c68)
This commit is contained in:
@@ -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)
|
ifcopenshell.util.element.remove_deep2(file, old_true_north)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if true_north is None:
|
||||||
|
continue
|
||||||
|
|
||||||
if context.TrueNorth:
|
if context.TrueNorth:
|
||||||
if file.get_total_inverses(context.TrueNorth) != 1:
|
if file.get_total_inverses(context.TrueNorth) != 1:
|
||||||
context.TrueNorth = file.create_entity("IfcDirection")
|
context.TrueNorth = file.create_entity("IfcDirection")
|
||||||
|
|||||||
Reference in New Issue
Block a user