Finds a line segment between a pair of curves such that the line segment is either tangent or perpendicular to each of the curves.
Rhino.LineBetweenCurves (strCurve0, dblParam0, blnPerp0, strCurve1, dblParam1, blnPerp1)
strCurve0 |
Required. String. The identifier of the first curve object. |
dblParam0 |
Required. Number. The parameter on the first curve to be used as a seed, or starting location, of the calculation. |
blnPerp0 |
Required. Boolean. If True, the line perpendicular to the first curve will be calculated. Otherwise, the line tangent to the first curve will be calculated. The default is True. |
strCurve1 |
Required. String. The identifier of the second curve object. |
dblParam1 |
Required. Number. The parameter on the second curve to be used as a seed, or starting location, of the calculation. |
blnPerp1 |
Required. Boolean. If True, the line perpendicular to the second curve will be calculated. Otherwise, the line tangent to the second curve will be calculated. The default is True. |
Array |
An array containing two 3-D points of the line segment if successful. |
Null |
If not successful, or on error. |
Dim arrCurve0, arrCurve1, dblParam0, dblParam1, arrLine
arrCurve0 = Rhino.GetObjectEx("First curve", 4)
arrCurve1 = Rhino.GetObjectEx("Second curve", 4)
dblParam0 = Rhino.CurveClosestPoint(arrCurve0(0), arrCurve0(3))
dblParam1 = Rhino.CurveClosestPoint(arrCurve1(0), arrCurve1(3))
arrLine = Rhino.LineBetweenCurves(arrCurve0(0), dblParam0, true, arrCurve1(0), dblParam1, true)
If IsArray(arrLine) Then
Rhino.AddLine arrLine(0), arrLine(1)
End If