mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-11-30 23:02:29 +02:00
44 lines
693 B
Perl
Executable File
44 lines
693 B
Perl
Executable File
#!/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);
|