Per face color select

Hi all,
I’ve got many surfaces, imported from STP.
they are all on same layer and have same custom color (white)
BUT
some of them are displaying with a different per face color (green here)
How do I select the green ones?
If I try _SelColor I get all of them selcted as they are all “officially” white.
where is “per face color” info shown?

Thanks!

per face color select.3dm (167.1 KB)

Here is a small script that will select objects that have per-face colors:

SelObjsWPerFaceColors.py (998 Bytes)

The native Rhino command RemovePerFaceColors will remove the per-face color property of objects and return them to by layer or by object.

1 Like

you may need to change the Display Colour in the Properties panel

Thank you @Helvetosaur,
Your scripts, together with Pascals, adds a lot to Rhino!

Is it possible select objects by per-face color as well??

You are looking to select objects with one or more specific per-face colors? Should be doable with a variation of the above script, I unfortunately have to go out now, I will look at it over the weekend.

Hi,
I do not need it now,
this file had only one per-face color so I am OK.
Thanks anyway!

I was just wondering (just in case) if it is possible to have a _SelColor behavior:
select a per-face color object , select all the others with the same per-face color.

You can try this one… Select one object with a per-face color you want to find, run the script. All the others having at least one face with the same per-face color will be selected. I did it this way because it’s easier to select an object with a color on it rather than trying to figure out what the color is from the color table.

Note that objets can have more than one per-face color applied. If the initial object selected has multiple per-face colors assigned, any other object that has at least one face with one of the colors will be selected.

SelObjsWSpecificPerFaceColors.py (1.4 KB)

1 Like

Thank you @Helvetosaur
looks working fine!

actually tweaking the file to test the script
I did found out that there is a problem with the step file or the import process:
a per-face color was assigned to individual surfaces rather than a custom color.

The surface has assigned a custom color (white) but a per-face color (green) as well.
I joined surfaces then exploded: per-face color has been assigned correctly as a custom color.
Now I can select objects by color as usual with _SelColor

Thank you for the scripts anyway!
Will be useful for sure in the future…