pymel.core.modeling.pointOnSurface

pointOnSurface(*args, **kwargs)

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.

Flags:
Long name (short name) Argument Types Properties
caching (cch) bool  
   
constructionHistory (ch) bool ../../../_images/create.gif
 
Turn the construction history on or off Flag can have multiple arguments, passed either as a tuple or a list.
nodeState (nds) int  
   
normal (no) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Returns the (x,y,z) normal of the specified point on the surface
normalizedNormal (nn) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Returns the (x,y,z) normalized normal of the specified point on the surface
normalizedTangentU (ntu) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Returns the (x,y,z) normalized U tangent of the specified point on the surface
normalizedTangentV (ntv) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Returns the (x,y,z) normalized V tangent of the specified point on the surface Common flags
parameterU (u) float ../../../_images/query.gif ../../../_images/edit.gif
 
The U parameter value on surface Default:0.0
parameterV (v) float ../../../_images/query.gif ../../../_images/edit.gif
 
The V parameter value on surface Default:0.0
position (p) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Returns the (x,y,z) positon of the specified point on the surface
tangentU (tu) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Returns the (x,y,z) U tangent of the specified point on the surface
tangentV (tv) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Returns the (x,y,z) V tangent of the specified point on the surface
turnOnPercentage (top) bool ../../../_images/query.gif ../../../_images/edit.gif
 
Whether the parameter is normalized (0,1) or not Default:false

Derived from mel command maya.cmds.pointOnSurface

Example:

import pymel.core as pm

pm.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 = pm.pointOnSurface('surface1', ch= True, u=0.55, v=0.33)
pm.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.

Previous topic

pymel.core.modeling.pointOnCurve

Next topic

pymel.core.modeling.pointPosition

Core

Core Modules

Other Modules

This Page