Hi everyone,
I want to assign an alignment to a blender curve to create a reference system for distributing prefabricated elements in an infrastructure job.
Why does the IfcAlignment class not appear as an option for assignment?
I'm using Blender 3.6, blenderbim-230701-py310-linux and IFC 4.3.
I tried with the script:
import bpy
import blenderbim.tool as tool
from ifcopenshell.api import run
model = tool.Ifc.get()
project = model.by_type("IfcProject")[0]
site = model.by_type("IfcSite")[0]
axis_obj = bpy.context.active_object #with curve selected
settings = {
"context": project.RepresentationContexts[0],
"blender_object": axis_obj,
"geometry": axis_obj.data,
"coordinate_offset": None,
"total_items": 1,
"unit_scale": None,
"should_force_faceted_brep": False,
"should_force_triangulation": False,
"should_generate_uvs": False,
"ifc_representation_class": "IfcGeometricCurveSet/IfcTextLiteral",
"profile_set_usage": None,
"text_literal": None,
}
ifc_alignemt = run("root.create_entity", model, ifc_class="IfcAlignment")
representation = run("geometry.add_representation", model, settings)
run("geometry.assign_representation", model, product=ifc_alignemt, representation=representation)
run("aggregate.assign_object", model, relating_object=site, product=ifc_alignemt)
But it's not working.
Every help is welcome. Thanks