global proc c_tubes (int $r) { select -all; delete; // Create and duplicate a curve: curve -d 3 -p 0 0 0 -p 0 -15 0 -p 0 -65 0 -p 0 -100 0 -p 0 -115 0 -k 0 -k 0 -k 0 -k 1 -k 2 -k 2 -k 2 -n "stripe"; duplicate -rr; move -r ($r*2) 0 0; // Create and move a semicircle: circle -c 0 0 0 -nr 0 1 0 -sw 180 -r $r -d 3 -ut 0 -s 6 -n "semicircle"; setAttr "semicircle.rotateY" -90; move -r $r 0 0 ; // Birail_1 and duplicate: select -r semicircle ; select -tgl stripe1 ; select -tgl stripe ; { string $Selection1[]; $Selection1[0] = "semicircleShape"; performBirail 0 1 `currentCtx`; }; duplicate -rr; move -r ($r*2) 0 0; for ($i=1; $i<((80/$r)-1); ++$i) duplicate -rr -st; // Move Control vertices down: for($xCounter=1; $xCounter<=(80/$r); $xCounter++) { // select a vertex: select -r singleProfileBirailSurface1.cv[2][0:8]; // move the controlvertex in Z direction: move -r 0 0 -1; }; select -cl; }; // Example: c_tubes 3;