How to assign IfcAlignment to an object?

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

Comments

  • I could be wrong, but i don't think alignment is fully supported yet.
    https://github.com/search?q=repo:IfcOpenShell/IfcOpenShell+ifcalignment&type=issues
    ...if you want to read some back conversations.

  • Thanks @theoryshaw for the quick reply.
    Ok, I think the prototype proposed in https://github.com/IfcOpenShell/IfcOpenShell/pull/1480/files focused on the methods for creating the curves for the use cases in IfcRoad and IfcRailway.
    My use case would be included in item 1 and 3 of the semantic definition of the class, using "IfcPolyline or IfcIndexedPolyCurve as a 3D alignment by a 3D polyline representation " as shape.

    My job: Modeling a river channel under an avenue with intense traffic in Belo Horizonte, Brazil.
    The project was done a long time ago in CAD, so the probability of interference of the work with the existing structures and with the traffic are immense, so this is a good opportunity to implement BIM (mainly 4D and 5D).
    Prefabricated elements will be used that will be positioned precisely along an axis that follows the axis of the track, but may vary due to the interferences encountered.
    Perhaps using IfcAlignment with some Blender features (Geometric Nodes, E.G.) could give me a parametric way to make changes when needed.
    My understanding of the IFC class may be wrong, but I think it would not be correct to use IfcAxis in this case.

    What do you think?
    Thanks

    Ace
  • @walpa indeed the alignment development work to date has focused on reading semantic alignment data from an existing file more so than authoring an alignment from blender geometry. That being said there is no better way to improve the current state of the blenderBIM add-on than to test it on an actual project.

    From your description it sounds like you are looking to use IfcLinearPlacement to position the prefabricated elements by station along an alignment - correct?

  • @civilx64 That's exactly it, I'm trying to apply BB in a real and large project. I'm still at the very beginning and I intend to publish my journey soon.

    @civilx64 said:
    From your description it sounds like you are looking to use IfcLinearPlacement to position the prefabricated elements by station along an alignment - correct?

    Yes, that's the objective, but since I still don't have the contractor's "BIM Mandate", I don't know which option to use yet.

    Your suggestion is a good one, if the model is not going to follow IFC4.3 or there is no clear definition on the part of the contracting party, I will follow that path.

    IfcAlignment, perhaps, would make more sense if in the future it was necessary to make some calculation of the flow velocity of the water in the channel. I think it would be closer to the semantic definition.

    I don't know, everything is learning. :)

    Tks

  • @walpa I'm managed to implement IfcAlignment, IfcLinearPlacement with IfcPointByDistanceExpression, IfcCurveSegment with IfcCircle, IfcLine, IfcClothoid as parent curves and IfcPolyline and IfcIndexedPolyline in the IfcOpenShell 0.8.0 C++ code. This might be 6 months too late for your project, but I'd like to have someone put it to use so bugs can be found and addressed.

    theoryshawArvsteverugiatomkarinca
  • Awesome, Very cool!
    I'd love to test, if there's somewhat an interface to do so, via BlenderBIM.

  • @theoryshaw that is somewhat outside of my expertise. I've been focused on the C++ end. I know you can work with the python code bindings.

    theoryshaw
  • No worries. Nice work!

  • Hi @Rick_Brice,

    @theoryshaw said:
    Awesome, Very cool!

    I completely agree!

    @theoryshaw said:
    I'd love to test, if there's somewhat an interface to do so, via BlenderBIM.

    Me too...

Sign In or Register to comment.