global proc stringer (int $xA) { select -all; elete; //create materialbox - fixed size of 154x114x23 & position it for milling. nurbsCube -p 77 57 -11.5 -ax 0 0 1 -w 154 -lr 0.7402597403 -hr 0.1493506494 -d 3 -u 1 -v 1 -ch 1; objectMoveCommand; select -cl ; select -r topnurbsCube1 ; // delet the top of the nurbs cube - no required for project delete; // DEFINING PARAMETERS: axes in x-direction, number of strings int $strings; //number of strings - currently not used!!!!!! int $xA, $yA; // number of axes in x-direction/y-direction: $yA=$xA*1.4; // calculating axes in y-direction: used to creat the grid in curves //calculating distance between axes: float $dx; float $dy; $dx=114/($xA-1); $dy=154/($yA-1); //CREATE CURVE MATRIX for($cx=0; $cx<($yA); $cx++) { for($cy=0; $cy<($xA); $cy++) { //CREATE CURVE curve -d 3 -p 0 -0.351003 -14.843877 -p 0 1.559517 -10.371522 -p 0 5.380558 -1.426813 -p 0 9.201599 -10.71889 -p 0 11.112119 -15.364928 -k 0 -k 0 -k 0 -k 1 -k 2 -k 2 -k 2 -n ("curveX"+($cx)+"Y"+($cy)); // move the curve position based on its order in the matrix move -r ($dx*$cx)($dy*$cy) 0 ; } }; select -cl; //LOFT CURVES for($i=0;$i<($xA);$i+=2) { for($sx=0; $sx<($yA);$sx++) { for($sy=$i; $sy<=($i+2);$sy++) { // selecting the curves, !!!!!at the moment ordering is not functioning properly as expected!!!!. select -add ("curveX"+$sx+"Y"+$sy); }; }; loft; select -cl; }; };