[BlenderBIM] IfcMaterial Management
Several questions which are related
1) Is there a possiblity to assign an IfcMaterial on the IFC4 Demo Library? I would like to have a "brick" or "concrete" wall in the library. Or a country specific library.
2) Is there a way to manage multiple IFC materials through a spreadsheet or something similar? Or are people working an an IfcMaterial Library I'm not aware off? With render and hatch preview of surface and section hatch patterns.. Similar to the Revit material library I think.
3) Does IfcOpenshell allow to create a IfcMaterial from scratch programmatically?
I attached a BlenderBIM screenshot, but it would be really cool if be a stand-alone material management thingy exists which is able to communicate with FreeCAD as well.
Tagged:
Comments
1) video: https://www.dropbox.com/s/cxo1bxuns81wxii/2022-07-21_13-06-28_Blender_blender.mp4?dl=0
2) not sure... would be cool. Although I think IfcSurfaceStyleShading is supported, I don't think classes like IfcSurfaceStyleWithTextures and IfcFillAreaStyleHatching are yet.
3) I think here, but i'm a programming noobie.
Also, did you know about this?...

related: https://community.osarch.org/discussion/584/
Yes, you can import Materials from a library just like Types:
Materials are created like so:
..give it a surface style:
@theoryshaw @brunopostle
Thank you for the answers, I did not know about that whole material section.
@brunopostle
What does ``model_context``` do? What value should that variable have? also how do I assign an IfcMaterial to an IfcProduct?
I tried this, but it does not work:
@Coen it would be a reference to a IfcGeometricRepresentationContext (or SubContext, I think, I'm away from a computer) called 'Model'.
Lots of my code starts with searching all the existing contexts in the model and saving references to these contexts that you need when creating representations.
p. 27 goes into a little, here
Programmatically, i'm not quite sure... could the answer be gleaned from here?
I think (don't have any reference to hand), a product can have zero or more representations (each for a different context), the materials are assigned to the representation not the product.
trying to understand how this is intended to work.. (bb221113, bl3.3, os Ubuntu 22.04.1 LTS)

If anybody is interested in documenting how materials / libraries work, (or are intended to work) I'm in...
hmm.. weird. It seems like a list of materials should show up, like this...
Can you share file?
@CadGiru did you import anything via 'IFC Project Library'?
I think there's some quirks with that...
https://github.com/IfcOpenShell/IfcOpenShell/issues/2424
@theoryshaw sure, a pure test file
currently searching for your github site we previously used for this
sent .blend / .ifc on matrix