B
by Buttar on 22 Jul 2020, edited 8 Aug 2021
#
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

B
by Buttar on 22 Jul 2020
#
finally, i import my IFC export OBJ, then export my Obj to IFC 4, its overwrite all my associated data.
M
by Moult on 22 Jul 2020
#
@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 :)
B
by Buttar on 23 Jul 2020, edited 23 Jul 2020
#
+1 votes
@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 ;)
S
by shanmama on 30 Jul 2020
#
your needs could be simply summarized as "partial information extraction"?
T
by tobenz on 7 Aug 2021
#
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.
M
by Moult on 7 Aug 2021
#
@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.
T
by tobenz on 8 Aug 2021
#
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.?
M
by Moult on 8 Aug 2021
#
@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