AddSrfPtGrid

Creates a surface from a grid of points.

Syntax

Rhino.AddSrfPtGrid (arrCount, arrPoints [, arrDegree [, arrClosed]])

Parameters

arrCount

Required.  Array.  The number of points in the U and V directions.

arrPoints

Required.  Array.  An array of 3-D points.

arrDegree

Optional.  Array.  The degree of the surface in the U and V directions.  If omitted, the degree of the new surface in the U and V directions will be 3.

arrClosed

Optional.  Array.  Whether or not the surface is closed in the U and V directions.  If omitted, the new surface will not be closed in either the U or V directions.

Returns

String

The identifier of the new object if successful.

Null

If not successful, or on error.

Example

Sub TestAddSrfPtGrid()

  ' Locals  

  Dim count(1), points(), index, u, v

  ' Number of points in u direction

  count(0) = 4

  ' Number of points in v direction  

  count(1) = 5

  ' Dimension array appropriately

  ReDim points(count(0) * count(1) - 1)

  ' Initialize array index

  index = 0

  ' For every column (u)

  For u = 0 To count(0) - 1

    ' For every row (v) in the column (u)

    For v = 0 To count(1) - 1

      ' Add a point

      points(index) = Array(u,v,0)

      ' Increment the index

      index = index + 1

    Next

  Next

  ' Add the surface

  Call Rhino.AddSrfPtGrid(count, points)

End Sub

Also See

AddEdgeSrf

AddSrfControlPtGrid

AddSrfPt