C# GH Display line color

Hi everyone,

I want to make component that draws line with specific color depends on number.

I made structure analysis component it can generate each elements stress, shear and moment.
stress,shear and moment are exported as double.
And, I want to add color to elements according to each double number.

Does anyone know how to add color to line?

Best,
Shimpei

Hi Shimpei,

Check the attached. You can specify color and thickness.
Best
F

GH_Shimpei.gh (7.1 KB)

2 Likes

You can also use Human to do that

or even the native “custom preview” component.

Dear filippos,
Thanks for your answer!

That’s what I wanted!

I’ll add some script to your definition.

Thanks a lot !

Best,
Shimpei

Dear Laurent Delrieu,
Thank you for replying me!

Usually, I use Human. This is very cool tool.
However, I’d like to make my own display component.

Anyway, I do appreciate your kindness!

Best,
Shimpei

Dear Andrew Heumann,
Thank you for replying me!

I want to handle color number, for example {255,100,50} in my own component.
Custom display always help me, but It needs little bit more component than C# component I think.

Anyway, I do appreciate your kindness!

Best,
Shimpei