#!/usr/bin/perl -w
# $URL: svn+ssh://mrwhat@ssh.boim.com/home/mrwhat/svn/Walker/trunk/lc20_25_P2.pl $
# $Id: lc20_25_P2.pl 370 2014-01-30 17:14:00Z mrwhat $
#
# script to draw Walker parts which can be cut from 2.5mm (0.100") stocck
$preview = $#ARGV < 0;  # set to 0 for actual size code generation... will generate REAL code if given any argument

# ponoko laser cutting sheets come in 181x181mm, 384x384mm, 384 wide x 790mm long
$wPx = 384;  # width of drawing, pixels?!?? -- most programs seem to ignore units, use mm
$hPx = 384;  # height of drawing, pixels?!??

require 'laserCutPartsGroups.pl';
require 'JansenDefs.pl';
require 'payloadBox.pl';

&printPonokoHeader($wPx,$hPx,$preview);

&drawEFgroup(10,10,0); ### EF
&drawBHgroup(81, 8,0); ### BH
&drawBEDforkGroup(145,7,0,8); ### forks for CD on BED, need a total of 8

print "\n<desc>Outer plates for drive gear</desc>\n";
local $x = 158;
local $y = 116;
local $ra = $irA-$fuzz*.3; # let plates be tight on A-axle standoffs
local $rGear=16;
local $dy = 2*($drivePlateOR+.15);
&printGearSide($x,$y,$ra,$rGear,$drivePlateOR);   $y+=$dy;
&printGearSide($x,$y,$ra,$rGear,$drivePlateOR);   $y+=$dy;
&printGearSide($x,$y,$ra,$rGear,$drivePlateOR);   $y+=$dy;
&printGearSide($x,$y,$ra,$rGear,$drivePlateOR);   $y-=$dy/2; $x+=$dy*.87;
&printGearSide($x,$y,$ra,$rGear,$drivePlateOR);   $y-=$dy;
&printGearSide($x,$y,$ra,$rGear,$drivePlateOR);   $y-=$dy;
&printGearSide($x,$y,$ra,$rGear,$drivePlateOR);

# current design needs 32 2.5mm stackers. Two under each wide fork
print "<g transform=\"translate(0,257)\">";
for (local $i=0; $i<9;$i++) { &stackerRow(4,10*$i,$i?1:0); }
print "</g>\n";

print "</g>\n";  # end of mm scale 
print "</g>\n";  # end of cut-line drawing group
print "</svg>\n"; # end of drawing
