Tests a curve to see if it is a conic section based on the curve's shape.
Rhino.IsCurveConicSection (strObject)
strObject |
Required. String. The object's identifier. |
Array |
An array of curvature information if successful. The array will contain the following information:
|
|||||||||||||||
Null |
If not successful, or on error. |
Dim arrCurve, arrConic
arrCurve = Rhino.GetCurveObject("Select curve")
If IsArray(arrCurve) Then
arrConic = Rhino.IsCurveConicSection(arrCurve(0))
If IsArray(arrConic) Then
Select Case arrConic(0)
Case 0
Call Rhino.Print("Unknown")
Case 1
Call Rhino.Print("Circle")
Call Rhino.AddPoint(arrConic(3))
Case 2
Call Rhino.Print("Ellipse")
Call Rhino.AddPoint(arrConic(1))
Call Rhino.AddPoint(arrConic(2))
Case 3
Call Rhino.Print("Hyperbola")
Call Rhino.AddPoint(arrConic(1))
Call Rhino.AddPoint(arrConic(2))
Case 4
Call Rhino.Print("Parabola")
Call Rhino.AddPoint(arrConic(1))
End Select
End If
End If