FORUMS: list search recent posts

Moving Multiple faces along their normals

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
toby Whiting
Moving Multiple faces along their normals
on Apr 28, 2010 at 11:17:13 am

HI,

I have an architectural building i am prepping for prototyping, all the windows have been extruded out
of the surface and i need to inset them.

I have resigned myself to the fact that i am going to have to make a selection of every window ( several hundred ) but i can't work out for the life of me how to move them all back along their normals at .

essentially i want the functionality you would get from extruding the selected but without adding any extra faces.

I am using maya 2009.

please HELP!

Thanks in advance!



Return to posts index

Michiel Duvekot
Re: Moving Multiple faces along their normals
on Apr 28, 2010 at 2:10:35 pm

That's easy to script:

float $scale = 0.5;
string $sel[] = `ls -sl -flatten`;
string $tmp;
for ($tmp in $sel) {
select -r $tmp;
string $n[] = `polyInfo -fn $tmp`;
string $buffer[];
string $numTokens = `tokenize $n[0] $buffer`;
float $x = float($buffer[2]) * $scale ;
float $y = float($buffer[3])* $scale ;
float $z = float($buffer[4])* $scale ;
move -r -ls -wd $x $y $z;
}



This moves all selected faces along their normal by 50% of the magnitude of the normal vector. It would be trivial to make this do what you need.


Return to posts index

toby Whiting
Re: Moving Multiple faces along their normals
on Apr 28, 2010 at 3:39:08 pm

Genius!

Thanks Michiel.

Just tried your script on a quick box model and it works exactly as i need.

I had forgotten to mention that the model is tessellated and that each window is made up of two
triangles, when i apply the script to the building it looks like it is averaging the two triangles that make up the windows and i am getting some strange results.

Is there any way to combat this?









Return to posts index


cowcowcowcowcow
Michiel Duvekot
Re: Moving Multiple faces along their normals
on Apr 28, 2010 at 5:54:00 pm

You should be able to run [Polygons] Mesh->Quadrangulate on the selection that you were going to edit. So do that first, then run my script.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]