AddPipe

Creates a singled-walled surface with a circular profile around a curve.

Syntax

Rhino.AddPipe (strCurve, arrParameters, arrRadii [, intType [, intCap [, blnFit]]])

Parameters

strCurve

Required.  String.  The identifier of the path curve object.

arrParameters

Required.  Array.  An array of one or more curve parameters where changes in radius occur.

arrRadii

Required.  Array.  An array of radii; one at each curve parameter in arrParameters.

intType

Optional.  Number.  The type of shape blending, where:

Value

Description

0 (Default)

Local.  The pipe radius stays constant at the ends and changes more rapidly in the middle.

1

Global.  The radius is linearly blended from one end to the other, creating pipes that taper from one radius to the other.

intCap

Optional.  Number.  The end cap mode, where:

Value

Description

0 (Default)

None.

1

Flat.  Capped with a planar surface.

2

Round.  Capped with hemispherical surface.

blnFit

Optional.  Boolean.  If the curve is a polycurve of lines and arcs, the curve is fit and a single surface is created; otherwise the result is a polysurface with joined surfaces created from the polycurve segments.  The default is not to fit (False).

Returns

Array

The identifier of the new objects if successful.  If strCurve is a line segment, arrParameters contains two curve parameters, arrRadii contains two identical values, and intCap  is either 0 (None) or 1 (Flat), then an extrusion object will be returned. Otherwise, a polysurface object will be returned.  Note, it is possible for more than one object to be returned (when it is not possible to miter sharp corners, for example).

Null

If not successful, or on error.

Example

Dim strCurve, arrDomain

strCurve = Rhino.GetObject("Select curve to create pipe around", 4, True)

If Not IsNull(strCurve) Then

  arrDomain = Rhino.CurveDomain(strCurve)

  Rhino.AddPipe strCurve, Array(arrDomain(0)), Array(4)

End If

Also See

AddThickPipe