ifcopenshell.api.grid.create_axis_curve
¶
Module Contents¶
- ifcopenshell.api.grid.create_axis_curve.create_axis_curve(file: ifcopenshell.file, *, p1: ifcopenshell.util.shape_builder.VectorType, p2: ifcopenshell.util.shape_builder.VectorType, grid_axis: ifcopenshell.entity_instance, is_si: bool = True) None ¶
Adds curve geometry to a grid axis to represent the axis extents
An IFC grid will have a minimum of two axes (typically perpendicular). Each axis will then have a line which represents the extents of the axis.
- Parameters:
p1 – The first point of the grid axis
p2 – The second point of the grid axis
grid_axis – The IfcGridAxis element to add geometry to.
is_si – If true, the points are in meters, not project units
Example:
# A pretty standard rectangular grid, with only two axes. grid = ifcopenshell.api.root.create_entity(model, ifc_class="IfcGrid") axis_a = ifcopenshell.api.grid.create_grid_axis(model, axis_tag="A", uvw_axes="UAxes", grid=grid) axis_1 = ifcopenshell.api.grid.create_grid_axis(model, axis_tag="1", uvw_axes="VAxes", grid=grid) # By convention, alphabetic grids are horizontal, and numeric are vertical ifcopenshell.api.grid.create_axis_curve( model, p1=np.array((0., 0., 0.)), p2=np.array((10., 0., 0.)), grid_axis=axis_a) ifcopenshell.api.grid.create_axis_curve( model, p1=np.array((0., 0., 0.)), p2=np.array((0., 10., 0.)), grid_axis=axis_1)