Grasshopper

algorithmic modeling for Rhino

Hello,

how do i get object color and sort data by colors?

In python, rhinoscriptsyntax is not working for me.

Can anyone help me?

Regards, E

Views: 2664

Replies to This Discussion

Hi E

GH1 has no support for object attributes, and as such it is not possible to associate a color with an object in the SDK. You can use functions that create colors, but binding them with objects would not produce any effect. For this reason, they are disabled at the moment.

When Grasshopper (maybe GH2) will support attributes, these functions will be activated.

Does it help?

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

It's a good idea to check out http://www.grasshopper3d.com/forum/topics/how-to-get-help-when-you-...

If you post the code (what did you do), you can probably get some help.

hello Giulio / Arend

Thanks for your reply Giulio, Looking forward for the future release.

I got a help from my friend here to make this python script. Using human plugin to get attribute-color and sort object accordingly. its successful in a way.

Idea was not to feed color as input,. instead, get list sorted and exporting as tree. by this not getting restricting with Input colors. (refer to image)

Also, if you have other suggestion, I am welcome to know.

Regards

Attachments:

Can anyone help me with this please?  instead of feeding - input color reference to sort list. Can i get list sort according color list ?

Regards

what is the rule of sorting? from darker to brighter? or else

you could use the rgb values of the color list and sort them all three according to 0-255 domain.

cheers

alex

Hi Ezhil, how about this: (you'll need Andrew Heumann's TreeFrog plugin)

Attachments:

Thanks Alex and Pieter for your input.

Pieter, It serves my issue well. thanks.

Hmm, so my last reply was past my bedtime and waaay off, thusly that I'll remove it...
Here's what I should have said: You could also look into the ColorTranslator class.

Attachments:

I wasn't aware of RGB color multiplication. Thanks for your input Pieter, it helped a lot.

Very useful!

Thanks

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service