ifcopenshell.api.boundary

Boundaries are primarily used for representing virtual interfaces between spaces for energy analysis.

Submodules

Package Contents

ifcopenshell.api.boundary.assign_connection_geometry(file, rel_space_boundary=None, outer_boundary=None, inner_boundaries=None, location=None, axis=None, ref_direction=None, unit_scale=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[list[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[list[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 (list[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 (list[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 (list[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.run("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, boundary=None) None

Copies a space boundary

Parameters:

boundary (ifcopenshell.entity_instance) – The IfcRelSpaceBoundary you want to copy.

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.run(“root.create_entity”, model, ifc_class=”IfcRelSpaceBoundary”)

# And now we have two boundary_copy = ifcopenshell.api.run(“boundary.copy_boundary”, model, boundary=boundary)

ifcopenshell.api.boundary.edit_attributes(file, entity=None, relating_space=None, related_building_element=None, parent_boundary=None, corresponding_boundary=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, boundary=None) 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.run(“root.create_entity”, model, ifc_class=”IfcRelSpaceBoundary”)

# Let’s remove it! ifcopenshell.api.run(“boundary.remove_boundary”, model, boundary=boundary)