ifcopenshell.api.profile.add_arbitrary_profile
¶
Module Contents¶
- class ifcopenshell.api.profile.add_arbitrary_profile.Usecase¶
- convert_si_to_unit(co: numpy.typing.NDArray) numpy.typing.NDArray ¶
- execute(profile: numpy.typing.NDArray, name: str | None)¶
- file: ifcopenshell.file¶
- ifcopenshell.api.profile.add_arbitrary_profile.add_arbitrary_profile(file: ifcopenshell.file, profile: ifcopenshell.util.shape_builder.SequenceOfVectors, name: str | None = None) ifcopenshell.entity_instance ¶
Adds a new arbitrary polyline-based profile
The 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.
- Parameters:
profile – A list of coordinates
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 IfcArbitraryClosedProfileDef
Example:
# A 10mm by 100mm rectangle, such that might be used as a wooden # skirting board or kick plate. square = ifcopenshell.api.profile.add_arbitrary_profile(model, profile=[(0., 0.), (.01, 0.), (.01, .1), (0., .1), (0., 0.)], name="SK01 Profile")