Splits, or divides, a surface into two parts at the specified parameter.
Rhino.SplitSurface (strSurface, intDir, dblParameter [, blnDelete])
strSurface |
Required. String. The identifier of the surface object to split. |
intDir |
Required. Number. The direction to split. If 0 (U), then the surface is split vertically. If 1 (V), then the surface is split horizontally. |
dblParameter |
Required. Number. The parameter, in the domain returned by SurfaceDomain(strSurface, intDir), to split at. |
blnDelete |
Optional. Boolean. Delete input surface. If omitted, the input surface will not be deleted (False). |
Array |
The identifiers of the two new surfaces if successful. If intDir = 0, then Array(0) is the "west" part and Array(1) is the "east" part. If intDir = 1, then Array(0) is the "north" part and Array(1) is the "south" part. |
Null |
If not successful, or on error. |
Dim strSurface, arrDomU, dblParam
strSurface = Rhino.GetObject("Select surface to split", 8)
If Not IsNull(strSurface) Then
arrDomU = Rhino.SurfaceDomain(strSurface, 0)
dblParam = (arrDomU(1) - arrDomU(0)) * 0.5
Rhino.SplitSurface strSurface, 0, dblParam, True
End If