Root/m1/button/bgen

1#!/usr/bin/perl
2
3
4$pi = atan2(1, 1)*4;
5
6
7sub circ
8{
9    local ($r, $d) = @_;
10
11    for ($a = 0; $a <= 2*$pi; $a += 2*$pi/200) {
12        print $x0+$r*sin($a), " ", $y0+$r*cos($a), " ", $z0-$d, "\n";
13    }
14    print "\n";
15}
16
17
18$x0 = 123;
19$y0 = 19+18;
20$z0 = -39.5; # piece surface
21$z0 -= 7.9-5; # depth into piece
22
23
24$ds = 7.8; # shaft diameter
25$dp = 10; # pusher plate diameter
26
27$tr = 25.4/8/2;
28
29#&circ($ds/2-$tr, 0);
30&circ(1, 0);
31&circ(3, 0);
32&circ(0.2, 0);
33
34&circ($ds/2+$tr, 0);
35&circ($ds/2+$tr, 2);
36#&circ($ds/2+$tr, 3.8);
37#&circ($ds/2+$tr, 3.8); # twice, for cleaner cuts
38&circ($ds/2+$tr, 3.9);
39&circ($ds/2+$tr, 4.0); # twice, for cleaner cuts
40
41&circ($dp/2+$tr, 0);
42&circ($dp/2+$tr, 3);
43&circ($dp/2+$tr, 5+0.3);
44

Archive Download this file

Branches:
master



interactive