mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
typing
This commit is contained in:
@@ -27,9 +27,7 @@ def get_constraints(product: ifcopenshell.entity_instance) -> list[ifcopenshell.
|
||||
Retrieves the constraints assigned to the `product`.
|
||||
|
||||
:param product: The IFC element.
|
||||
:type product: ifcopenshell.entity_instance
|
||||
:return: List of assigned constraints.
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
"""
|
||||
constraints = []
|
||||
for rel in product.HasAssociations or []:
|
||||
@@ -43,9 +41,7 @@ def get_constrained_elements(constraint: ifcopenshell.entity_instance) -> set[if
|
||||
Retrieves the elements constrained by a `constraint`.
|
||||
|
||||
:param product: The IFC element.
|
||||
:type product: ifcopenshell.entity_instance
|
||||
:return: Set of elements constrained by a `constrant`.
|
||||
:rtype: set[ifcopenshell.entity_instance]
|
||||
"""
|
||||
elements = set()
|
||||
for rel in constraint.file.get_inverse(constraint):
|
||||
@@ -59,9 +55,7 @@ def get_metrics(constraint: ifcopenshell.entity_instance) -> list[ifcopenshell.e
|
||||
Retrieves the list of nested constraints for a IfcObjective `constraint`.
|
||||
|
||||
:param product: IfcObjective constraint.
|
||||
:type product: ifcopenshell.entity_instance
|
||||
:return: List of nested constraints.
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
"""
|
||||
|
||||
metrics = []
|
||||
|
||||
Reference in New Issue
Block a user