Rhino v4

Any way to draw a 1X by 2X ellipse by inputting a value that would equate to a desired circumference?

Thanks

Rhino v4

Any way to draw a 1X by 2X ellipse by inputting a value that would equate to a desired circumference?

Thanks

Based on Wikipedia it would appear that your desired circumference would approximately be found when you make the major of your 1x2 ellipse to be C/2,422112 where C is the circumference. Please double check . And note that this does not give you an exact solution.

This draws the ellipse on your current CPlane origin:

```
Call Main()
Sub Main()
Dim c, s, strEllipse
c = Rhino.GetReal("Ellipse 1:2 circumference")
If IsNull(c) Then Exit Sub
If c < Rhino.UnitAbsoluteTolerance() Then Exit Sub
s = c / Sqr(93 + (0.5 * Sqr(3)))
strEllipse = Rhino.AddEllipse(Rhino.ViewCPlane(), 1.0, 2.0)
Rhino.ScaleObject strEllipse, Array(0, 0, 0), Array(s, s, s)
End Sub
```

c.

Thanks

That works perfectly.

When using the flow command for text itâ€™s really useful to be able to draw a circle [using the] circumference [command] so you can get stuff to fit easily. Itâ€™d be really handy if there was an option for this with regard to an ellipse too.

Sometimes a specific shape and size doesnâ€™t need to be exact so being able to use the ellipse by corners command but with a circumference restraint would be really useful.

Is thatâ€™s possible?

Andy

I guess yes. Need to find out how to draw it in realtime once the circumference is entered but i am busy atm.

c.

2 Likes

Wow! Thatâ€™s really powerful, thanks!!

Andy