mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
len(get_inverse) -> get_total_inverses
This commit is contained in:
+3
-3
@@ -40,9 +40,9 @@ def edit_structural_connection_cs(
|
||||
structural_item.ConditionCoordinateSystem = ccs
|
||||
|
||||
ccs = structural_item.ConditionCoordinateSystem
|
||||
if ccs.Axis and len(file.get_inverse(ccs.Axis)) == 1:
|
||||
file.remove(ccs.Axis)
|
||||
if (current_axis := ccs.Axis) and file.get_total_inverses(current_axis) == 1:
|
||||
file.remove(current_axis)
|
||||
ccs.Axis = file.create_entity("IfcDirection", ifc_safe_vector_type(axis))
|
||||
if (prev_ref_direction := ccs.RefDirection) and len(file.get_inverse(prev_ref_direction)) == 1:
|
||||
if (prev_ref_direction := ccs.RefDirection) and file.get_total_inverses(prev_ref_direction) == 1:
|
||||
file.remove(prev_ref_direction)
|
||||
ccs.RefDirection = file.create_entity("IfcDirection", ifc_safe_vector_type(ref_direction))
|
||||
|
||||
@@ -31,6 +31,6 @@ def edit_structural_item_axis(
|
||||
Defaults to (0., 0., 1.).
|
||||
:return: None
|
||||
"""
|
||||
if len(file.get_inverse(axis_dir := structural_item.Axis)) == 1:
|
||||
if file.get_total_inverses(axis_dir := structural_item.Axis) == 1:
|
||||
file.remove(axis_dir)
|
||||
structural_item.Axis = file.create_entity("IfcDirection", ifc_safe_vector_type(axis))
|
||||
|
||||
Reference in New Issue
Block a user