Applying Ifc Class to Blender geometry

I had a Cube in a Collection outside of the IFC Collection. I applied a IfcSlab. It appears in my "My Story" Collection as expected. But it is still also in its source Collection outside. It appears in both Collections, but not in an instanced or referenced sense, if I delete/hide/move one, both do. "Both" is the same.

I had expected that by assigning the Class, it would just jump over to the IFC Collection.
I can delete the assignment to initial Collection in Object Properties so it only appears in the target IFC Collection only, but wonder about that default behavior. Is there an important use case ?

If I create the Blender Geometry in or move it over to an appropriate IFC Collection before I assign an IFC Class, I will end with a single IFC Geometrie, as expected.

I am still doing hard with the meaning of Blenders feature of simultaneous existence in more than one Collection and honestly never missed such a feature before. Besides such multi-Story-spanning Elements, but then it is a "reference", so distinguished, references but only one original.

So if I have an existing Blender Model that I need to "bimify", I have to either move the objects in the IFC Collection before tagging, or get rid of the initial Collections (deleting if applicable) or their assignments ?

Comments

  • edited November 2025

    @zoomer
    I don't deal with non-IFC element very often, but I normally ignore Scene Collection and stick to Spatial Decomposition, if you have some funny behavior in Collections, save your work and open the .ifc file back again to see all in the right place, no duplicates in "collections".

    If I had geometries to "BIMify" I'd set the default storey, select the geometries, assign IfcElement or IfcElementType accordingly from Add > Ifc Element (top menu-my favourite) or Object Information > Object Metadata (Scene menu).

    I tend to stay away from fidgeting with Scene collection as much as possible, but maybe it's because I don't use vanilla Blender that much.

    Cheers

    zoomer
  • I tend to stay away from fidgeting with Scene collection as much as possible, but maybe it's because I don't use vanilla Blender that much.

    And when I tried to test - I intentionally created the Blender Cube in a Blender Collection - as I did not want to fidget in Bonsai's IFC Collections to avoid problems :-)

    Object Information > Object Metadata (Scene menu)

    That's what I did.

    from Add > Ifc Element (top menu-my favourite)

    Thank you.
    Cool, forgot about this and thought it is for new Bonsai geometry only ....

    if you have some funny behavior in Collections, save your work and open the .ifc file back again to see all in the right place, no duplicates in "collections".

    Ok, have to test that, very excited to see what will happen with duplicates.

    But currently it is hard to test as Blender crashes so often for me, at least after an Undo in Bonsai.
    (Have a Bug Report running)

    steverugi
  • This PR removes an object from non-IFC collections after IFC class assignment.
    https://github.com/IfcOpenShell/IfcOpenShell/pull/7422
    I'm wondering if this will throw a glitch, however, into anyone's current workflows.
    Only one way to find out, i guess. :)

    zoomersteverugi
  • edited November 2025

    OK, I tested, when you save the IFC and close - reopen the IFC, the IFC ghosts outside of the IFC Collections also went away.

    But as at first I had some issues with "saving" and lost my test object ....
    So @theoryshaw can you please again elaborate on the Blender/Sync thing ... ?

    Potentially I have saved the Blend instead of the IFC .... When I then also save the IFC .... did I create an unexpected sync ?

    When I want a sync ..... AFAIR that meant to save the Blend file ?
    And did I get that right that, with such sync, CMD+S saving the Blend will also save the IFC ?

  • CMD+S saving the Blend will also save the IFC.

    yes it does.

    zoomer
  • if synced together"

    But do I need to do something special to make them synced together ?
    (Like saving the Blend under the same name as the IFC ?)

  • edited November 2025
    • open an .ifc file anew.
    • then go to the following. This will prompt you to save the .blend file.

    • After that, when you use the following, it will save both the .ifc/.blend file together. Yes, these steps could probably be a little more obvious.

    zoomer
  • edited November 2025

    Hoooh, you (Windows) have even the same Short Cuts for saving Blend and IFC ....
    Here saving Blend is CMD+S while saving IFC is CTRL+S ....

    OK, first opening an IFC, saving a Blend and then saving the IFC

    Yes, these steps could probably be a little more obvious.

    I agree. I think it would be worth an extra entry, to just sync or un-sync a project (with a warning that it's likely brittle. And some indicator if a project is or not in sync.

    Will have to play with that. If it reliably opens an IFC inside its Blend Sibling, what if one or other missing, .....

  • And some indicator if a project is or not in sync.

    There's already one for this in the code base... it's actually quite sensitive, and i sometimes ignore it. ha.

  • edited November 2025

    OK - I'm in sync ....

    Hmmh, saving a Blend with IFC content as Blend, doing IFC changes and saving the IFC (offers the Blend Name) works.

    When saving the Blend (CMD+S) - this will not save the IFC (CTRL+S)
    When saving the IFC - this will also save the Blend !

    When opening the IFC - it will not open IFC inside synced Blend.
    When opening the Blend - it will contain the synced IFC !

    Had a Typo in File Names - changed both files names equally - Sync broken.
    Loaded the IFC into Blend again - did IFC work - saved IFC - Files synced again.
    Closing and reopening project - "IFC out of date Warning" keeps staying
    Saving IFC without IFC changes - does not save Blend !?
    Saving IFC with(!) IFC changes - does (!) save Blend

    Make copy of Blend with different name - Start Project Blend copy - all IFC stuff still in there and still being IFC - still in sync !

    Makes me see lots of UI/UX improvements.
    But nevertheless I still think Sync would be a great feature and very helpful.

    Bedson
Sign In or Register to comment.