C# Displaying filled circle

script
unhandled

(Shimpei) #1

Hi

I’m trying to show axial force with circle which depends on each element value.

In DrawViewportMeshes(IGH_PreviewArgs args),
args.Display.DrawCircle doesn’t have filled circle.
So instead of this, I’m using DrawMeshShaded method.

Here is the .gif that shows how my component works.


It works correctly but It’s little bit slow I think.

Is there other solution to display filled circle?

Best,
Shimpei


(David Rutten) #2

In Rhino6 you can draw symbols. Have a look at PointStyles and the appropriate overload for drawing them.


#3

For Rh 5 (and Rh6): You can also use a custom sprite with args.display.DrawSprite. As sprite you load in an small image of a filled circle. Should be faster as well


(David Rutten) #4

But makes it impossible to draw circles with different radii yet the same edge thickness. You can scale the entire sprite up, but that will also affect the edge width.


#5

oh, yes you are right. didn’t think that way.


(Shimpei) #6

David

I’m very sorry for late reply…


It means that these method will not work in Rhino5?

I’d like to use in both version.

Best,
Shimpei


(David Rutten) #7

Correct, Rhino6 only.