mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2025-04-21 12:27:27 +03:00
m1/button/: milling process for making M1 buttons from a piece of wood
This commit is contained in:
43
m1/button/bgen
Executable file
43
m1/button/bgen
Executable file
@@ -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);
|
||||
Reference in New Issue
Block a user