merge IFCs

Hello,

as part of our work on operational safety.
I will need to between them, I have done some tests. I can't save some in IFC (2x3 or 4). I then want to cut the model to only keep only one area. to finish adding vehicles and characters.
for the moment I don't need the associated info, only geometry.

thanks in advance

Comments

  • finally, i import my IFC export OBJ, then export my Obj to IFC 4, its overwrite all my associated data.

  • @Buttar glad to hear it works :)

    I'm in the process of writing a model merger IfcPatch script... but I didn't consider merging between IFC versions - I will consider it now and let you know how it goes :)

  • edited July 2020

    @Moult don't panic for the moment I managed to help myself.
    it would be nice to be able to work on blender only in IFC ;)

    Moult
  • your needs could be simply summarized as "partial information extraction"?

  • Is there a way to overwrite existing elements if GUIDs are equal, just by using the owner history? I am working on an incremental IFC export that only uses the latest changes to prevent Revit from creating the same messy geometry over and over again.

  • @tobenz in theory, yes, no issues with that. In fact, that is how a "reload" would be implemented (which hasn't been implemented yet).

    ifcopenshell.util.element has some neat tricks like replace_attribute you can use.

  • So when merging the two files I have to go through all the modified elements (or deleted) and either replace it or deep remove, am I right? The deep remove should check if other element depend on the traversed pset etc.?

  • @tobenz at a high level, yes. I would check modified elements using IfcDiff, as owner history cannot be trusted from proprietary software as they do not sufficiently keep track of it.

    However, the details are a bit more complicated. Deep removal is complex and is much more than a one-liner. I recommend you look at the existing root.remove_product API usecase and especially investigate the "TODO" comment at the bottom and help make it more robust. https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.6.0/src/ifcopenshell-python/ifcopenshell/api/root/remove_product.py

Sign In or Register to comment.