Date:2011-01-03 17:43:10 (9 years 7 months ago)
Author:Werner Almesberger
Commit:2ac242022724f2d73a48967d721d423512c89832
Message:atusb/cam: it's obsolete now - removed

Files: atusb/cam/Makefile (1 diff)
atusb/cam/doit (1 diff)
atusb/cam/pcb.pl (1 diff)

Change Details

atusb/cam/Makefile
1DIR=/home/moko/svn.openmoko.org/developers/werner/cncmap
2
3.PHONY: pcb spool
4
5pcb:
6        ./doit >job
7
8spool:
9        PORT=/dev/ttyUSB0 $(DIR)/spool/spool job
atusb/cam/doit
1#!/bin/sh -e
2DIR=/home/moko/svn.openmoko.org/developers/werner/cncmap
3RECT=$DIR/rect/rect
4ALIGN=$DIR/align/align
5ZMAP=$DIR/zmap/zmap
6GP2RML=$DIR/gp2rml/gp2rml
7CAMEO=../../../cae-tools/cameo/cameo
8
9GEN=${1:-./pcb.pl}
10
11rdata="8.1 11.2 -56.3 8.1 80.1 -56.1 117.2 12.8 -55.9"
12
13# we need quite a large Z adjustment due to the table's vertical flexibility
14Z=-56.6
15
16rect=`$RECT $rdata | awk '{$3 = ""; print}'`
17
18$GEN |
19  awk '{ if ($3 != "") $3 += '$Z'; print $0; }' |
20  $CAMEO -d 0.4445 |
21  $ALIGN 0 1 $rect |
22    # angle, reference (lower left corner), rect
23  $GP2RML 2 0.5 0.5
24    # clearance, xy speed, z speed
25# since everything is in the same plane, z clearance must be thickness plus
26# real clearance !
atusb/cam/pcb.pl
1#!/usr/bin/perl
2
3$d = 2.54/1000*12;
4$r = $d/2+0.1;
5
6
7sub orig
8{
9    $x0 = $_[0];
10    $y0 = $_[1];
11}
12
13
14sub mil
15{
16    return $_[0]/1000*25.4;
17}
18
19
20sub cut
21{
22    if (defined $x) {
23    if ($x == $_[0]+$x0 && $y == $_[1]+$y0) {
24        shift @_;
25        shift @_;
26    } else {
27        print "\n";
28    }
29    }
30    while (@_) {
31    $x = shift @_;
32    $y = shift @_;
33# ($x, $y) = (-$y, $x);
34    $x += $x0;
35    $y += $y0;
36    print "$x $y $z\n";
37    }
38}
39
40
41sub one
42{
43    &cut(
44      &mil( 0), &mil( 0),
45      &mil( 0), &mil(640),
46      &mil(1305), &mil(640),
47      &mil(1305), &mil( 0),
48      &mil( 0), &mil( 0));
49}
50
51
52$z = -0.8;
53# x: corner offset, compensation for rotation, array position
54# y: corner offet
55&orig(25+36*1, 2+17*0)
56&one;

Archive Download the corresponding diff file



interactive