algorithmic modeling for Rhino
Hi,
I have a list of curves as output from my component(Written in C#).
I want every curve to be coloured with different colours(Basically you can think of a gradient).
Suppose there is n number of curve in a List<Rhino.Geometry.Curve>
Like the Curve indexed 1 should be Red
Curve indexed 2 should be of a bit darker Red
Curve (n-1) should be fainter blue
Curve indexed n will be deep blue.
Is there any way to do that? I have tried with the previous components, but it didn't work so as per my experience the only way will be to include the part in the coding of my plugin.
I will be very glad if I am helped, how to colour a curve or a line using C# , then also I can figure out an way..
Thanking You,
Regards,
Yajnab
Tags:
Hi Yajnab,
The standard preview of Grasshopper cannot handle this, so you'll either have to use a [Custom Display] component and feed it your curves (and a list of colours), or you draw the curves yourself in the C# component.
Which would you prefer? Also, are we talking about a C# script component or a rootin-tootin-cowboy-shootin-Visual Studio component?
Well I am developing an entire Grasshopper component in C#. Drawing curves in C# component is impossible with more than 13K curves .
Custom Display is what I am using at this moment. But I want something which will give me the functionality to enable and disable the preview of the component.
Regards,
Yajnab
I attached a component which creates polylines and drawn them itself using a logarithmic-ish gradient for length. It shows how to extend and disable the display of the default component class.
The component also has variable inputs, just to make it that bit more interesting.
I've done nothing to try and speed up the display in case it takes too long, those are optimisations that need to be made by someone who really understands the use-case of such a component, and anyway it's a separate problem.
Thanks a lot! :)
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by