Go to: Synopsis. Return value. Flags. Python examples.
pointOnSurface(
[objects]
, [constructionHistory=boolean], [normal=boolean], [normalizedNormal=boolean], [normalizedTangentU=boolean], [normalizedTangentV=boolean], [parameterU=float], [parameterV=float], [position=boolean], [tangentU=boolean], [tangentV=boolean], [turnOnPercentage=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
pointOnSurface is undoable, queryable, and editable.
This command returns information for a point on a surface.
If no flag is specified, this command assumes p/position by default.
If more than one flag is specifed, then a string array is returned.
In query mode, return type is based on queried flag.
constructionHistory, normal, normalizedNormal, normalizedTangentU, normalizedTangentV, parameterU, parameterV, position, tangentU, tangentV, turnOnPercentage
Long name (short name) |
Argument types |
Properties |
|
normal(no)
|
boolean
|
|
|
Returns the (x,y,z) normal of the specified point on the surface
|
|
normalizedNormal(nn)
|
boolean
|
|
|
Returns the (x,y,z) normalized normal of the specified point
on the surface
|
|
normalizedTangentU(ntu)
|
boolean
|
|
|
Returns the (x,y,z) normalized U tangent of the specified point
on the surface
|
|
normalizedTangentV(ntv)
|
boolean
|
|
|
Returns the (x,y,z) normalized V tangent of the specified point
on the surface
|
|
parameterU(u)
|
float
|
|
|
The U parameter value on surface
Default: 0.0
|
|
parameterV(v)
|
float
|
|
|
The V parameter value on surface
Default: 0.0
|
|
position(p)
|
boolean
|
|
|
Returns the (x,y,z) positon of the specified point on the surface
|
|
tangentU(tu)
|
boolean
|
|
|
Returns the (x,y,z) U tangent of the specified point on the surface
|
|
tangentV(tv)
|
boolean
|
|
|
Returns the (x,y,z) V tangent of the specified point on the surface
|
|
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.pointOnSurface( 'surface1', u=0.5, v=1.0, position=True )
# Returns the (x,y,z) position of the surface at parameter (u=0.5,v=1.0).
infoNode = cmds.pointOnSurface('surface1', ch= True, u=0.55, v=0.33)
cmds.getAttr(infoNode + ".position" ) # returns the position
# The pointOnSurface command returns a string which is the name of
# a new pointOnSurfaceInfo dependency node. With this node connected
# to the surface, the output values of the pointOnSurfaceInfo node
# are always current even if, for example, the surface parameters are
# being animated.