Go to: Synopsis. Return value. Related. Flags. MEL examples.
curveOnSurface [-append] [-degree float] [-knot float] [-name string] [-periodic boolean] [-positionUV float float] [-replace]
string
string
curveOnSurface is undoable, NOT queryable, and NOT editable.
The curve command creates a new curve from a list of control vertices
(CVs). A string is returned containing the pathname to the newly
created curve. You can create a curve from points either in world
space or object (local) space, either with weights or without.
You can replace an existing curve by using the "-r/replace"
flag. You can append a point to an existing curve by using the
"-a/append" flag.
To create a curve-on-surface, use the curveOnSurface command.
To change the degree of a curve, use the rebuildCurve command.
To change the of parameter range curve, use the rebuildCurve command.
The curve-on-surface command creates a new curve-on-surface from a
list of control vertices (CVs). A string is returned containing
the pathname to the newly created curve-on-surface.
You can replace an existing curve by using the "-r/replace"
flag. You can append points to an existing curve-on-surface by
using the "-a/append" flag.
See also the curve command, which describes how to query curve
attributes.
string | - name of new curve-on-surface |
string | The path to the new curve or the replaced curve |
curve, curveOnSurface
append, degree, knot, name, periodic, positionUV, replace
Long name (short name) |
Argument types |
Properties |
|
-append(-a)
|
|
|
|
Appends point(s) to the end of an existing curve.
If you use this flag, you must specify the name of the
curve to append to, at the end of the command. (See examples below.)
|
|
-degree(-d)
|
float
|
|
|
The degree of the new curve. Default is 3. Note that you need
(degree+1) curve points to create a visible curve span. eg. you
must place 4 points for a degree 3 curve.
|
|
-knot(-k)
|
float
|
|
|
A knot value in a knot vector. One flag per knot value.
There must be (numberOfPoints + degree - 1) knots and the knot
vector must be non-decreasing.
|
|
-name(-n)
|
string
|
|
|
-periodic(-per)
|
boolean
|
|
|
If on, creates a curve that is periodic. Default is off.
|
|
-positionUV(-uv)
|
float float
|
|
|
The uv position of a point.
|
|
-replace(-r)
|
|
|
|
Replaces an entire existing curve.
If you use this flag, you must specify the name of the curve to
replace, at the end of the command. (See examples below.)
|
|
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can be used more than once in a command.
|
curve -p 0 0 0 -p 3 5 6 -p 5 6 7 -p 9 9 9;
curve -pw 0 0 0 1 -pw 3 5 6 1 -pw 5 6 7 1 -pw 9 9 9 1;
curve -p 0cm 0cm 0cm -p 3in 5in 6in -p 5ft 6ft 7ft -p 9 9 9;
// These commands create curves with four control vertices.
// The first one is created without weights. The third command
// shows how you can use units to specify position.
curve -r -p 0 0 0 -p 3 5 6 -p 10 12 14 -p 9 9 9 curve1;
// This command replaces an existing curve, curve1, with the given points.
// Do not use this flag on a curve that is a result of a construction
// history operation.
curve -a -p 13 13 13 -p 13 15 16 curve1;
// This command adds two CVs to an existing curve, curve1.
// The "-ws" flag can be used if the specified CVs are in world space.
// Do not use this flag on a curve that is a result of a construction
// history operation.
curve -p 0 0 0 -p 3 5 6 -p 5 6 7 -p 9 9 9 -p 12 10 2 -k 0 -k 0 -k 0 -k 1 -k 2 -k 2 -k 2;
// This command creates a curve with five control vertices,
// with a knot vector. Notice that there must be
// (number of CVs + degree - 1) knots and that the knot
// vector must be non-decreasing.
curve -per on -p 0 0 0 -p 3 5 6 -p 5 6 7 -p 9 9 9 -p 0 0 0 -p 3 5 6 -p 5 6 7 -k -2 -k -1 -k 0 -k 1 -k 2 -k 3 -k 4 -k 5 -k 6;
// This command creates a closed (or "periodic") curve with
// four distinct CVs. You must specify a knot vector when the
// "-per" flag is used. Notice that the first "degree" points
// are the same as the last "degree" points (ie. the first three
// points are the same as the last three points). Notice also
// that the knot spacing between the first "degree" knots must
// be the same as the spacing between the last "degree" knots
// (ie. the space between the 1st and 2nd knots is the same as
// the space between the 7th and 8th knots, and the space between
// the 2nd and 3rd knots is the same as the space between the
// 8th and 9th knots). There must be space between the first
// "degree" knots, unlike the previous example, where the first
// "degree" knots are the same.
// How to query curve properties:
getAttr "curve1.degree";
// This returns the degree of the curve. Note that the
// number of CVs = degree + spans.
getAttr "curve1.spans";
// This returns the number of spans in the curve. Note that the
// number of CVs = degree + spans.
getAttr "curve1.form";
// This returns the curve form.
getAttr "curve1.minValue";
// This returns the minimum parameter value on the curve.
getAttr "curve1.maxValue";
// This returns the maximum parameter value on the curve.
getAttr "curve1.cv[0]";
// This returns the local x,y,z of the 1st CV. Use a curve info node if
// the curve is a result of a construction history operation.
getAttr "curve1.cv[0:2]";
// This returns the local x,y,z of the 1st three CVs. Use a curve info
// node if the curve is a result of a construction history operation.
getAttr "curve1.cv[*]";
// This returns the local x,y,z of all CVs. Use a curve info node if
// the curve is a result of a construction history operation.
arclen curve1;
// This returns the arc length of the curve. Use "-ch" flag with
// the arclen command to get a curve info node that constantly updates
// to the current arc length.
createNode curveInfo;
connectAttr curveShape1.worldSpace curveInfo1.inputCurve;
getAttr "curveInfo1.knots[*]";
// This sequence creates a curve info node, connects the info node to the
// curve and queries the knot vector of the curve using the curve info node.
// You can use the curve info node to query other attributes such as
// world space CV values and arc length.
curveOnSurface -d 3 -uv 0 0 -uv 0.3 0.5 -uv 0.5 0.6 -uv 0.9 1.0 surface1;
// This command creates a curve-on-surface of degree three with
// four control vertices on surface1.
curveOnSurface -uv 0 0 -uv 0.3 0.5 -uv 0.5 0.6 -uv 0.7 0.8 -uv 1.0 1.0 -k 0 -k 0 -k 0 -k 1 -k 2 -k 2 -k 2 surface1;
// This command creates a curve-on-surface with five CVs
// and a knot vector, on surface1. Notice that there must be
// (number of CVs + degree - 1) knots and that the knot
// vector must be non-decreasing.
curveOnSurface -degree 3 -per on -uv 0 0 -uv 0.2 0.6 -uv 0.4 0.7 -uv 0.9 0.9 -uv 0.0 0.0 -uv 0.2 0.6 -uv 0.4 0.7 -k -2 -k -1 -k 0 -k 1 -k 2 -k 3 -k 4 -k 5 -k 6 surface1;
// This command creates a closed (or "periodic") curve-on-surface with
// four distinct CVs. You must specify a knot vector when the
// "-per" flag is on. Notice that the first "degree" points
// are the same as the last "degree" points (ie. the first three
// points are the same as the last three points). Notice also
// that the knot spacing between the first "degree" knots must
// be the same as the spacing between the last "degree" knots
// (ie. the space between the 1st and 2nd knots is the same as
// the space between the 7th and 8th knots, and the space between
// the 2nd and 3rd knots is the same as the space between the
// 8th and 9th knots). There must be space between the first
// "degree" knots, unlike the previous example, where the first
// "degree" knots are the same.
curveOnSurface -append -uv 1.0 1.0 surface1->curve1;
// This command appends a point to an existing curve-on-surface.
// Notice that the curve-on-surface is specified, not just the surface.
curveOnSurface -replace -d 1 -uv 1.0 1.0 -uv 2.0 2.0 surface1->curve1;
// This command replaces an existing curve, surface1->curve1, with a
// new curve of degree 1 having the given points. Do not use this
// flag on a curve that is a result of a construction history operation.