Go to: Synopsis. Return value. Flags. Python examples.
pointOnCurve(
[objects]
, [constructionHistory=boolean], [curvatureCenter=boolean], [curvatureRadius=boolean], [normal=boolean], [normalizedNormal=boolean], [normalizedTangent=boolean], [parameter=float], [position=boolean], [tangent=boolean], [turnOnPercentage=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
pointOnCurve is undoable, queryable, and editable.
This command returns information for a point on a NURBS curve.
If no flag is specified, it assumes p/position by default.
In query mode, return type is based on queried flag.
constructionHistory, curvatureCenter, curvatureRadius, normal, normalizedNormal, normalizedTangent, parameter, position, tangent, turnOnPercentage
Long name (short name) |
Argument types |
Properties |
|
curvatureCenter(cc)
|
boolean
|
|
|
Returns the (x,y,z) center of curvature of the specified point
on the curve
|
|
curvatureRadius(cr)
|
boolean
|
|
|
Returns the radius of curvature of the specified point
on the curve
|
|
normal(no)
|
boolean
|
|
|
Returns the (x,y,z) normal of the specified point on the curve
|
|
normalizedNormal(nn)
|
boolean
|
|
|
Returns the (x,y,z) normalized normal of the specified point
on the curve
|
|
normalizedTangent(nt)
|
boolean
|
|
|
Returns the (x,y,z) normalized tangent of the specified point
on the curve
|
|
parameter(pr)
|
float
|
|
|
The parameter value on curve
Default: 0.0
|
|
position(p)
|
boolean
|
|
|
Returns the (x,y,z) position of the specified point on the curve
|
|
tangent(t)
|
boolean
|
|
|
Returns the (x,y,z) tangent of the specified point on the curve
|
|
turnOnPercentage(top)
|
boolean
|
|
|
Whether the parameter is normalized (0,1) or not
Default: false
|
|
Common flags |
constructionHistory(ch)
|
boolean
|
|
|
Turn the construction history on or off.
|
|
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.
|
import maya.cmds as cmds
cmds.pointOnCurve( 'curve1', pr=0.5, p=True )
# Returns the (x,y,z) position of curve1 at parameter 0.5.
cmds.pointOnCurve( 'curve1', pr=0.5 )
# Returns the (x,y,z) position of curve1 at parameter 0.5, since
# position is the default information.
cmds.pointOnCurve( 'curve1', pr=0.5, nn=True )
# Returns the (x,y,z) normalized normal of curve1 at parameter 0.5.
cmds.pointOnCurve( 'curve1', pr=0.5, cr=True )
# Returns the curvature radius of curve1 at parameter 0.5.
infoNode = cmds.pointOnCurve('curve1', ch=True, pr=0.55)
cmds.getAttr(infoNode + ".position") # returns the position
cmds.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.