Get faces by color using grasshopper


Is it possible to get / select faces of closed polysurface by color using grasshopper?

Something like this:

  1. Set Brep
  2. Deconstruct Brep
  3. List faces
  4. If face color is blue
  5. Do something…

I’m new to grasshopper and step 4 is out of my league :pensive:

one important thing: as remarked by David, the component automatically computes the solution only when the file opens / right_click → Recompute / F5 shortcut (works on Windows, idk for Mac)

if you draw something in Rhino or change the color of an existing object, you should Recompute the GH solution, otherwise the “old” color-selection will still be active

Thanks for replaying! :smiley:

However I still wonder if this is still something out of the scope of FindByDrawColor method? The solution I’m looking for should work on closed polysurfaces. It seems that FindByDrawColor only works if I explode my closed polysurfaces?

In general my idea is just to mark certain faces of the closed polysurface, so that I can keep on working with them in the grasshopper.

this will work ONLY on Breps , top component gives you the color for each face, second one gives you on A the exploded face with that particular color and on B the index of that face (18.8 KB)

1 Like

Thank you for your time, inno! This was pretty much what I was looking for :+1:

Now I am able to orient breps colored face up.

I am just started to learn to code with grasshopper and I’m working on a disassembler like this:

1 Like