@Gorgious said:
Try with a red value between 0 and 1. Basically you can copy / paste the r,g and b values that you get when clicking on the color field in blender
Just one more question, I have seen @vpajic made it possible to filter by the predefined types, how would I defined the predefined type with the ifcopenshell.api?
IfcSurfaceStyleRendering is a subclass of IfcSurfaceStyleShading.
As far as I understand, IfcSurfaceStyleShading is limited to very simple shading functionality, basically a color and a transparency. It won't be affected by the lights in your scene, for instance.
IfcSurfaceStyleRendering (used by default if you don't use the ifc_class argument), lets you define how this surface will react to its environment. In addition to the color and transparency, you can also define how the light will reflect when hitting the surface of the object, and how the light will act when it traverses the object (for glass, for example).
Comments
Try with a red value between 0 and 1. Basically you can copy / paste the r,g and b values that you get when clicking on the color field in blender
See https://community.osarch.org/discussion/comment/13894#Comment_13894 for an extended explanation :)
I'm an idiot, I should read until the end of the thread...
Hehe at least that way you should remember it for next time :p
@Gorgious Thanks, my wall is red now.
Just one more question, I have seen @vpajic made it possible to filter by the predefined types, how would I defined the predefined type with the ifcopenshell.api?

It's an optional argument of
root.create_entity
ifc_walltype = run("root.create_entity", ifc_file, ifc_class="IfcWallType", name="wall_demo", predefined_type="STANDARD")
See https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/api/root/create_entity.py
You can change the predefined type after entity creation with https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/api/root/reassign_class.py
run("root.reassign_class", ifc_file, ifc_class="IfcWallType", product=ifc_walltype, predefined_type="STANDARD")
(not tested, you might have to tweak a bit)
I wonder too, if adding

ifc_class = "IfcSurfaceStyleShading"
has an affect on things...As it's in other examples out there in the wild.
So after a bit of digging here are the docs for IfcSurfaceStyleRendering and IfcSurfaceStyleShading and a link to the ifcopenshell API
IfcSurfaceStyleRendering is a subclass of IfcSurfaceStyleShading.
As far as I understand, IfcSurfaceStyleShading is limited to very simple shading functionality, basically a color and a transparency. It won't be affected by the lights in your scene, for instance.
IfcSurfaceStyleRendering (used by default if you don't use the
ifc_class
argument), lets you define how this surface will react to its environment. In addition to the color and transparency, you can also define how the light will reflect when hitting the surface of the object, and how the light will act when it traverses the object (for glass, for example).Dion's opus on color should probably be inserted here: https://community.osarch.org/discussion/comment/13744/#Comment_13744