mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Even more cleaning of documentation references
This commit is contained in:
@@ -27,9 +27,9 @@ 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.entity_instance
|
||||
:type product: ifcopenshell.entity_instance
|
||||
:return: List of assigned constraints.
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
"""
|
||||
constraints = []
|
||||
for rel in product.HasAssociations or []:
|
||||
@@ -43,9 +43,9 @@ 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.entity_instance
|
||||
:type product: ifcopenshell.entity_instance
|
||||
:return: Set of elements constrained by a `constrant`.
|
||||
:rtype: set[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: set[ifcopenshell.entity_instance]
|
||||
"""
|
||||
elements = set()
|
||||
for rel in constraint.file.get_inverse(constraint):
|
||||
@@ -59,9 +59,9 @@ 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.entity_instance
|
||||
:type product: ifcopenshell.entity_instance
|
||||
:return: List of nested constraints.
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
"""
|
||||
|
||||
metrics = []
|
||||
|
||||
@@ -40,7 +40,7 @@ def get_pset(
|
||||
occurrence, not the type's pset.
|
||||
|
||||
:param element: The IFC Element entity
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:param name: The name of the pset
|
||||
:type name: str
|
||||
:param prop: The name of the property
|
||||
@@ -128,7 +128,7 @@ def get_psets(
|
||||
occurrence, not the type's pset.
|
||||
|
||||
:param element: The IFC Element entity
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:param psets_only: Default as False. Set to true if only property sets are needed.
|
||||
:type psets_only: bool,optional
|
||||
:param qtos_only: Default as False. Set to true if only quantities are needed.
|
||||
@@ -418,7 +418,7 @@ def get_predefined_type(element: ifcopenshell.entity_instance) -> str:
|
||||
considered first.
|
||||
|
||||
:param element: The IFC Element entity
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:return: The predefined type of the element
|
||||
:rtype: str
|
||||
|
||||
@@ -448,9 +448,9 @@ def get_type(element: ifcopenshell.entity_instance) -> ifcopenshell.entity_insta
|
||||
"""Retrieves the construction type element of an element occurrence
|
||||
|
||||
:param element: The element occurrence
|
||||
:type: ifcopenshell.entity_instance.entity_instance
|
||||
:type: ifcopenshell.entity_instance
|
||||
:return: The related type element
|
||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
|
||||
Example:
|
||||
|
||||
@@ -473,9 +473,9 @@ def get_types(type: ifcopenshell.entity_instance) -> list[ifcopenshell.entity_in
|
||||
"""Get all the occurrences of a type element
|
||||
|
||||
:param type: The type element
|
||||
:type type: ifcopenshell.entity_instance.entity_instance
|
||||
:type type: ifcopenshell.entity_instance
|
||||
:return: A list of occurrences of that type
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -495,9 +495,9 @@ def get_shape_aspects(element: ifcopenshell.entity_instance) -> list[ifcopenshel
|
||||
"""Gets element shape aspects
|
||||
|
||||
:param element: The element to get the shape aspects of.
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:return: The associated shape aspects of the element.
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -530,7 +530,7 @@ def get_material(
|
||||
constituent), or a material set usage.
|
||||
|
||||
:param element: The element to get the material of.
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:param should_skip_usage: If set to True, if the material is a material set
|
||||
usage, the material set itself will be returned. Useful if you don't
|
||||
care about occurrence usage parameters. If False, the usage will be
|
||||
@@ -540,7 +540,7 @@ def get_material(
|
||||
types will be considered.
|
||||
:type should_inherit: bool
|
||||
:return: The associated material of the element or `None`.
|
||||
:rtype: Union[ifcopenshell.entity_instance.entity_instance, None]
|
||||
:rtype: Union[ifcopenshell.entity_instance, None]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -574,11 +574,11 @@ def get_materials(
|
||||
returned as a list.
|
||||
|
||||
:param element: The element to get the materials of.
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:param should_inherit: If True, any inherited materials from associated
|
||||
types will be considered.
|
||||
:return: The associated materials of the element.
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -608,9 +608,9 @@ def get_styles(element: ifcopenshell.entity_instance) -> list[ifcopenshell.entit
|
||||
Styles may be retreived from the material or the body representation.
|
||||
|
||||
:param element: The element to get the styles of.
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:return: A list of surface styles
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -655,11 +655,11 @@ def get_elements_by_material(
|
||||
usage.
|
||||
|
||||
:param ifc_file: The IFC file
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:param material: The IFC Material entity
|
||||
:type material: ifcopenshell.entity_instance.entity_instance
|
||||
:type material: ifcopenshell.entity_instance
|
||||
:return: A list of elements using the to the material
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -696,11 +696,11 @@ def get_elements_by_style(
|
||||
"""Retrieves the elements whose geometric representation uses a style
|
||||
|
||||
:param ifc_file: The IFC file
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:param style: The IfcPresentationStyle entity
|
||||
:type style: ifcopenshell.entity_instance.entity_instance
|
||||
:type style: ifcopenshell.entity_instance
|
||||
:return: The elements related to the style
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -738,11 +738,11 @@ def get_elements_by_representation(
|
||||
"""Gets all elements using a geometric representation
|
||||
|
||||
:param ifc_file: The IFC file
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:param representation: The IfcShapeRepresentation representation
|
||||
:type representation: ifcopenshell.entity_instance.entity_instance
|
||||
:type representation: ifcopenshell.entity_instance
|
||||
:return: The elements using the geometric representation
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -772,11 +772,11 @@ def get_elements_by_layer(
|
||||
"""Get all the elements that are used by a presentation layer
|
||||
|
||||
:param ifc_file: The IFC file
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:param layer: The IfcPresentationLayerAssignment layer
|
||||
:type layer: ifcopenshell.entity_instance.entity_instance
|
||||
:type layer: ifcopenshell.entity_instance
|
||||
:return: The elements using the geometric representation
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
"""
|
||||
results = set()
|
||||
for item in layer.AssignedItems or []:
|
||||
@@ -798,11 +798,11 @@ def get_layers(
|
||||
traditional CAD presentation layer.
|
||||
|
||||
:param ifc_file: The IFC file object
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:param element: The IFC element to interrogate
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:return: A list of IfcPresentationLayerAssignment
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -836,7 +836,7 @@ def get_container(
|
||||
Retrieves the spatial structure container of an element.
|
||||
|
||||
:param element: The IFC element
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:param should_get_direct: If True, a result is only returned if the element
|
||||
is directly contained in a spatial structure element. If False, an
|
||||
indirect spatial container may be returned, such as if an element is a
|
||||
@@ -847,7 +847,7 @@ def get_container(
|
||||
example, you may be after the storey, not a space.
|
||||
:type ifc_class: str, optional
|
||||
:return: The direct or indirect container of the element or None.
|
||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
|
||||
Example:
|
||||
|
||||
@@ -892,9 +892,9 @@ def get_referenced_structures(element: ifcopenshell.entity_instance) -> list[ifc
|
||||
as stairs, doors, etc.
|
||||
|
||||
:param element: The IFC element
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:return: A list of IfcSpatialElement
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -910,9 +910,9 @@ def get_structure_referenced_elements(structure: ifcopenshell.entity_instance) -
|
||||
"""Retreives a set of elements referenced by a structure
|
||||
|
||||
:param structure: IfcSpatialElement
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:return: A set of referenced elements, IfcSpatialReferenceSelect
|
||||
:rtype: set[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: set[ifcopenshell.entity_instance]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -934,9 +934,9 @@ def get_decomposition(element: ifcopenshell.entity_instance, is_recursive=True)
|
||||
parts of an aggreate, all openings, and all fills of any openings.
|
||||
|
||||
:param element: The IFC element
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:return: The decomposition of the element
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -978,9 +978,9 @@ def get_grouped_by(element: ifcopenshell.entity_instance) -> list[ifcopenshell.e
|
||||
"""Retrieves all subelements of an element based on the group.
|
||||
|
||||
:param element: The IFC element
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:return: All subelements of the group
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -1006,7 +1006,7 @@ def get_groups(element: ifcopenshell.entity_instance) -> list[ifcopenshell.entit
|
||||
|
||||
:param element: The IFC element
|
||||
:return: List of IfcGroups element is assigned to.
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -1027,9 +1027,9 @@ def get_aggregate(element: ifcopenshell.entity_instance) -> ifcopenshell.entity_
|
||||
Retrieves the aggregate parent of an element.
|
||||
|
||||
:param element: The IFC element
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:return: The aggregate of the element
|
||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
|
||||
Example:
|
||||
|
||||
@@ -1048,9 +1048,9 @@ def get_nest(element: ifcopenshell.entity_instance) -> ifcopenshell.entity_insta
|
||||
Retrieves the nest parent of an element.
|
||||
|
||||
:param element: The IFC element
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:return: The nested whole of the element
|
||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
|
||||
Example:
|
||||
|
||||
@@ -1072,9 +1072,9 @@ def get_parts(element: ifcopenshell.entity_instance) -> list[ifcopenshell.entity
|
||||
Retrieves the parts of an element that have an aggregation relationship.
|
||||
|
||||
:param element: The IFC element
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:return: The parts of the element
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -1098,7 +1098,7 @@ def get_components(element: ifcopenshell.entity_instance, include_ports=False) -
|
||||
:param include_ports: Default as False. Set to true if you also want to get ports.
|
||||
:type include_ports: bool,optional
|
||||
:return: The components of the element
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -1141,9 +1141,9 @@ def get_referenced_elements(reference: ifcopenshell.entity_instance) -> set[ifco
|
||||
"""Get all elements with assigned `reference`
|
||||
|
||||
:param reference: IfcExternalReference subtype reference
|
||||
:type reference: ifcopenshell.entity_instance.entity_instance
|
||||
:type reference: ifcopenshell.entity_instance
|
||||
:return: The elements with assigned `reference`
|
||||
:rtype: set[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: set[ifcopenshell.entity_instance]
|
||||
|
||||
Example:
|
||||
|
||||
@@ -1222,7 +1222,7 @@ def batch_remove_deep2(ifc_file: ifcopenshell.file) -> None:
|
||||
on existing variables in memory.
|
||||
|
||||
:param ifc_file: The IFC file object
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:rtype: None
|
||||
|
||||
Example:
|
||||
@@ -1249,9 +1249,9 @@ def unbatch_remove_deep2(ifc_file: ifcopenshell.file) -> ifcopenshell.file:
|
||||
See documentation for batch_remove_deep2.
|
||||
|
||||
:param ifc_file: The IFC file object
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:return: A newly loaded file with the elements removed.
|
||||
:rtype: ifcopenshell.file.file
|
||||
:rtype: ifcopenshell.file
|
||||
"""
|
||||
ifc_string = ifc_file.to_string()
|
||||
lines = iter(ifc_string.split("\n"))
|
||||
@@ -1304,13 +1304,13 @@ def remove_deep2(
|
||||
subgraph but are protected from deletion.
|
||||
|
||||
:param ifc_file: The IFC file object
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:param also_consider: elements to also consider as a part of a subgraph
|
||||
:type also_consider: list[ifcopenshell.entity_instance.entity_instance], optional
|
||||
:type also_consider: list[ifcopenshell.entity_instance], optional
|
||||
:param do_not_delete: elements to protect from deletion
|
||||
:type do_not_delete: list[ifcopenshell.entity_instance.entity_instance], optional
|
||||
:type do_not_delete: list[ifcopenshell.entity_instance], optional
|
||||
:param element: The starting element that defines the subgraph
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
"""
|
||||
# ifc_file.batch()
|
||||
to_delete = set()
|
||||
@@ -1357,11 +1357,11 @@ def copy(ifc_file: ifcopenshell.file, element: ifcopenshell.entity_instance) ->
|
||||
GlobalIds are regenerated.
|
||||
|
||||
:param ifc_file: The IFC file object
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:param element: The IFC element to copy
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:return: The newly copied element
|
||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
"""
|
||||
new = ifc_file.create_entity(element.is_a())
|
||||
for i, attribute in enumerate(element):
|
||||
@@ -1387,9 +1387,9 @@ def copy_deep(
|
||||
GlobalIds are regenerated.
|
||||
|
||||
:param ifc_file: The IFC file object
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:param element: The IFC element to copy
|
||||
:type element: ifcopenshell.entity_instance.entity_instance
|
||||
:type element: ifcopenshell.entity_instance
|
||||
:param exclude: An optional list of strings of IFC class names to not copy.
|
||||
If any of the subelement is this class, it will not be copied and the
|
||||
original instance will be referenced.
|
||||
@@ -1400,9 +1400,9 @@ def copy_deep(
|
||||
:param copied_entities: A dictionary of IDs as keys and entities as values
|
||||
to reuse when coming across the same entity twice. This can typically
|
||||
be left as None.
|
||||
:type copied_entities: dict[int:ifcopenshell.entity_instance.entity_instance], optional
|
||||
:type copied_entities: dict[int:ifcopenshell.entity_instance], optional
|
||||
:return: The newly copied element
|
||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
"""
|
||||
if copied_entities is None:
|
||||
copied_entities = {}
|
||||
|
||||
@@ -147,7 +147,7 @@ def auto_xyz2enh(ifc_file, x, y, z):
|
||||
https://www.buildingsmart.org/standards/bsi-standards/standards-library/
|
||||
|
||||
:param ifc_file: The IFC file
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:param x: The X local engineering coordinate provided in project length units.
|
||||
:type x: float
|
||||
:param y: The Y local engineering coordinate provided in project length units.
|
||||
@@ -215,7 +215,7 @@ def auto_enh2xyz(ifc_file, easting, northing, height):
|
||||
https://www.buildingsmart.org/standards/bsi-standards/standards-library/
|
||||
|
||||
:param ifc_file: The IFC file
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:param easting: The global easting map coordinate provided in map units.
|
||||
:type easting: float
|
||||
:param northing: The global northing map coordinate provided in map units.
|
||||
@@ -283,7 +283,7 @@ def auto_z2e(ifc_file, z):
|
||||
https://www.buildingsmart.org/standards/bsi-standards/standards-library/
|
||||
|
||||
:param ifc_file: The IFC file
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:param z: The Z local engineering coordinate provided in project length units.
|
||||
:type z: float
|
||||
:return: The elevation in project length units.
|
||||
@@ -587,7 +587,7 @@ def get_grid_north(ifc_file):
|
||||
https://www.buildingsmart.org/standards/bsi-standards/standards-library/
|
||||
|
||||
:param ifc_file: The IFC file
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:return: An angle to grid north in decimal degrees
|
||||
:rtype: float
|
||||
"""
|
||||
@@ -623,7 +623,7 @@ def get_true_north(ifc_file):
|
||||
instead.
|
||||
|
||||
:param ifc_file: The IFC file
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:return: An angle to true north in decimal degrees
|
||||
:rtype: float
|
||||
"""
|
||||
|
||||
@@ -60,7 +60,7 @@ def get_axis2placement(placement: ifcopenshell.entity_instance) -> MatrixType:
|
||||
should use ``get_local_placement`` instead.
|
||||
|
||||
:param placement: The IfcLocalPlacement enitity
|
||||
:type placement: ifcopenshell.entity_instance.entity_instance
|
||||
:type placement: ifcopenshell.entity_instance
|
||||
:return: A 4x4 numpy matrix
|
||||
:rtype: MatrixType
|
||||
"""
|
||||
@@ -118,7 +118,7 @@ def get_local_placement(placement: ifcopenshell.entity_instance) -> MatrixType:
|
||||
matrix = ifcopenshell.util.placement.get_local_placement(placement)
|
||||
|
||||
:param placement: The IfcLocalPlacement entity
|
||||
:type placement: ifcopenshell.entity_instance.entity_instance
|
||||
:type placement: ifcopenshell.entity_instance
|
||||
:return: A 4x4 numpy matrix
|
||||
:rtype: MatrixType
|
||||
"""
|
||||
@@ -138,7 +138,7 @@ def get_cartesiantransformationoperator3d(inst: ifcopenshell.entity_instance) ->
|
||||
``get_mappeditem_transformation`` instead.
|
||||
|
||||
:param item: The IfcCartesianTransformationOperator entity
|
||||
:type item: ifcopenshell.entity_instance.entity_instance
|
||||
:type item: ifcopenshell.entity_instance
|
||||
:return: A 4x4 numpy transformation matrix
|
||||
:rtype: MatrixType
|
||||
"""
|
||||
@@ -184,7 +184,7 @@ def get_mappeditem_transformation(item: ifcopenshell.entity_instance) -> MatrixT
|
||||
transformation matrix.
|
||||
|
||||
:param item: The IfcMappedItem entity
|
||||
:type item: ifcopenshell.entity_instance.entity_instance
|
||||
:type item: ifcopenshell.entity_instance
|
||||
:return: A 4x4 numpy transformation matrix
|
||||
:rtype: MatrixType
|
||||
"""
|
||||
@@ -201,7 +201,7 @@ def get_storey_elevation(storey: ifcopenshell.entity_instance) -> float:
|
||||
its placement, or as a fallback the ``Elevation`` attribute.
|
||||
|
||||
:param storey: The IfcBuildingStorey entity
|
||||
:type storey: ifcopenshell.entity_instance.entity_instance
|
||||
:type storey: ifcopenshell.entity_instance
|
||||
:return: The elevation in project units
|
||||
:rtype: float
|
||||
"""
|
||||
|
||||
@@ -88,9 +88,9 @@ def resolve_representation(representation: ifcopenshell.entity_instance) -> ifco
|
||||
"""Resolve possibly mapped representation.
|
||||
|
||||
:param representation: IfcRepresentation
|
||||
:type representation: ifcopenshell.entity_instance.entity_instance
|
||||
:type representation: ifcopenshell.entity_instance
|
||||
:return: Representation resolved from mappings
|
||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
"""
|
||||
if len(representation.Items) == 1 and representation.Items[0].is_a("IfcMappedItem"):
|
||||
return resolve_representation(representation.Items[0].MappingSource.MappedRepresentation)
|
||||
|
||||
@@ -287,17 +287,17 @@ def filter_elements(
|
||||
Filter elements based on the provided `query`.
|
||||
|
||||
:param ifc_file: The IFC file object
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:param query: Query to execute
|
||||
:type query: str
|
||||
:param elements: Base set of IFC elements for the query.
|
||||
If provided, new elements found for the current query will be added to `elements`.
|
||||
Elements explicitly excluded in the `query` will also be excluded from `elements`
|
||||
:type elements: set[ifcopenshell.entity_instance.entity_instance], optional
|
||||
:type elements: set[ifcopenshell.entity_instance], optional
|
||||
:param edit_in_place: If `True`, mutate the provided `elements` in place. Defaults to `False`
|
||||
:type edit_in_place: bool
|
||||
:return: Set of filtered elements
|
||||
:rtype: set[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: set[ifcopenshell.entity_instance]
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ def get_element_bbox_centroid(element: ifcopenshell.entity_instance, geometry) -
|
||||
is more efficient to use ``get_shape_bbox_centroid``.
|
||||
|
||||
:param element: The element occurrence
|
||||
:type: ifcopenshell.entity_instance.entity_instance
|
||||
:type: ifcopenshell.entity_instance
|
||||
:param geometry: Geometry output calculated by IfcOpenShell
|
||||
:type geometry: geometry
|
||||
:return: A tuple representing the XYZ centroid
|
||||
@@ -271,7 +271,7 @@ def get_element_vertices(element: ifcopenshell.entity_instance, geometry) -> npt
|
||||
Results are a nested numpy array e.g. [[v1x, v1y, v1z], [v2x, v2y, v2z], ...]
|
||||
|
||||
:param element: The element occurrence
|
||||
:type: ifcopenshell.entity_instance.entity_instance
|
||||
:type: ifcopenshell.entity_instance
|
||||
:param geometry: Geometry output calculated by IfcOpenShell
|
||||
:type geometry: geometry
|
||||
:return: A numpy array listing all the vertices. Each vertex is a numpy array with XYZ coordinates.
|
||||
@@ -347,7 +347,7 @@ def get_element_bottom_elevation(element: ifcopenshell.entity_instance, geometry
|
||||
``get_shape_bottom_elevation``.
|
||||
|
||||
:param element: The element occurrence
|
||||
:type: ifcopenshell.entity_instance.entity_instance
|
||||
:type: ifcopenshell.entity_instance
|
||||
:param geometry: Geometry output calculated by IfcOpenShell
|
||||
:type geometry: geometry
|
||||
:return: The Z value
|
||||
@@ -363,7 +363,7 @@ def get_element_top_elevation(element: ifcopenshell.entity_instance, geometry) -
|
||||
``get_shape_top_elevation``.
|
||||
|
||||
:param element: The element occurrence
|
||||
:type: ifcopenshell.entity_instance.entity_instance
|
||||
:type: ifcopenshell.entity_instance
|
||||
:param geometry: Geometry output calculated by IfcOpenShell
|
||||
:type geometry: geometry
|
||||
:return: The Z value
|
||||
@@ -656,9 +656,9 @@ def get_profiles(element: ifcopenshell.entity_instance) -> list[ifcopenshell.ent
|
||||
solid extrusions. This is useful for later doing 2D take-off from profiles.
|
||||
|
||||
:param element: The element occurrence
|
||||
:type: ifcopenshell.entity_instance.entity_instance
|
||||
:type: ifcopenshell.entity_instance
|
||||
:return: A list of profiles
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
"""
|
||||
material = ifcopenshell.util.element.get_material(element, should_skip_usage=True)
|
||||
if material and material.is_a("IfcMaterialProfileSet"):
|
||||
@@ -670,9 +670,9 @@ def get_extrusions(element: ifcopenshell.entity_instance) -> list[ifcopenshell.e
|
||||
"""Gets all extruded area solids used to define an element's model body geometry
|
||||
|
||||
:param element: The element occurrence
|
||||
:type: ifcopenshell.entity_instance.entity_instance
|
||||
:type: ifcopenshell.entity_instance
|
||||
:return: A list of extrusion representation items
|
||||
:rtype: list[ifcopenshell.entity_instance.entity_instance]
|
||||
:rtype: list[ifcopenshell.entity_instance]
|
||||
"""
|
||||
representation = ifcopenshell.util.representation.get_representation(element, "Model", "Body", "MODEL_VIEW")
|
||||
if not representation:
|
||||
|
||||
@@ -398,7 +398,7 @@ def get_project_unit(ifc_file: ifcopenshell.file, unit_type: str) -> Union[ifcop
|
||||
"""Get the default project unit of a particular unit type
|
||||
|
||||
:param ifc_file: The IFC file.
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:param unit_type: The type of unit, taken from the list of IFC unit types,
|
||||
such as "LENGTHUNIT".
|
||||
:type unit_type: str
|
||||
@@ -536,9 +536,9 @@ def convert_unit(value: float, from_unit: ifcopenshell.entity_instance, to_unit:
|
||||
:param value: The numeric value you want to convert
|
||||
:type value: float
|
||||
:param from_unit: The IfcNamedUnit to confirm from.
|
||||
:type from_unit: ifcopenshell.entity_instance.entity_instance
|
||||
:type from_unit: ifcopenshell.entity_instance
|
||||
:param to_unit: The IfcNamedUnit to confirm from.
|
||||
:type to_unit: ifcopenshell.entity_instance.entity_instance
|
||||
:type to_unit: ifcopenshell.entity_instance
|
||||
:return: The converted value.
|
||||
:rtype: float
|
||||
"""
|
||||
@@ -599,7 +599,7 @@ def calculate_unit_scale(ifc_file: ifcopenshell.file, unit_type: str = "LENGTHUN
|
||||
si_meters / unit_scale = ifc_project_length
|
||||
|
||||
:param ifc_file: The IFC file.
|
||||
:type ifc_file: ifcopenshell.file.file
|
||||
:type ifc_file: ifcopenshell.file
|
||||
:param unit_type: The type of SI unit, defaults to "LENGTHUNIT"
|
||||
:type unit_type: str
|
||||
:returns: The scale factor
|
||||
|
||||
Reference in New Issue
Block a user