pymel.core.modeling.duplicateCurve

duplicateCurve(*args, **kwargs)

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.

Flags:
Long name (short name) Argument Types Properties
caching (cch) bool  
   
constructionHistory (ch) bool ../../../_images/create.gif
 
Turn the construction history on or off (where applicable)
local (l) bool ../../../_images/create.gif
 
Copy the transform of the surface and connect to the local space version instead.
maxValue (max) float  
   
mergeItems (mi) bool  
   
minValue (min) float  
   
name (n) unicode ../../../_images/create.gif
 
Name the resulting object
nodeState (nds) int  
   
object (o) bool ../../../_images/create.gif
 
Create the result, or just the dependency node (where applicable)
range (rn) bool ../../../_images/create.gif
 

Force a curve range on complete input curve (where applicable)Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

relative (r) bool  
   

Derived from mel command maya.cmds.duplicateCurve

Example:

import pymel.core as pm

import maya.cmds as cmds

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

# duplicate isoparm at v param 0.5 with history
pm.duplicateCurve( 'nurbsCone1.v[0.5]', ch= True, o=True )
# Result: [u'duplicatedCurve1', u'curveFromSurfaceIso1'] #

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

pm.nurbsPlane( ch=True, o=True, po=0, ax=(0, 1, 0), w=10, lr=1 ) ;
pm.circle( ch=True, o=True, nr=(0, 1, 0), r=4 ) ;
pm.projectCurve( 'nurbsCircle1', 'nurbsPlane1', ch=False, rn=False, un=False, tol=0.01 )
# Result: [nt.CurveVarGroup(u'nurbsPlaneShape1->projectionCurve1')] #
# duplicate curve on surface
pm.duplicateCurve( 'nurbsPlaneShape1-"projectionCurve1_1', ch=True, o=False )

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