IfcPatch ExtractElements recipe misses the material
I have played with ifcpatch. Awesome tool ... see https://community.osarch.org/discussion/10/ifcpatch-tool-now-available If a IfcWallStandardCase is extracted with a GUID query into a new ifc this IfcWallStandardCase misses a material. According https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/FINAL/HTML/ifcsharedbldgelements/lexical/ifcwallstandardcase.htm a IfcWallStandardCase has to have a IfcMaterialLayerSetUsage. The file created with ifcpatch does not have this thus it is not Standard thus it is not read by CAD Nemetschek Allplan. I do not know if it true but at least it is what Support of Nemetschek Allplan told me.
There is a simple workaround, just make a IfcWall out of the IfcWallStandardCase.
Does it makes senst to make this automatically by ifcpatch?
cheers bernd
Comments
found it ...
https://standards.buildingsmart.org/IFC/DEV/IFC4_2/FINAL/HTML/schema/ifcsharedbldgelements/lexical/ifcwallstandardcase.htm
The material of the wall is defined by the IfcMaterialLayerSetUsage and is attached by the IfcRelAssociatesMaterial objectified relationship. It is accessible by the inverse HasAssociations relationship. The material layer set usage has to be given (enforced by where rule).
Note that the ExtractElements recipe is only one of many capabilities of IfcPatch. Adding support for extracting the relevant material makes sense in all cases - not just IfcWallStandardCase :) Would you be interested in submitting a PR for the recipe here? https://github.com/IfcOpenShell/IfcOpenShell/blob/3eacd809b0dc0c4d03d4675f3f64a509cb27789f/src/ifcpatch/ifcpatch/recipes/ExtractElements.py
If you don't have time for a PR, do you mind creating a bugreport? That way it gets added to the todo list :)
changed the forum topic title in this regard.
Thanks for showing the module where to do the extension. I'll see what I can do. Still not had the time to have a look at new BT which is near the top of my ToDo ...
https://github.com/IfcOpenShell/IfcOpenShell/issues/1347