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

Synopsis

pointOnSurface [-constructionHistory boolean] [-normal] [-normalizedNormal] [-normalizedTangentU] [-normalizedTangentV] [-parameterU float] [-parameterV float] [-position] [-tangentU] [-tangentV] [-turnOnPercentage boolean] [objects]

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) createqueryedit
Returns the (x,y,z) normal of the specified point on the surface
-normalizedNormal(-nn) createqueryedit
Returns the (x,y,z) normalized normal of the specified point on the surface
-normalizedTangentU(-ntu) createqueryedit
Returns the (x,y,z) normalized U tangent of the specified point on the surface
-normalizedTangentV(-ntv) 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) createqueryedit
Returns the (x,y,z) positon of the specified point on the surface
-tangentU(-tu) createqueryedit
Returns the (x,y,z) U tangent of the specified point on the surface
-tangentV(-tv) 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 be used more than once in a command.

MEL examples

pointOnSurface -u 0.5 -v 1.0 -position surface1;
// Returns the (x,y,z) position of the surface at parameter (u=0.5,v=1.0).

string $infoNode = `pointOnSurface -ch on -u 0.55 -v 0.33 surface1`;
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.