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
-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
-turnOnPercentage(-top) boolean queryedit
Whether the parameter is normalized (0,1) or not
Default: false
-position(-p)
Returns the (x,y,z) positon of the specified point on the surface
-normal(-no)
Returns the (x,y,z) normal of the specified point on the surface
-normalizedNormal(-nn)
Returns the (x,y,z) normalized normal of the specified point on the surface
-tangentU(-tu)
Returns the (x,y,z) U tangent of the specified point on the surface
-normalizedTangentU(-ntu)
Returns the (x,y,z) normalized U tangent of the specified point on the surface
-tangentV(-tv)
Returns the (x,y,z) V tangent of the specified point on the surface
-normalizedTangentV(-ntv)
Returns the (x,y,z) normalized V tangent of the specified point on the surface
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.