PDA

View Full Version : shrink wrap but to nurbs surface ?


Firas
04-24-2005, 11:27 AM
hi..

can u help me in wrting a mel using closestPointOnSurface to shrinkWrap vertices to a nurbs surface ..

i did this small one using closestPointOnMesh for vertices to vertices wraping.. but i need it to nurbs surface now :(



$BaseObj = "Base";

$selectedVTX = `ls -sl -fl`;



selectMode -o;

toggleSelMode;

SelectToggleMode;

$selectedObj = `ls -sl`;





//copy vtx to memory

if (size ($selectedObj) == 1)

{

$copySource = $selectedObj[0];

for ($vtx in $selectedVTX)

{

$pp = `xform -q -t -ws $vtx`;

//string $myCPOM = `closestPointOnMesh -na "myClosestPointOnMesh" -ip 0 0 0 "myPolyModel"`;

float $result[] = `closestPointOnMesh -ip $pp[0] $pp[1] $pp[2] -q -p "BaseShape"`;

float $positionX, $positionY, $positionZ;

$positionX = $result[0];

$positionY = $result[1];

$positionZ = $result[2];



xform -ws -t $positionX $positionY $positionZ $vtx;

}

}

select -r $selectedVTX;

selectMode -co;

hilite -r modeling ;



Big Thankx for Help.

Firas
04-24-2005, 11:32 AM
oh... i find it ... xyShrinkWrap.mel on highend3d.com


thankx ..

CGTalk Moderation
04-24-2005, 11:32 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.