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. I have searched in the grasshopper forum and had no luck.
thanks for your reply. To be honest, I wouldn’t know where to start. I was hoping that someone could make a very simple example(just with a line segment or a point) and I could try and take it from there.
Just to make sure I understand the issue properly: are you writing a script in the Python scripting component and trying to change its behavior?
Can you tell me the goal of this?
Is it specifically to change the default appearance of the preview? Or do you also want to show other behaviors later?
I just want to change the default preview colour. I’m writing a components for network analysis, similar to space syntax. http://www.spacesyntax.net and I would like to visualise the result with a gradient of colours.
I download th scripy that you provided and it kind of works, but one thing occured to me is that when I delet the component, the previewed text was still displaied on the scrren. And it cant be removed.
Probably because of the server glitch we had awhile back. Various things got lost, a lot of images and linked files. Not sure how much of that is recoverable. if at all.