CircleRadius

Returns the radius of a circle curve object.

Syntax

Rhino.CircleRadius (strObject [, dblTolerance])

Parameters

strObject

Required.  String.  The object's identifier.

dblTolerance

Optional.  Number.  If the curve is not a circle curve object, then the tolerance used to determine whether or not the NURBS form of the curve has the properties of a circle. If omitted, Rhino's internal zero tolerance is used.

Returns

Number

The radius of the circle if successful.

Null

If not successful, or on error.

Example

Dim strObject, dblRadius

strObject = Rhino.GetObject("Select circle")

If Rhino.IsCircle(strObject) Then

dblRadius = Rhino.CircleRadius(strObject)

Rhino.Print "Circle radius: " & CStr(dblRadius)

End If

Also See

AddCircle

AddCircle3Pt

CircleCenterPoint

CircleCircumference

IsCircle