Assign multiple ifcspaces (rooms) into an ifczone (i.e. apartment)

Hello Community,
I have the following problem using geometry gym in Ghx. I am trying to group multiple rooms into an apartment using the zone component (i create a zone called apt1), then i use gg RelAssignsGroup to group the rooms into one zone. However when I open the exported ifc in the ifc openviewer I see all the object apart from the apartment, I just have 5 spaces in one floor. Attached is a sample script and a screenshot, where I create a generic, building with 5 storeys and in one floor I create rooms. Any help will be greatly appreciated
ZHAW_Model-Generate-Building&Stories&Slabs.gh (63.3 KB)

It seems your basis curve for the building wasn’t internalized correctly, so I’ve modified the script
with a basic rectangle floor perimeters.

When I did this, the spatial hierarchy seems to match what I expected in Solibri.


ZHAW_Model-Generate-Building&Stories&Slabs.gh (38.6 KB)

Note that an IfcZone is a specific sub type of an IfcGroup, so I disabled the second component.
Let me know if I’m overlooking the issue or if this helps.

Hello Jon, Thanks for the reply and the clarification. This helps a lot but I am trying to make the hierarchy visible in an online viewer (i.e. without using a proprietary software such as solibri) and for some reason the zone data does not seem to get exported even with what you did. I just see the spaces under the level 0 , but not grouped. (I below attach a couple of screenshot) . I also tried (https://openifcviewer.com/) and CAD assistant but they crash whe n I try to load the file.
Any ideas on how to make the zones visible across different platforms. I updated a bit the script to make it more clear what I am trying to achieve. Thanks a lot in advance!



ZHAW_Model-Generate-Building&Stories&Slabs.gh (70.7 KB)

I took a closer look, and made an improvement to the relationship that relates the zone with the spatial element (legacy IFC2x3 had no relationship for ifczone as it had different base class). If you can please update the plugin, this have the improvement.

But I still can not see the zone in the IfcOpenShell viewer. It seems it is not well supported in several viewers (or there is a flaw in the file I can not identify) You will have to contact the developers, let me know if there is an improvement that can be made in the IFC structure to make it work.

You can see the latest relationship in the gg ifc tree viewer to verify.

ZHAW_Model-Generate-Building&Stories&Slabs.zip (8.7 KB)

Thanks for the reply Jon! This is very helpful. I will reach out to the developers and get back to you. It would be nice to get that sorted as having spaces organized by apartment can be pretty helpful