pymel.core.modeling.pointOnCurve

pointOnCurve(*args, **kwargs)

This command returns information for a point on a NURBS curve. If no flag is specified, it assumes p/position by default.

Flags:
Long name (short name) Argument Types Properties
caching (cch) bool  
   
constructionHistory (ch) bool ../../../_images/create.gif
 
Turn the construction history on or offFlag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.
curvatureCenter (cc) bool ../../../_images/create.gif
 
Returns the (x,y,z) center of curvature of the specified point on the curve
curvatureRadius (cr) bool ../../../_images/create.gif
 
Returns the radius of curvature of the specified point on the curveCommon flags
nodeState (nds) int  
   
normal (no) bool ../../../_images/create.gif
 
Returns the (x,y,z) normal of the specified point on the curve
normalizedNormal (nn) bool ../../../_images/create.gif
 
Returns the (x,y,z) normalized normal of the specified point on the curve
normalizedTangent (nt) bool ../../../_images/create.gif
 
Returns the (x,y,z) normalized tangent of the specified point on the curve
parameter (pr) float ../../../_images/query.gif ../../../_images/edit.gif
 
The parameter value on curveDefault:0.0
position (p) bool ../../../_images/create.gif
 
Returns the (x,y,z) position of the specified point on the curve
tangent (t) bool ../../../_images/create.gif
 
Returns the (x,y,z) tangent of the specified point on the curve
turnOnPercentage (top) bool ../../../_images/query.gif ../../../_images/edit.gif
 
Whether the parameter is normalized (0,1) or notDefault:false

Derived from mel command maya.cmds.pointOnCurve

Example:

import pymel.core as pm

pm.pointOnCurve( 'curve1', pr=0.5, p=True )
# Returns the (x,y,z) position of curve1 at parameter 0.5.

pm.pointOnCurve( 'curve1', pr=0.5 )
# Returns the (x,y,z) position of curve1 at parameter 0.5, since
# position is the default information.

pm.pointOnCurve( 'curve1', pr=0.5, nn=True )
# Returns the (x,y,z) normalized normal of curve1 at parameter 0.5.

pm.pointOnCurve( 'curve1', pr=0.5, cr=True )
# Returns the curvature radius of curve1 at parameter 0.5.

infoNode = pm.pointOnCurve('curve1', ch=True, pr=0.55)
pm.getAttr(infoNode + ".position")  # returns the position
pm.getAttr(infoNode + ".normal")    # returns the normal

# Returns a string which is the name of a new pointOnCurveInfo
# dependency node.  With this node connected to the curve,
# the output values of the pointOnCurveInfo node are always current
# even if, for example, the parameter is being animated.

Previous topic

pymel.core.modeling.pointCurveConstraint

Next topic

pymel.core.modeling.pointOnSurface

Core

Core Modules

Other Modules

This Page