xBimTeam / XbimEssentials

A .NET library to work with data in the IFC format. This is the core component of the Xbim Toolkit
https://xbimteam.github.io/
Other
477 stars 171 forks source link

Possibility of splitting IFC file into a few pieces #550

Closed filiplukovic closed 4 months ago

filiplukovic commented 4 months ago

Hi. Could you please confirm if the xBIM library can be used to split one large IFC file into a few smaller pieces? The idea is to split one IFC file by spatial (building, story, or zone) or by another user-defined criteria. The important part is that all geometry, textures, properties, and other metadata must kept as original.

andyward commented 4 months ago

Have you seen https://github.com/xBimTeam/XbimEssentials/blob/master/Xbim.Ifc/Extensions/IfcStoreCopyItemsExtensions.cs ?

If you can identify the IfcProducts you want to extract (by their spatial relationships) this Extension menthod should do the rest for you out the box, including copying geometry, Psets, Styles etc.

This in turn uses the IModel.InsertCopy low level function. If the Extension method doesn't quite do what you want it should be possible to create your own copy with an updated Filter() method. The lower level InsertCopy method is documented

filiplukovic commented 4 months ago

I'll check that. Thank you.