Hi! I working on a oil refinery model so I'm trying to make an automatic pipe script. This is my first attempt at MEL and I have the first part working.
I need to know how to evaluate the axis of a single face and then compare to some xyz coords to change direction. something like this:
if (selected Face AXIS) xyz = 0 1 0 then set corner rotation to z;
if (selected Face AXIS) xyz = 1 0 0 then set corner rotation to y;
etc...
I just can't figure what commands to use to get the (selected Face AXIS) xyz, AND compare it to my own xyz (0 1 0) options.
I want to create hot keys for extrude and corners of a pipe, sort of like the MS Windows pipe screen saver.
here's the first part of the script that will make a corner pipe in one direction:
// select the top single face of a cylinder, it will make a 90 degree corner pipe.
float $TransZ; $TransZ = 2; // size of bend
string $strSelObj[] = ls -sl
;
{
for ($laps = 0; $laps <= 3; $laps++ ) // number of bend sections
{
polyExtrudeFacet -keepFacetTogether true
-localTranslateZ $TransZ
-lry 22.5; // rotate sections to 90
}
}