len(get_inverse) -> get_total_inverses

This commit is contained in:
Andrej730
2025-02-24 11:34:47 +05:00
parent 6eda4e389c
commit 5eb9cb2ee4
17 changed files with 26 additions and 26 deletions
@@ -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))