ifcopenshell.api.grid.create_axis_curve

Module Contents

class ifcopenshell.api.grid.create_axis_curve.Usecase
convert_si_to_unit(co)
create_cartesian_point(x, y, z=None)
execute()
ifcopenshell.api.grid.create_axis_curve.create_axis_curve(file: ifcopenshell.file, axis_curve: bpy.types.Object, grid_axis: ifcopenshell.entity_instance) None

Adds curve geometry to a grid axis to represent the axis extents

This currently depends on the Blender geometry kernel to function.

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:
  • axis_curve (bpy.types.Object) – The Blender object that contains a mesh data block with a single edge.

  • grid_axis (ifcopenshell.entity_instance) – The IfcGridAxis element to add geometry to.

Returns:

None

Return type:

None

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)

# Assume you have these Blender objects in your active Blender session
obj1 = bpy.data.objects.get("AxisA")
obj2 = bpy.data.objects.get("Axis1")
ifcopenshell.api.grid.create_axis_curve(model, axis_curve=obj1, grid_axis=axis_a)
ifcopenshell.api.grid.create_axis_curve(model, axis_curve=obj2, grid_axis=axis_1)