ifcopenshell.api.profile.add_arbitrary_profile_with_voids

Module Contents

class ifcopenshell.api.profile.add_arbitrary_profile_with_voids.Usecase
convert_si_to_unit(co)
execute()
ifcopenshell.api.profile.add_arbitrary_profile_with_voids.add_arbitrary_profile_with_voids(file: ifcopenshell.file, outer_profile: list[tuple[float, float]], inner_profiles: list[list[tuple[float, float]]], name: str | None = None) ifcopenshell.entity_instance

Adds a new arbitrary polyline-based profile with voids

The outer profile is represented as a polyline defined by a list of coordinates. Only straight segments are allowed. Coordinates must be provided in SI meters.

To represent a closed curve, the first and last coordinate must be identical.

The inner profiles are represented as a list of polylines. Every polyline in defined by a list of coordinates. Only straight segments are allowed. Coordinates must be provided in SI meters.

Parameters:
  • outer_profile – A list of coordinates

  • inner_profiles – A list of polylines

  • name (str, optional) – If the profile is semantically significant (i.e. to be managed and reused by the user) then it must be named. Otherwise, this may be left as none.

Returns:

The newly created IfcArbitraryProfileDefWithVoids

Return type:

ifcopenshell.entity_instance

Example:

# A 400mm by 400mm square with a 200mm by 200mm hole in it.
square_with_hole = ifcopenshell.api.profile.add_arbitrary_profile_with_voids(model,
    outer_profile=[(0., 0.), (.4, 0.), (.4, .4), (0., .4), (0., 0.)],
    inner_profiles=[[(0.1, 0.1), (0.3, 0.1), (0.3, 0.3), (0.1, 0.3), (0.1, 0.1)]],
    name="SK01 Hole Profile")