This commit is contained in:
Andrej730
2024-05-10 11:21:53 +05:00
parent e7eb00eaa3
commit c50d1ea2fe
105 changed files with 502 additions and 251 deletions
@@ -21,7 +21,11 @@ import ifcopenshell.api
import ifcopenshell.util.element
def unassign_flow_control(file, relating_flow_element=None, related_flow_control=None) -> None:
def unassign_flow_control(
file: ifcopenshell.file,
relating_flow_element: ifcopenshell.entity_instance,
related_flow_control: ifcopenshell.entity_instance,
) -> None:
"""Unassigns flow control element from the flow element.
:param related_flow_control: IfcDistributionControlElement controling the
@@ -29,9 +33,8 @@ def unassign_flow_control(file, relating_flow_element=None, related_flow_control
:type related_flow_control: ifcopenshell.entity_instance
:param relating_flow_element: The IfcDistributionFlowElement that is being controlled
:type relating_flow_element: ifcopenshell.entity_instance
:return: If the control still is related to other objects, the
IfcRelFlowControlElements is returned, otherwise None.
:rtype: ifcopenshell.entity_instance, None
:return: None
:rtype: None
Example:
@@ -71,4 +74,3 @@ def unassign_flow_control(file, relating_flow_element=None, related_flow_control
related_flow_controls.remove(settings["related_flow_control"])
assignment.RelatedControlElements = related_flow_controls
ifcopenshell.api.run("owner.update_owner_history", file, **{"element": assignment})
return assignment