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: numpy.typing.NDArray) numpy.typing.NDArray ¶
- execute(outer_profile: numpy.typing.NDArray, inner_profiles: list[numpy.typing.NDArray], name: str | None)¶
- file: ifcopenshell.file¶
- ifcopenshell.api.profile.add_arbitrary_profile_with_voids.add_arbitrary_profile_with_voids(file: ifcopenshell.file, outer_profile: ifcopenshell.util.shape_builder.SequenceOfVectors, inner_profiles: list[ifcopenshell.util.shape_builder.SequenceOfVectors], 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 – 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
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")