VS:CreateNurbsCurve

From Vectorworks Developer
Revision as of 05:43, 30 January 2022 by CBM-c- (talk | contribs) (fix user name)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to 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.

(_c_, 2010.12.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