mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2025-04-21 12:27:27 +03:00
Initial commit.
This commit is contained in:
4
cam/Makefile
Normal file
4
cam/Makefile
Normal file
@@ -0,0 +1,4 @@
|
||||
.PHONY: pcb
|
||||
|
||||
pcb:
|
||||
./doit >job
|
||||
21
cam/doit
Executable file
21
cam/doit
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh -e
|
||||
DIR=/home/moko/svn.openmoko.org/developers/werner/cncmap
|
||||
RECT=$DIR/rect/rect
|
||||
ALIGN=$DIR/align/align
|
||||
ZMAP=$DIR/zmap/zmap
|
||||
GP2RML=$DIR/gp2rml/gp2rml
|
||||
|
||||
GEN=${1:-./pcb.pl}
|
||||
|
||||
rdata="17.8 8.9 -55.7 72.0 9.6 -55.3 17.8 68.5 -55.5"
|
||||
# we need quite a large Z adjustment due to the table's vertical flexibility
|
||||
Z=-55.40
|
||||
|
||||
rect=`$RECT $rdata | awk '{$3 = ""; print}'`
|
||||
|
||||
$GEN |
|
||||
awk '{ if ($3 != "") $3 += '$Z'; print $0; }' |
|
||||
$ALIGN 0 1 $rect |
|
||||
# angle, reference (lower left corner), rect
|
||||
$GP2RML 1.5 0.1 0.1
|
||||
# clearance, xy speed, z speed
|
||||
66
cam/pcb.pl
Executable file
66
cam/pcb.pl
Executable file
@@ -0,0 +1,66 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$d = 2.54/1000*12;
|
||||
$r = $d/2+0.25;
|
||||
|
||||
|
||||
sub orig
|
||||
{
|
||||
$x0 = $_[0];
|
||||
$y0 = $_[1];
|
||||
}
|
||||
|
||||
|
||||
sub mil
|
||||
{
|
||||
return $_[0]/1000*25.4;
|
||||
}
|
||||
|
||||
|
||||
sub cut
|
||||
{
|
||||
if (defined $x) {
|
||||
if ($x == $_[0]+$x0 && $y == $_[1]+$y0) {
|
||||
shift @_;
|
||||
shift @_;
|
||||
} else {
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
while (@_) {
|
||||
$x = shift @_;
|
||||
$y = shift @_;
|
||||
($x, $y) = (-$y, $x);
|
||||
$x += $x0;
|
||||
$y += $y0;
|
||||
print "$x $y $z\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub one
|
||||
{
|
||||
&cut(
|
||||
&mil( 0)-$r, &mil( 0)-$r,
|
||||
&mil( 0)-$r, &mil(580)+$r,
|
||||
&mil( 130)+$r, &mil(580)+$r,
|
||||
&mil( 130)+$r, &mil(480)+$r,
|
||||
&mil( 390)+$r, &mil(480)+$r,
|
||||
&mil( 420)+$r, &mil(450)+$r,
|
||||
&mil( 470)-$r, &mil(450)+$r,
|
||||
&mil( 470)-$r, &mil(480)+$r,
|
||||
&mil( 520)+$r, &mil(480)+$r,
|
||||
&mil( 570)+$r, &mil(430)+$r,
|
||||
&mil( 780)+$r, &mil(430)+$r,
|
||||
&mil( 780)+$r, &mil( 50)-$r,
|
||||
&mil( 130)+$r, &mil( 50)-$r,
|
||||
&mil( 130)+$r, &mil( 0)-$r,
|
||||
&mil( 0)-$r, &mil( 0)-$r);
|
||||
}
|
||||
|
||||
|
||||
$z = -0.8;
|
||||
# x: corner offset, compensation for rotation, array position
|
||||
# y: corner offet
|
||||
&orig(5+11+19.5*2, 5+26+1)
|
||||
&one;
|
||||
Reference in New Issue
Block a user