| McNeel Wiki | |||||
| edit · print · help · all topics | |||||
Main Pages
Languages
| Selecting Non-Linear CurvesThe following RhinoScript subroutine will select all non-linear curves in the document:
Sub SelNonLinearCrv
Dim arrCurves, strCurve
arrCurves = Rhino.ObjectsByType(4)
If IsArray(arrCurves) Then
Rhino.EnableRedraw False
For Each strCurve In arrCurves
If Not Rhino.IsCurveLinear(strCurve) Then
Rhino.SelectObject strCurve
End If
Next
Rhino.EnableRedraw True
End If
End Sub
Here is the toolbar button macro version of the above: _-NoEcho _-RunScript ( arrCurves = Rhino.ObjectsByType(4) If IsArray(arrCurves) Then Rhino.EnableRedraw False For Each strCurve In arrCurves If Not Rhino.IsCurveLinear(strCurve) Then Rhino.SelectObject strCurve End If Next Rhino.EnableRedraw True End If strCurve = Null arrCurves = Null ) Selecting Linear CurvesThe following RhinoScript subroutine will select all linear curves in the document:
Sub SelLinearCrv
Dim arrCurves, strCurve
arrCurves = Rhino.ObjectsByType(4)
If IsArray(arrCurves) Then
Rhino.EnableRedraw False
For Each strCurve In arrCurves
If Rhino.IsCurveLinear(strCurve) Then
Rhino.SelectObject strCurve
End If
Next
Rhino.EnableRedraw True
End If
End Sub
Here is the toolbar button macro version of the above: _-NoEcho _-RunScript ( arrCurves = Rhino.ObjectsByType(4) If IsArray(arrCurves) Then Rhino.EnableRedraw False For Each strCurve In arrCurves If Rhino.IsCurveLinear(strCurve) Then Rhino.SelectObject strCurve End If Next Rhino.EnableRedraw True End If strCurve = Null arrCurves = Null ) | ||||
| rename · changes · history · subscriptions · lost and found · references · file upload | |||||