ifcopenshell.api.boundary
¶
Boundaries are primarily used for representing virtual interfaces between spaces for energy analysis.
Boundaries may be associated with spaces or physical elements that enclose spaces such as walls, doors, and windows.
Submodules¶
Package Contents¶
- ifcopenshell.api.boundary.assign_connection_geometry(file: ifcopenshell.file, rel_space_boundary: ifcopenshell.entity_instance, outer_boundary: list[tuple[float, float]], location: tuple[float, float, float], axis: tuple[float, float, float], ref_direction: tuple[float, float, float], inner_boundaries: list[list[tuple[float, float]]] | None = None, unit_scale: float | None = None) None ¶
Create and assign a connection geometry to a space boundary relationship
A space boundary may optionally have a plane that represents how that space is adjacent to another space, known as the connection geometry. You may specify this plane in terms of an outer boundary polyline, zero or more inner boundaries (such as for windows), and a positional matrix for the orientation of the plane.
- Parameters:
rel_space_boundary (ifcopenshell.entity_instance) – The space boundary relationship to assign the connection geometry to.
outer_boundary (list[tuple[float, float]]) – A list of 2D points representing an open polyline. The last point will connect to the first point. Each point is represented by an interable of 2 floats. The coordinates of the points are relative to the positional matrix arguments.
inner_boundaries (list[list[tuple[float, float]]], optional) – A list of zero or more inner boundaries to use for the plane. Each boundary is represented by an open polyline, as defined by the outer_boundary argument.
location (tuple[float, float, float]) – The local origin of the connection geometry, defined as an XYZ coordinate relative to the placement of the space that is being bounded.
axis (tuple[float, float, float]) – The local X axis of the connection geometry, defined as an XYZ vector relative to the placement of the space that is being bounded.
ref_direction (tuple[float, float, float]) – The local Z axis of the connection geometry, defined as an XYZ vector relative to the placement of the space that is being bounded. The Y vector is automatically derived using the right hand rule.
unit_scale (float, optional) – The unit scale as calculated by ifcopenshell.util.unit.calculate_unit_scale. If not provided, it will be automatically calculated for you.
- Returns:
None
- Return type:
None
Example:
ifcopenshell.api.boundary.assign_connection_geometry(model, rel_space_boundary=element, outer_boundary=[(0., 0.), (1., 0.), (1., 1.), (0., 1.)], location=[0., 0., 0.], axis=[1., 0., 0.], ref_direction=[0., 0., 1.], )
- ifcopenshell.api.boundary.copy_boundary(file: ifcopenshell.file, boundary: ifcopenshell.entity_instance) ifcopenshell.entity_instance ¶
Copies a space boundary
- Parameters:
boundary (ifcopenshell.entity_instance) – The IfcRelSpaceBoundary you want to copy.
- Returns:
Duplicate of the IfcRelSpaceBoundary
- Return type:
ifcopenshell.entity_instance
Example:
# A boring boundary with no geometry. Note that this boundary is # invalid and does not relate to any space or building element. boundary = ifcopenshell.api.root.create_entity(model, ifc_class=”IfcRelSpaceBoundary”)
# And now we have two boundary_copy = ifcopenshell.api.boundary.copy_boundary(model, boundary=boundary)
- ifcopenshell.api.boundary.edit_attributes(file: ifcopenshell.file, entity: ifcopenshell.entity_instance, relating_space: ifcopenshell.entity_instance, related_building_element: ifcopenshell.entity_instance, parent_boundary: ifcopenshell.entity_instance | None = None, corresponding_boundary: ifcopenshell.entity_instance | None = None) None ¶
Modify the relationships of a space boundary relationship
Currently this function is quite minimal and offers no advantage to manual assignment of the space boundary attributes.
- Parameters:
entity (ifcopenshell.entity_instance) – The IfcRelSpaceBoundary to modify
relating_space (ifcopenshell.entity_instance) – The IfcSpace or IfcExternalSpatialElement that the space boundary is related to.
related_building_element – The IfcElement that defines the boundary, typically an IfcWall.
parent_boundary (ifcopenshell.entity_instance, optional) – A parent IfcRelSpaceBoundary, only provided if this is an inner boundary. This can apply to 1st and 2nd level boundaries.
corresponding_boundary (ifcopenshell.entity_instance, optional) – The other IfcRelSpaceBoundary on the other side of the related element. The pair together represents a thermal boundary. This only applies to 2nd level boundaries.
- Returns:
None
- Return type:
None
- ifcopenshell.api.boundary.remove_boundary(file: ifcopenshell.file, boundary: ifcopenshell.entity_instance) None ¶
Removes a space boundary
The relating space or related building element is untouched. Only the boundary and its connection geometry is removed.
- Parameters:
boundary (ifcopenshell.entity_instance) – The IfcRelSpaceBoundary you want to remove.
- Returns:
None
- Return type:
None
Example:
# A boring boundary with no geometry. Note that this boundary is # invalid and does not relate to any space or building element. boundary = ifcopenshell.api.root.create_entity(model, ifc_class=”IfcRelSpaceBoundary”)
# Let’s remove it! ifcopenshell.api.boundary.remove_boundary(model, boundary=boundary)