Commits

Trammell Hudson committed 68c64aa

Increase spacing and make it an option

Comments (0)

Files changed (1)

 #
 # (c) 2012 Trammell Hudson <hudson@osresearch.net>
 #
+# 5mm bamboo needs a larger kerf -- 0.2?  power 100, speed 4
+# 3mm acrylic works well with 6mm fingers
+# 6mm acrylic kerf = 0.1 is ok, 0.2 shatters, power 100 speed 4
+# Be sure to measure the acrylic -- some of them vary.
+#
 use warnings;
 use strict;
 use Math::Trig;
 my $height = 20;
 my $tab_width = 6;
 my $kerf = 0.1;
+my $spacing;
 
 my $usage = <<"";
 Usage: boxer [options] > box.svg
 	-w | --width N		Outside edge length, in mm
 	-l | --length N		Outside edge length, in mm for rectangles
 	-k | --kerf N		Kerf in mm (typically 0.1)
+	-s | --spacing N	Spacing between pieces in mm
 
 
 GetOptions(
 	'l|length=f'		=> \$length,
 	'k|kerf=f'		=> \$kerf,
 	'T|tab-width=f'		=> \$tab_width,
+	's|spacing=f'		=> \$spacing,
 ) or die $usage;
 
 die "tab should be wider than the material thickness\n"
 die "tab width $tab_width too large for height $height\n"
 	if $num_z_tabs == 0;
 
-my $spacing = $kerf * 4;
+$spacing ||= $kerf * 10;
 
 # Compute the height of the interior triangle
 #my $interior_angle = 360.0 / $sides;
 }
 
 print make_group("translate(0,0)", make_top());
-print make_group("translate(" . ($width+$kerf*2) .",0)", make_top());
+print make_group("translate(" . ($width+$spacing) .",0)", make_top());
 print make_group(
 	make_translate(0, $length + $spacing),
 	make_side($width, $num_x_tabs)