Root/cntr/cam/doit

Source at commit 1702234db636c72b812e5519a683de1e28998f07 created 8 years 11 months ago.
By Werner Almesberger, cntr/cam/: added PCB-cutting process
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
7
8GEN=${1:-./pcb.pl}
9
10rdata="19.6 13.0 -56.2 19.6 53.1 -56.1 110.7 14.1 -56.2"
11rdate="15.9 13.1 -57.2 15.9 77.4 -57.1 120.8 15.1 -57.0"
12# lower Z by 0.5 mm relative to highest point
13Z=-57.5
14
15rect=`$RECT $rdata | awk '{$3 = ""; print}'`
16
17$GEN |
18  awk '{ if ($3 != "") $3 += '$Z'; print $0; }' |
19  $ALIGN 0 1 $rect |
20    # angle, reference (lower left corner), rect
21  $GP2RML 2 0.5 0.5
22    # clearance, xy speed, z speed
23# since everything is in the same plane, z clearance must be thickness plus
24# real clearance !
25

Archive Download this file



interactive