diff --git a/m1/button/Makefile b/m1/button/Makefile new file mode 100644 index 0000000..c6826dd --- /dev/null +++ b/m1/button/Makefile @@ -0,0 +1,14 @@ +SPOOL=/home/moko/svn.openmoko.org/developers/werner/cncmap/spool/spool + +out.gp: bgen + ./bgen >out.gp || { rm -f out.gp; exit 1; } + +out.rml: out.gp + PATH=$PATH:/home/qi/cae-tools/gp2rml gp2rml 10 1 1 <$< >$@ || \ + { rm -f $@; exit 1; } + +spool: out.rml + PORT=/dev/ttyUSB0 $(SPOOL) out.rml + +clean: + rm -f out.gp out.rml diff --git a/m1/button/NOTES b/m1/button/NOTES new file mode 100644 index 0000000..e430c0e --- /dev/null +++ b/m1/button/NOTES @@ -0,0 +1,18 @@ +Nominal dimensions: + +pusher 1.1 mm x 12 mm +shaft 3.7 mm x 8 mm + +Adjusted dimensions for the first try: + +1.2 mm, 3.8 mm = 5 mm + +Piece thickness: + +7.9 mm + +Final size: + +pusher ~0.8 mm x 10 mm + +http://downloads.qi-hardware.com/people/werner/tmp/m1butwood.jpg diff --git a/m1/button/bgen b/m1/button/bgen new file mode 100755 index 0000000..d558e5e --- /dev/null +++ b/m1/button/bgen @@ -0,0 +1,43 @@ +#!/usr/bin/perl + + +$pi = atan2(1, 1)*4; + + +sub circ +{ + local ($r, $d) = @_; + + for ($a = 0; $a <= 2*$pi; $a += 2*$pi/200) { + print $x0+$r*sin($a), " ", $y0+$r*cos($a), " ", $z0-$d, "\n"; + } + print "\n"; +} + + +$x0 = 123; +$y0 = 19+18; +$z0 = -39.5; # piece surface +$z0 -= 7.9-5; # depth into piece + + +$ds = 7.8; # shaft diameter +$dp = 10; # pusher plate diameter + +$tr = 25.4/8/2; + +#&circ($ds/2-$tr, 0); +&circ(1, 0); +&circ(3, 0); +&circ(0.2, 0); + +&circ($ds/2+$tr, 0); +&circ($ds/2+$tr, 2); +#&circ($ds/2+$tr, 3.8); +#&circ($ds/2+$tr, 3.8); # twice, for cleaner cuts +&circ($ds/2+$tr, 3.9); +&circ($ds/2+$tr, 4.0); # twice, for cleaner cuts + +&circ($dp/2+$tr, 0); +&circ($dp/2+$tr, 3); +&circ($dp/2+$tr, 5+0.3);