I am relatively new to Ruby programming and I would like to ask a question related to my recent research about handling the IFC import for building analysis purposes (see below).
IFC is imported as several nested components and I would like to explode these components up to a certain hierarchical level. I was thinking the easiest way would be to search them by name, like “if i.name =~ /IfcStorey/” and then explode the components which have these names. But I am having hard time writing the code itself.
Be aware that in SketchUp, IFC (and any other classification) assignments are made at the component definition level.
This means that exploding any component instance(s) will lose all classification attributes, and any associated name property (either instance name or definition name.) This is because they just become loose geometry.