Objects Disappear from Assemblies When Setting Storey
Hey everyone,
I have a script that uses 'Linked Duplicates' to duplicate assemblies (IfcElementAssembly) and distribute houses in a development. This script relies on the assemblies working correctly.
I need to assign objects within these assemblies to their respective storeys (IfcBuildingStorey), but when I do that, the objects are removed from the assemblies, breaking my 'Linked Duplicates' script.
Is there a way to assign objects to storeys without them being removed from assemblies, so my 'Linked Duplicates' script continues to work?
Is this removal of the relationship when setting the storey intentional (to follow good practices or the IFCSchema), or is it a bug in the addon?
Any help would be greatly appreciated! This script is crucial for my workflow.
Comments
I could be wrong, but duplicating the IfcElementAssembly does not automatically duplicate its component elements (I remember trying this a long time ago and it didn't work). Maybe IfcElementAssemblyType is the correct way.
Correct, ctrl+d does not duplicate the components, crtl + shift + d makes a linked duplicate that duplicates components. See https://github.com/IfcOpenShell/IfcOpenShell/pull/3328. I believe Ifcassemblytype can't have geometry, just psets. My problem is just I can't change the spatial container of the elements inside the assembly
I don't think you can do this currently...
I actually think you can't do this via the IFC schema either unfortunately.
related: https://github.com/buildingSMART/NextGen-IFC/issues/61
I wonder if it's worth coming up with an approach to do 'linked groups'. IfcGroups allow for a more flexible mechanism to logically group elements without enforcing a containment hierarchy. I think freecad does this. It's not officially supported by IFC, but this 'problem' has come up again and again and again. Ping @yorik
@theoryshaw What actually link the "linked aggregates" are IfcGroups, most of the logic is already there. So, it seems possible, but I would have to check before confirming. Could you please create an issue as a feature request?
For now, maybe it’s worth using spatial reference as discussed here: https://community.osarch.org/discussion/comment/24421/#Comment_24421
@yorik how does FreeCAD codify its 'linked groups'?
I'm thinking this would be a good first standard property!
@bruno_perdigao, @theoryshaw: should I create the issue? I'm newbie, but if needed I will try.
I've read the discussion, I will try the references, but for that I think I will need to dismantle my assembly and assign the objects to subspaces. The duplication method will be similar to the linked duplicates: ctrl-shift-D?
Thanks!
go for it, always go for it. :)
Done. I posted a simple gif, i think it shows what i mean: https://github.com/IfcOpenShell/IfcOpenShell/issues/6514
created an issue for 'Linked Ifcgroups': https://github.com/IfcOpenShell/IfcOpenShell/issues/6542