#!/usr/bin/perl -w
# $URL: svn+ssh://mrwhat@ssh.boim.com/home/mrwhat/svn/Walker/trunk/lc20_45_1x1.pl $
# $Id: lc20_45_1x1.pl 314 2013-11-07 14:53:36Z mrwhat $
#
# script to draw thick Jansen walker parts for laser cutting in SVG
#    This version is for 3/16" axle and standoff hinges, with standoff axle and crank-arm
$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 inches for border
$hPx = 11.75 * 25.4;
$wPx = $hPx;#23.75 * 25.4;

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

# cab be tweaked for use with pololu drawings too:
&printPonokoHeader($wPx,$hPx,$preview);
#&drawPololuFiducial(11.75*25.4,1); # add Pololu fiducial (at ~1' boundary)
&drawPololuFiducial(273,273); # open space in drawing to be safe

&drawPayloadMount(94,48.5,0); # ULC
&drawFootQuad(135,195,0,-20);   ##### feet  -- $FH $GH $FG $FGleft $FGperp 
&drawBEDquad(214,75,0,150);    ### BED

# need 2 crank arms.  TEMPORARY:  print more to experiment with
&drawCrankArms(50,135.6,0,$AC,3,1);  ### AC

local $rb = $irB - 0.2 * $fuzz;  # make B-axle connection a little tight
local $ra = $irA;
print "<desc>main bars</desc>";
&drawMainPairFlat(99,122.1,180,$Bx,$rb,$Ay,$ra,1);

## main pulleys (inside part)
# drive gear (smaller gear, for 30rpm motor)
&printGear(225,33,$gearPitch,$teethDrive,$irS);

&braceB(11,88,0,6);
&braceBH(15,208,-90,8);

print "<g transform=\"translate(202.6,6) rotate(90)\">";
&spacerRow(1, 0,2);
&spacerRow(1,10,2);
print "</g>";

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

