SurfacePoints

Returns the control points, or control vertices, of a surface object.

Syntax

Rhino.SurfacePoints (strObject [, blnReturnAll])

Parameters

strObject

Required.  String.  The object's identifier.

blnReturnAll

Optional.  Boolean.  If True (default) all surface edit points are returned. If False, the function will returned surface edit points based on whether or not the surface is closed or periodic.

Returns

Array

The control points of the surface if successful.

Null

If not successful, or on error.

Example

Sub PrintSurfacePoints

  Dim strSurface, arrPoints, arrCount

  strSurface = Rhino.GetObject("Select surface", 8)

  If IsNull(strSurface) Then Exit Sub  

  arrPoints = Rhino.SurfacePoints(strSurface)

  If Not IsArray(arrPoints) Then Exit Sub

  arrCount = Rhino.SurfacePointCount(strSurface)

  Dim u, v

  Dim ulast : ulast = arrCount(0)

  Dim vlast : vlast = arrCount(1)

  Dim i : i = 0

  For u = 0 To ulast - 1

    For v = 0 To vlast - 1

      Rhino.Print "CV[" & CStr(u) & "," & CStr(v) & "] = " _

        & Rhino.Pt2Str(arrPoints(i), 3)

      i = i + 1

    Next

  Next

End Sub

Also See

IsSurface

SurfacePointCount