Go to: Synopsis. Flags. Return value. Related. Python examples.

Synopsis

projectCurve( [curve] [surface] , [constructionHistory=boolean], [curveOnSurface=boolean], [direction=[float, float, float]], [directionX=linear], [directionY=linear], [directionZ=linear], [name=string], [object=boolean], [polygon=int], [range=boolean], [rebuild=boolean], [replaceOriginal=boolean], [tolerance=linear], [useNormal=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

projectCurve is undoable, queryable, and editable.

The projectCurve command creates curves on surface where all selected curves project onto the selected surfaces. Projection can be done using the surface normals or the user can specify the vector to project along. Note: the user does not have to specify the curves and surfaces in any particular order in the command line.

Flags

constructionHistory, curveOnSurface, direction, directionX, directionY, directionZ, name, object, polygon, range, rebuild, replaceOriginal, tolerance, useNormal
Long name (short name) [argument types] Properties
direction(d) [float, float, float] queryedit
Direction of projection. Available only if useNormal is false.

In query mode, this flag needs a value.

directionX(dx) linear queryedit
X direction of projection.
Default: 0.0

In query mode, this flag needs a value.

directionY(dy) linear queryedit
Y direction of projection.
Default: 0.0

In query mode, this flag needs a value.

directionZ(dz) linear queryedit
Z direction of projection.
Default: 1.0

In query mode, this flag needs a value.

tolerance(tol) linear queryedit
Tolerance to fit to.
Default: 0.01

In query mode, this flag needs a value.

useNormal(un) boolean queryedit
True if the surface normal is to be used and false if the direction vector should be used instead.
Default: false

In query mode, this flag needs a value.

name(n) string create
Name the resulting object
constructionHistory(ch) boolean create
Turn the construction history on or off (not available in all commands)
object(o) boolean create
Create the result, or just the dependency node (not available in all commands)
replaceOriginal(rpo) boolean create
Create "in place" (i.e., replace) (not available in all commands)
curveOnSurface(cos) boolean create
If possible, create 2D curve as a result (not available in all commands)
polygon(po) int create
The value of this argument controls the type of the object created by this operation (not available in all commands)
  • 0: nurbs surface
  • 1: polygon (use nurbsToPolygonsPref to set the parameters for the conversion)
  • 2: subdivision surface (use nurbsToSubdivPref to set the parameters for the conversion)
  • 3: Bezier surface
  • 4: subdivision surface solid (use nurbsToSubdivPref to set the parameters for the conversion)
range(rn) boolean create
Force a curve range on complete input curve (not available in all commands)
rebuild(rb) boolean create
Rebuild the input curve(s) before using them in the operation. Use nurbsCurveRebuildPref to set the parameters for the conversion. (not available in all commands)

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 have multiple arguments, passed either as a tuple or a list.

Return value


[string[]] (object name and node name)

Related

curveOnSurface, duplicateCurve, intersect

Python examples

import maya.cmds as cmds

# Project the active curve onto the active surface using the surface
# normals:
cmds.projectCurve( un=True )

# Project this curve onto the nurbs sphere using the specified direction:
cmds.projectCurve( 'curve1', 'nurbsSphere1', d=(0.0, 6.0, 0.0) )