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

Synopsis

duplicateCurve([constructionHistory=boolean], [local=boolean], [name=string], [object=boolean], [range=boolean])

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

duplicateCurve is undoable, queryable, and editable.

The duplicateCurve command takes a curve on a surface and and returns the 3D curve. The curve on a surface could be isoparam component, trimmed edge or curve on surface object.

Return value

string[]Object name and node name

In query mode, return type is based on queried flag.

Related

curveOnSurface, intersect, projectCurve

Flags

constructionHistory, local, name, object, range
Long name (short name) Argument types Properties
Common flags
constructionHistory(ch) boolean create
Turn the construction history on or off (where applicable).
local(l) boolean create
Copy the transform of the surface and connect to the local space version instead.
name(n) string create
Sets the name of the newly created node. If it contains namespace path, the new node will be created under the specified namespace; if the namespace does not exist, it will be created.
object(o) boolean create
Create the result, or just the dependency node (where applicable).
range(rn) boolean create
Force a curve range on complete input curve (where applicable).

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.

Python examples

import maya.cmds as cmds

cmds.cone( ch=True, o=True, po=0, ax=(0, 1, 0), r=3, hr=4 )
# Result: [u'nurbsCone1', u'makeNurbCone1'] #

# duplicate isoparm at v param 0.5 with history
cmds.duplicateCurve( 'nurbsCone1.v[0.5]', ch= True, o=True )

# duplicate isoparm at normalized u param 0.1, no history
cmds.duplicateCurve( 'nurbsCone1.un[0.1]', ch=False )

cmds.nurbsPlane( ch=True, o=True, po=0, ax=(0, 1, 0), w=10, lr=1 ) ;
cmds.circle( ch=True, o=True, nr=(0, 1, 0), r=4 ) ;
cmds.projectCurve( 'nurbsCircle1', 'nurbsPlane1', ch=False, rn=False, un=False, tol=0.01 )
# duplicate curve on surface
cmds.duplicateCurve( 'nurbsPlaneShape1->projectionCurve1_1', ch=True, o=False )

cmds.trim( 'nurbsPlaneShape1', 'projectionCurve1_Shape1', ch=True, o=True, rpo=True, lu=0.2, lv=0.3 )
# duplicate trim edge
cmds.duplicateCurve( 'nurbsPlane1.edge[1][1][1]', ch=True, o=False);