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 | ![]() |
|
|
|||
frozen / fzn | bool | ||
local / l | bool | ![]() |
|
|
|||
maxValue / max | float | ||
mergeItems / mi | bool | ||
minValue / min | float | ||
name / n | unicode | ![]() |
|
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. Flag can have multiple arguments, passed either as a tuple or a list. |
|||
nodeState / nds | int | ||
object / o | bool | ![]() |
|
|
|||
range / rn | bool | ![]() |
|
|
|||
relative / r | bool | ||
Derived from mel command maya.cmds.duplicateCurve
Example:
import pymel.core as pm
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);