McNeel Wiki
Select Linear and Non-linear Curves
edit · print · help · all topics
Main Pages

AccuRender

Bongo

Brazil r/s

Developer

Flamingo

Flamingo

Penguin

Rhino Blogs

Rhino

Rhino Labs

Search

Languages

Česky

Deutsch

English

Español

Français

Italiano

Polish

日本語

한국어

中文(繁體)

中文(简体)

 
.
DeveloperRhinoScript
SummaryDemonstrates how to select linear and non-linear curves using RhinoScript.

Selecting Non-Linear Curves

The 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 Curves

The 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