XbimGeometry icon indicating copy to clipboard operation
XbimGeometry copied to clipboard

Support for IIfcMaterialLayerSetUsage and mapping materials to faces?

Open Belrius opened this issue 4 years ago • 5 comments

Hi all,

MaterialLayerSetUsage uses an axis, an offset, a direction and a list of materials and their "thicknesses" to be applied to something (IfcSweptVolume for example) - in my experience something big and flat like a wall or a slab.

eg for a wall Brick 110mm Air gap 40mm Wooden Frame 90mm Plasterboard 10mm

I'm wondering if there's any support for marrying this up to the geometry and where I should look for it?

In the Xbim Explorer sample code XBimPresentation/ LayerStyling / SurfaceLayerStyler I don't really follow what's happenning but it looks like a single material is being applied to the whole mesh? It's a bit hard to tell with my models if there is a separate rendering material in the scene for each side of the wall. It doesn't look like it?

Is there any case where the mesh is split into a brick, void, wood and plaster sub meshes? For me all I really need is to identify the brick face and plasterboard face.

I'm constructing walls and slabs manually at the moment but it's getting very complicated with boolean cuts and axis mappings.

Teasing out how the materials and geometry interact has been breaking my brain. Do any of the dev team do any consulting at all where I could ask some questions and get some training?

Many thanks Andrew

Belrius avatar Aug 31 '20 05:08 Belrius

Once again in the XBimExplorer source, XBimModelPresentationExtensions and IfcMetaDataControl both reference this but they look like they are plucking out the materials rather than applying the layersets? Not sure. I'm getting a little lost.

To save a search and a couple of clicks, here is the section I'm referring to.

https://standards.buildingsmart.org/IFC/RELEASE/IFC4_1/FINAL/HTML/schema/ifcmaterialresource/lexical/ifcmateriallayersetusage.htm

Many thanks for any thoughts in advance

Andrew

Belrius avatar Aug 31 '20 07:08 Belrius

At the moment, single colour appearance is applied to the whole shape. We don't apply a per-face style from the material layer sets. Feel free to contribute if you wish. Applying material layers is more complex task than just internal-external as you need to consider wrapping on corners.

martin1cerny avatar Aug 31 '20 09:08 martin1cerny

Thanks for your reply,

How structural of a change would it be if I were to look at implementing this?

ie this would require what is currently a single mesh - ie a wall - to be broken up in to sub-meshes, each with their own material.

Is that something that would fit within the current framework, or would it require big changes to the architecture?

Also, would it need to be switchable so people who currently want the wall to have a single mesh and material would continue to have it that way?

Regards Andrew

Belrius avatar Sep 01 '20 00:09 Belrius

I'm happy to contribute.

I can see how this isn't straightforward since materials and geometry are dealt with quite separately. XBimSolid for example has no references to materials. It's the xbimShapeInstance that marries a piece of geometry with a style.

In this case, a shape is effectively subdivided by material layers, something that short circuits this approach.

Perhaps a skype call would help shortcut the process of determining how best to implement this. Email or forum discussions would progress as the rate of a couple of messages per day because of the time delay (I'm in Australia.)

Best regards Andrew

Belrius avatar Sep 01 '20 03:09 Belrius

Absolutely happy to code this, but I am sure you don't want me to just hack it in. Just a direction to help keep the API consistent would help.

Belrius avatar Sep 11 '20 06:09 Belrius