Grasshopper

algorithmic modeling for Rhino

Hi,

I'm writing a custom component(grasshopper) in python and I would like to display the geometry(lines) in different colours. I know it can be done but I don't know where to start (maybe Rhino.Display.CustomDisplay) but I am not sure how to sue it. I have searched in the grasshopper forum and had no luck.

Any ideas?

Thanks,

Miguel

Views: 2891

Replies to This Discussion

Hi Miguel,

It is pretty straight forward to implement Rhino.Display.CustomDisplay and draw lines/geometry with different colours and line weights using Python (see the attached file). However it is not exactly straight forward to script event handling for cases when a used closes the definition etc. Hence the boolean toggle which manually clears and deletes the display. This is a subject I would really like to dig further into and come up with some more robust approaches.

Best,

Anders

Attachments:

Hi Anders,

This is exactly what i was looking for.

Best,

Miguel

Thank you

Hi Andres

Thank you this it is very helpful however I cannot delete the discosticks even after setting the boolean to False or by clearing the display list!  How would I actually delete the disco sticks?

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