pointOnMeshInfo
ポイントオンメッシュを利用する。Maya11以降では搭載されたようです。
pointOnMedhInfo
ボーナスツール


////メッシュを選択してから実行すると2点カーブが作成されます
//Matsu's Musclesへ組み込むが面とuvの場所がずれてしまう
global proc pointOnMesh1()
{
$obj = `ls -sl`;
$myPOMI = `createNode pointOnMeshInfo `;
connectAttr ($obj[0]+".worldMesh") ($myPOMI+".inMesh");
setAttr ($myPOMI+".f") 3;
setAttr ($myPOMI+".r") true;
setAttr ($myPOMI+".u") 0.25;
setAttr ($myPOMI+".v") 0.75;

	string $Curve = `curve  -d 1 -p 0 0 0. -p 2 0 0  -k 0 -k 1 ` ;
	string $Locator1[] = `pointCurveConstraint -ch true -rpo true -w 1 ($Curve + ".u[0]")` ;
	string $Locator2[] = `pointCurveConstraint -ch true -rpo true -w 1 ($Curve + ".u[1]")` ;

      connectAttr ($myPOMI+".position") ($Locator1[0]+".translate");
     float $normalX = `getAttr ($myPOMI+".nx")`;
      float $normalY = `getAttr ($myPOMI+".ny")`;
      float $normalZ = `getAttr ($myPOMI+".nz")`;
      print("The normal at the specified point is: (" + $normalX + ", " + $normalY + ", " + $normalY + ")\n");
$myPOMI = `createNode pointOnMeshInfo -name pointOnMeshInfo20`;
connectAttr ($obj[0]+".worldMesh") ($myPOMI+".inMesh");
setAttr ($myPOMI+".f") 20;
setAttr ($myPOMI+".r") true;
setAttr ($myPOMI+".u") 0.25;
setAttr ($myPOMI+".v") 0.75;
      connectAttr ($myPOMI+".position") ($Locator2[0]+".translate");
     float $normalX = `getAttr ($myPOMI+".nx")`;
      float $normalY = `getAttr ($myPOMI+".ny")`;
      float $normalZ = `getAttr ($myPOMI+".nz")`;
      print("The normal at the specified point is: (" + $normalX + ", " + $normalY + ", " + $normalY + ")\n");
}
pointOnMesh1 ;