TrimSurface

Removes the portions of the surface outside of the specified interval.

Syntax

Rhino.TrimSurface (strSurface, intDir, arrInterval [, blnDelete])

Parameters

strSurface

Required.  String.  The identifier of the surface object to trim.

intDir

Required.  Number.  If 0 (U), then arrInterval specifies an sub-interval of SurfaceDomain(strSurface, 0). If 1 (V), then arrInterval specifies an sub-interval of SurfaceDomain(strSurface, 1).

arrInterval

Required.  Array.  The interval of the surface to keep. If intDir = 0, then the portions of the surface with parameters (s, t) satisfying s < SurfaceDomain(strSurface, 0)(0) or s > SurfaceDomain(strSurface, 0)(1) are trimmed away. If intDir = 1, then the portions of the surface with parameters (s, t) satisfying t <SurfaceDomain(strSurface, 1)(0) or t >SurfaceDomain(strSurface, 1)(1) are trimmed away.

blnDelete

Optional.  Boolean.  Delete input surface.  If omitted, the input surface will not be deleted (False).

Returns

String

The identifier of the new surface if successful.

Null

If not successful, or on error.

Example

Dim strSurface, arrDomU

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

If Not IsNull(strSurface) Then

  arrDomU = Rhino.SurfaceDomain(strSurface, 0)

  arrDomU(0) = (arrDomU(1) - arrDomU(0)) * 0.25

  Rhino.TrimSurface strSurface, 0, arrDomU, True

End If

Also See

SplitBrep

SplitSurface

SplitSurfaceEx

TrimBrep