#!/usr/bin/perl -w
# $URL: svn+ssh://mrwhat@ssh.boim.com/home/mrwhat/svn/Walker/trunk/lc20_30_1x1.pl $
# $Id: lc20_30_1x1.pl 314 2013-11-07 14:53:36Z mrwhat $
#
# script to draw thin Jansen walker parts for laser cutting in SVG
# This layout is intended for Pololu 1x2' 3mm stock
$preview = $#ARGV < 0;  # set to 0 for actual size code generation... will generate REAL code if given any argument

# pololu laser cutting sheets come in 1x1, 1x2' ...  minus .25"

# width of drawing, mm... pixels?!?? -- most programs seem to ignore units, use mm
$hPx = 11.75 * 25.4;
$wPx = $hPx;

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

# this header might work for start of Pololu drawings too
&printPonokoHeader($wPx,$hPx,$preview);
&drawPololuFiducial(10.75*25.4-1,10.75*25.4-1); # add Pololu fiducial

&payloadCover(73.4,5.4,0,1);
&drawEFgroup(10,105,0,8); ### EF
&drawBHgroup(81,104,0,8); ### BH
&drawWideForkGroup(146,103,0,$irB,4); ### B-forks for BED, and H-fors for foot
&drawBEDforkGroup( 146,158,0,4,1); ### forks for CD on BED


## main gear side pannels
&roundSpacer(272.8,25.5,$drivePlateOR,$irA-$fuzz*.3);
&roundSpacer(272.8,76  ,$drivePlateOR,$irA-$fuzz*.3);

## motor gears
local $rShaft = 1.5 + 0.4*$fuzz;
local $dShaft = 1   + 0.2*$fuzz;
&printGear(243,126,$gearPitch,$teethMotor,$rShaft,$dShaft);


print "<desc>Spacers, need at least 12 per half-assembly</desc>
<g transform=\"translate(213,163)\">";
&spacerRow(4, 0,0);
&spacerRow(4,10,1);
&spacerRow(4,20,1);
&spacerRow(4,30,1);
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
