Changing elements' colors
Good morning! I'm relatively new to working with IFC and ifcopenshell, and I could use some assistance. My goal is to create a script that reads an IFC file and applies colorization to elements that have specific properties, such as those indicating recyclability. I've already managed to assign these properties, but I'm having difficulty with the colorization process. Can someone provide guidance or assistance with this aspect of the script? Thank you!
Tagged:
Comments
Coloring element is done through style in ifc
You could try the following
ifcopenshell.util.selector.filter_elements
. you can refer hereThank you so much, I will try this out. I really appreciate the help!
Hi @Arv
Those links are for programmers, please how about IFC style in BBMI interface? any useful link or procedure? (just to assign IFC color/style to elements that shows in viewers, not just Blender) many thanks
You can create new styles and assign them to the representation items - https://imgur.com/a/5HpZlMR
thanks @Andrej730
something new to practice over next weekend :)
Hi @Andrej730
with some little effort (and your help) I now know how to create and assign a style to an entity, thanks
if it's not too much asking: can a style be assigned to a Type or just to selected entities?
As always, I much appreciate the help offered by this platform, cheers
EDIT
I think I found out, in Materials pane you can assign them to a particular Style, since a Type has a material assigned..
is it correct?
Hi @Andrej730
please see what I managed so far (didn't use the representation way) to assign material/style to Types instead of selecting elements
Video
is it OK?
I think it's a bug that was present before this commit - representation wasn't updated after you assigned a new style and it required to either to reload representation manually (Geometry and Materials -> Representations -> "Switch Representation" on active representation) or reload .ifc. Should be fixed now in the latest build - https://imgur.com/a/ykbbmEY