ifcopenshell.api.geometry.add_railing_representation

Module Contents

class ifcopenshell.api.geometry.add_railing_representation.Usecase
convert_si_to_unit(value)
execute()
path_si_to_units(path)

converts list of vectors from SI to ifc project units

ifcopenshell.api.geometry.add_railing_representation.add_railing_representation(file: ifcopenshell.file, *, context: ifcopenshell.entity_instance, railing_type: Literal['WALL_MOUNTED_HANDRAIL'] = 'WALL_MOUNTED_HANDRAIL', railing_path: list[mathutils.Vector], use_manual_supports: bool = False, support_spacing: float | None = None, railing_diameter: float | None = None, clear_width: float | None = None, terminal_type: Literal['180', 'TO_END_POST', 'TO_WALL', 'TO_FLOOR', 'TO_END_POST_AND_FLOOR'] = '180', height: float | None = None, looped_path: bool = False, unit_scale: float | None = None) ifcopenshell.entity_instance

Units are expected to be in IFC project units.

Parameters:
  • context (ifcopenshell.entity_instance) – IfcGeometricRepresentationContext for the representation.

  • railing_type (Literal["WALL_MOUNTED_HANDRAIL"], optional) – Type of the railing. Defaults to “WALL_MOUNTED_HANDRAIL”.

  • railing_path (list[Vector], optional.) – A list of points coordinates for the railing path, coordinates are expected to be at the top of the railing, not at the center. If not provided, default path [(0, 0, 1), (1, 0, 1), (2, 0, 1)] (in meters) will be used

  • use_manual_supports (bool, optional) – If enabled, supports are added on every vertex on the edges of the railing path. If disabled, supports are added automatically based on the support spacing. Default to False.

  • support_spacing (float, optional) – Distance between supports if automatic supports are used. Defaults to 1m.

  • railing_diameter (float, optional) – Railing diameter. Defaults to 50mm.

  • clear_width (float, optional) – Clear width between the railing and the wall. Defaults to 40mm.

  • terminal_type (Literal["180","TO_END_POST","TO_WALL","TO_FLOOR","TO_END_POST_AND_FLOOR"], optional) – type of the cap. Defaults to “180”.

  • height (float, optional) – defaults to 1m

  • looped_path (bool, optional) – Whether to end the railing on the first point of railing_path. Defaults to False.

  • 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:

IfcShapeRepresentation for a railing.

Return type:

ifcopenshell.entity_instance

ifcopenshell.api.geometry.add_railing_representation.mm(x: float) float

mm to meters shortcut for readability