Go to: Synopsis. Return value. Flags. Python examples.

Synopsis

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.

Return value

float[3]
string

In query mode, return type is based on queried flag.

Flags

constructionHistory, normal, normalizedNormal, normalizedTangentU, normalizedTangentV, parameterU, parameterV, position, tangentU, tangentV, turnOnPercentage
Long name (short name) Argument types Properties
normal(no) boolean createqueryedit
Returns the (x,y,z) normal of the specified point on the surface
normalizedNormal(nn) boolean createqueryedit
Returns the (x,y,z) normalized normal of the specified point on the surface
normalizedTangentU(ntu) boolean createqueryedit
Returns the (x,y,z) normalized U tangent of the specified point on the surface
normalizedTangentV(ntv) boolean createqueryedit
Returns the (x,y,z) normalized V tangent of the specified point on the surface
parameterU(u) float queryedit
The U parameter value on surface
Default: 0.0
parameterV(v) float queryedit
The V parameter value on surface
Default: 0.0
position(p) boolean createqueryedit
Returns the (x,y,z) positon of the specified point on the surface
tangentU(tu) boolean createqueryedit
Returns the (x,y,z) U tangent of the specified point on the surface
tangentV(tv) boolean createqueryedit
Returns the (x,y,z) V tangent of the specified point on the surface
turnOnPercentage(top) boolean queryedit
Whether the parameter is normalized (0,1) or not
Default: false
Common flags
constructionHistory(ch) boolean create
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.

Python examples

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.