I am looking for a script or help in writing a script that will place points on all the curve end points in a scene (i.e. 5,000 curves, 10,000 end points). Any ideas?
The following script should do the job:
Option Explicit
Sub AddCurveEndPoints()
Const rhCurve = 4
' Get all the curve objects in the document
Dim arrCurves
arrCurves = Rhino.ObjectsByType(rhCurve)
If IsNull(arrCurves) Then Exit Sub
' For better performance, turn off screen redrawing
Call Rhino.EnableRedraw(False)
' Process each curve
Dim strCurve
For Each strCurve In arrCurves
' Add a point at the start of the curve
Call Rhino.AddPoint(Rhino.CurveStartPoint(strCurve))
' If not closed, add a point at the end of the curve
If Not Rhino.IsCurveClosed(strCurve) Then
Call Rhino.AddPoint(Rhino.CurveEndPoint(strCurve))
End If
Next
' Turn screen redrawing back on
Call Rhino.EnableRedraw(True)
End Sub