If you're reading this, we've just migrated servers! If anything looks broken please email dion@thinkmoult.com :)

BlenderBIM reload (or reimport) IFC with changes

edited October 2022 in General

hi everyone,
I have a question regarding the BlenderBIM addon. My use case is essentially importing IFC from Archicad in order to produce renders.

Now, importing is fine, and being able to have InstanceDefinitions, selecting per IFC Class/Material/Structure is awesome,

But is there a way for me to update the geometry? Or do I have to delete what changed and import it as a new IFC project?

tried to use the Diff Calculator, but don't really know what to do with the info that is generated, if I can use it as a filter for the import of the changed design.

regardless, thank you for the awesome work and tools,
and long live open software!

Comments

  • But is there a way for me to update the geometry?
    Or do I have to delete what changed and import it as a new IFC project?

    I don't really understand the question, you modified geometry? Adn then exported it again to IFC?
    I think the philosophy, you should always use the IFC file for "saving" changes. Instead of the .blend file.

  • edited October 2022

    sorry for not making it clear. I will write down the process:

    1. model a building in archicad
    2. export from archicad to IFC, (let-s call it IFC-A)
    3. import IFC-A to blender
    4. change the design in archicad
    5. export from archicad to IFC-B (complete export again, different design)
    6. this is where my question comes at

    how do I update the geometry without having to manually search for the differences between IFC-A and IFC-B?
    because right now, I either:

    a. import everything again
    b. export only what changed to IFC-C, then delete the changed parts in blender and import the IFC-C (with the changed parts only).

  • What you want is essentially how Lumion treats an imported obj/dae right?
    it updates the model that was edited elsewhere and keeps the materials/extras done in lumion saved.
    At the moment that's not how the Ifc works in Blender and I am not sure how easy it is to make that happen?

    I think what could do that is by linking the edited portion into your own Ifc? and updating the linked Ifc every time you edit it?
    Which is more like an xref from autocad than Lumions thing

  • Per the change log, it looks like the following functionality was added at the v0.0.191129 release, but not sure if it still exists. :)
    "You can now specify an IFC Diff and do an incremental import. No need to reimport an entire file, just import the things which have changed!"

    Acekyeo
  • Unfortunately since then, the feature no longer exists. It's pretty difficult to implement it and still maintain consistent native authoring. However, if we implement it for usecases like yours where you're not doing native authoring but only enriching in Blender, then it should be an easier task to reimplement.

    If you think this is something you need urgently, we can add it to the priority list. Or even better, perhaps help sponsor development so that we can hire more dev time :)

    kyeo
  • hi, thank you for the answers,
    @Ace yeah, and also how Speckle works, it updates the geometry but keeps the material definitions intact
    @theoryshaw thank you, for the suggestion, also saw that there was a button "reload IFC" but also read either here or github that it was just a placeholder, actually I think it was Moult who answered that one as well.
    @Moult I see, thanks for the info. It would certainly be helpful! but I can do it with Speckle, just would prefer to have an offline way of doing it, not relying on any other software/service;
    And as much as I'd like to contribute, I am still a student who can barely get by, thus the only contribution would be writing code, which I am trying to get into just from watching projects such as this, Blender, Speckle, FreeCAD.

    once again thank you for your attention.

  • hi again,
    @Moult , after searching through the release notes, found the blender28-bim-200428-win version of the blenderbim addon that allows to reload the ifc file.

    Unfortunately the addon only works for 2.83, which makes sense given the timeframe. Tried to install it in B3.3, but it gives an error of IfcOpenShell not being built for 3.10, is there anyway to build that version of IfcOpenShell for the 3.10 python version, and would the addon even work after correctly building the it?

    Also, tried to have a look on the operators.py and see the differences on the implementation, it seems fairly straight forward on the old one, but was unable to implement it with the new structure of the code, I guess I just don't understand it.

    Is it possible to give any pointers on how to do it, or having a barebones implementation of it? Having the reload function would allow direct connection between Blender and other BIM software for archviz which is a huge industry, and possibly bigger adoption of different architecture studios to Blender. I know that's not the main goal of your project, using propriatery BIM software joint with Blender, but it could bring more and more people into it!

    thanks you for your time.

  • The following commits is a barebones implementation:

    To use it, imagine you currently have old.ifc loaded, and you've now received an updated new.ifc. Don't overwrite old.ifc, keep the two files separate. Then press the "Reload" button and browse to new.ifc. Wait a little bit (open the console to see what's happening) and cross your fingers.

    If we're lucky, it works. This has had only very basic testing done so good luck :)

    AcetheoryshawMartin156131Flies_Eyes
  • Thank you for the fast response, and for the implementation!
    Going to use it today on the job and see if any issue comes up,

    cheers

  • This is immensely useful! I usually get IFC files exported from Revit and assign materials and such while changes are still being made. Thanks for your implementation Moult.

  • I have a similar need as the one that started this thread, so I'll ask my question here and if it is not the same function you can tell me and I'll repost as a new thread.
    The challenge is to
    1) produce a diff IFC file which is only the items which changed since the last time the file was opened. i.e Start.ifc + diff.ifc = working version.
    2) in a different blender session which has loaded Start.ifc, load that diff.ifc file and patch the currently loaded IFC project in BlenderBIM so that the edited version is visible in the blender window (ie the patch edits what you see).
    3) Only for bonus points :-) - The diff is a byte stream in memory, not written to a disc file at any stage.

    I tried loading the IFC and just adding the items across into the current file, but they don't retain hierarchy automatically. Also the references between objects carry across a local id() which is not valid in the destination file.
    I tried the ifc_importer with the settings set to merge by class but it still duplicated all objects even where they had the same GlobalID.

    Based on Moult's reply https://community.osarch.org/discussion/comment/13211/#Comment_13211 there is supposed to be built in support for patching (merging) files without duplication in BlenderBIM already. However it is not in the last release (0.0.20231104).
    1) Would switching to a symlinked "unstable" release of blenderbim get me the latest version including Moult's changes?
    2) What other changes would be needed in BlenderBIM to support the above use case (using files)?
    Appreciative of any tips from developers more experienced with BlenderBIM.

    Flies_Eyes
Sign In or Register to comment.