Select the mesh based on color obtained by ExtractAnalysisMesh command

Hi there I’m using Rhino for quite a while.
After using ExtractAnalysisMesh of the Draft Angle Analysis results i want to select all the meshes by the color .ExtractAnalysisMesh gives to the mesh and not by its mesh wire color (which in this case is black).
Is there a way to work it out?

I can send you the model in case you want to do some tests.

Best Regards
A

Hello - can you be sure that only one color will be applied? or do you want to select by ‘mostly blue’ or ‘mostly red’?

-Pascal

Hello i want to select by mostly blue and mostly red
Best Regards
A

Hi Andre - I don’t know how easy it will be to make a reliable selection- if the object is very red or blue, the attached python may be able to distinguish well enough, but if it is at all close, it may get it wrong. I’ll try to think of a better way.

use RunPythonScript or

_-RunPythonScript "Full path to py file inside double-quotes"

SelRedBlue.py (1.6 KB)

-Pascal

Hello Pascal
With “If it’s all close” you mean that if the join meshes make a closed solid it’s doesn’t work ?
I’m having problems with the script you send.
I know who to run it by I’m a newbie at python so i can’t improve the code.

Have you thought about this?
Best Regards
A

I just mean that if there is not a clear majority of red or blue, it may not get the right answer - it’s only counting the vertices that are blue or red and this may not correspond to the area of red or blue…

-Pascal