VS:CreateNurbsCurve: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (fix user name) |
||
Line 47: | Line 47: | ||
Creates a NURBS curve with a single fit or control point, if it succeeds, return nil if it fails. | Creates a NURBS curve with a single fit or control point, if it succeeds, return nil if it fails. | ||
([[User: | ([[User:CBM-c-|_c_]], 2010.12.26) Large [http://www.cs.mtu.edu/~shene/COURSES/cs3621/NOTES/ introduction to NURBS] by C.-K. Shene (MTU), including great many images. | ||
</remark> | </remark> | ||
Line 64: | Line 64: | ||
RUN(NewNurbsCurve); | RUN(NewNurbsCurve); | ||
</code> | </code> | ||
==== Python ==== | ==== Python ==== | ||
<code lang="py"> | <code lang="py"> |
Latest revision as of 05:43, 30 January 2022
.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