ifcopenshell.api.geometry.add_slab_representation

Module Contents

class ifcopenshell.api.geometry.add_slab_representation.Usecase
apply_clippings(first_operand)
convert_si_to_unit(co)
create_item()
execute()
file: ifcopenshell.file
settings: dict[str, Any]
ifcopenshell.api.geometry.add_slab_representation.add_slab_representation(file: ifcopenshell.file, context: ifcopenshell.entity_instance, depth: float = 0.2, direction_sense: str = 'POSITIVE', offset: float = 0.0, x_angle: float = 0.0, clippings: list[ifcopenshell.util.data.Clipping | dict[str, Any]] | None = None, polyline: list[tuple[float, float]] | None = None) ifcopenshell.entity_instance

Add a geometric representation for a slab.

Parameters:
  • context – The IfcGeometricRepresentationContext for the representation, only Model/Body/MODEL_VIEW type of representations are currently supported.

  • depth – The slab depth, in meters.

  • x_angle – The slope angle along the slab’s X-axis, in radians.

  • clippings – List of planes that define clipping half space solids. Clippings can be Clipping objects or dictionaries of arguments for Clipping.parse.

Returns:

IfcShapeRepresentation.

Example:

context = ifcopenshell.util.representation.get_context(ifc_file, "Model", "Body", "MODEL_VIEW")
clippings = [ifcopenshell.util.data.Clipping(location=(0.0, 0.0, 0.1), normal=(0.0, 0.0, 1.0),)]
representation = ifcopenshell.api.geometry.add_slab_representation(ifc_file, context, depth=0.2, clippings=clippings)
ifcopenshell.api.geometry.assign_representation(ifc_file, product=element, representation=representation)