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

Open large IFC model without it's geometry data

I've got a large IFC model of 1.9GB and I run out of memory when opening this model (Blue screen of death).
Is there an option of ignoring all the geometry data when using IfcOpenshell's Open function? I'm only interested in it's alphanumerical data.

Tagged:

Comments

  • edited June 2023

    There is an open Issue regarding a related topic in the git repo. See https://github.com/IfcOpenShell/IfcOpenShell/issues/2025

    It would be cool to load an IFC file in IfcOpenShell without the geometry. However, I think currently that is not possible.

    One hacky way would be treating the IFC File first as text and deleting with a script all lines with the geometry enttiy's like IfcCartesianPoints and afterwards loading it in IfcOpenShell. Sure, you would have possible orphaned entity's and/or an invalid IFC File, however the size of the file would be smaller and IfcOpenShell should be able to open it, and you can get to the alphanumerical data. If you try that, please do that to a copy of your IFC File :)

  • It's proprietary, but simplebim has a solution for decreasing IFC file size: https://support.simplebim.com/04-clean-up-models/

  • @Martin156131 said:
    There is an open Issue regarding a related topic in the git repo. See https://github.com/IfcOpenShell/IfcOpenShell/issues/2025

    It would be cool to load an IFC file in IfcOpenShell without the geometry. However, I think currently that is not possible.

    One hacky way would be treating the IFC File first as text and deleting with a script all lines with the geometry enttiy's like IfcCartesianPoints and afterwards loading it in IfcOpenShell. Sure, you would have possible orphaned entity's and/or an invalid IFC File, however the size of the file would be smaller and IfcOpenShell should be able to open it, and you can get to the alphanumerical data. If you try that, please do that to a copy of your IFC File :)

    Exactly, that’s my first solution as well. I will be looking into that next week.

    Martin156131
  • @theoryshaw said:
    It's proprietary, but simplebim has a solution for decreasing IFC file size: https://support.simplebim.com/04-clean-up-models/

    @theoryshaw said:
    It's proprietary, but simplebim has a solution for decreasing IFC file size: https://support.simplebim.com/04-clean-up-models/

    Very interesting, but how can we do this with IfcOpenshell instead of SimpleBim. It would be cool if we had another ifcopenshell.open function where we can do some pre-processing and not load any geometry data at all.

  • FreeCAD Native IFC has this capability to import without its geometry / shape. See if it works for you -

    https://community.osarch.org/discussion/263/freecad-bim-development-news-by-yorik#latest

  • @chachi_ws running out of memory should not cause a BSoD. If it does, we should investigate further.

    When you load your model, can you "Enable Advanced Mode" in the file select dialog? See https://blenderbim.org/docs/users/dealing_with_large_models.html#filtered-model-loading - that will determine whether or not it is the geometry which is the problem, or the fundamental memory usage which is the problem.

  • @paullee said:
    FreeCAD Native IFC has this capability to import without its geometry / shape. See if it works for you -

    https://community.osarch.org/discussion/263/freecad-bim-development-news-by-yorik#latest

    How does FreeCAD do that? I thought internally it also uses IfcOpenShell to load the .ifc file. Does it still load the .ifc file fully in memory? However, it does just not shows the geometry in the viewport of FreeCAD?

  • @Martin156131 said:

    @paullee said:
    FreeCAD Native IFC has this capability to import without its geometry / shape. See if it works for you -

    https://community.osarch.org/discussion/263/freecad-bim-development-news-by-yorik#latest

    How does FreeCAD do that? I thought internally it also uses IfcOpenShell to load the .ifc file. Does it still load the .ifc file fully in memory? However, it does just not shows the geometry in the viewport of FreeCAD?

    You may check Yorik github to see if can find anything.

    Or @yorik can tell ? : )

  • How does FreeCAD do that? I thought internally it also uses IfcOpenShell to load the .ifc file. Does it still load the .ifc file fully in memory? However, it does just not shows the geometry in the viewport of FreeCAD?

    Exactly that :) After you load the file that way, you can load the shape of individual elements.

  • For reference, IFC Schependomlaan.ifc 47MB load on my >10 years old i3 in 5 seconds.
    No Shape (geometry), no COIN representation.




  • Then, can load individual Coin Representation or Shape (Geometry), e.g.

  • I'd just like to emphasize there are two aspects here: memory to simply open a model, and memory to process its geometry. In the case of https://github.com/IfcOpenShell/IfcOpenShell/issues/2025 this refers to running out of memory just the open a model, regardless of processing geometry. This is no different in FreeCAD or the BlenderBIM Add-on, since it relies purely on the call to ifcopenshell.open(). I think this is what @chachi_ws is talking about.

    There is now a very, very experimental stream option for ifcopenshell.open(fn, should_stream=True) and if you tweak the stream.py file you can set it to exclude geometry classes too. This should allow you to start parsing huge files with a significantly lower footprint. See here for tradeoffs: https://github.com/IfcOpenShell/IfcOpenShell/issues/2025#issuecomment-1609562467 - I'd love to hear if you manage to get anywhere with this method.

    You can also combine the stream option with disabling geometry to get a "semi-geometrical" model in the BlenderBIM Add-on with a lower memory footprint. Notice you still even have access to all the properties etc in the UI, which are streamed on demand:

    Acecarlopavpaullee
Sign In or Register to comment.