VS:CreateNurbsCurve

From Vectorworks Developer
Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Creates a new NURBS curve in the document.
FUNCTION CreateNurbsCurve(
firstX,firstY,firstZ  :REAL;
byCtrlPts  :BOOLEAN;
degree  :INTEGER) : HANDLE;
def vs.CreateNurbsCurve(first, byCtrlPts, degree):
    return HANDLE

Parameters

first REAL Coordinates of the first point in the curve definiton.
byCtrlPts BOOLEAN Create curve by control points (not interpolation).
degree INTEGER The degree of the NURBS curve.

Return Value

Returns a HANDLE to the new NURBS curve if successful, otherwise returns NIL.

Remarks

Creates a NURBS curve with a single fit or control point, if it succeeds, return nil if it fails.

(Orso, 2010 Dec. 26) Large introduction to NURBS by C.-K. Shene (MTU), including great many images.

Example

VectorScript

PROCEDURE NewNurbsCurve;
VAR
nC :HANDLE;
BEGIN
nC := CreateNurbsCurve(0, 0, 0, TRUE, 2);
AddVertex3D(nC, 1, 1, 0);
AddVertex3D(nC, 2, 0, 0);
END;
RUN(NewNurbsCurve);

Python

def NewNurbsCurve():
	nC = vs.CreateNurbsCurve(0, 0, 0, True, 2)
	vs.AddVertex3D(nC, 1, 1, 0)
	vs.AddVertex3D(nC, 2, 0, 0)

NewNurbsCurve()

Version

Availability: from VectorWorks 9.0
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox