Date:2010-12-16 06:39:10 (13 years 3 months ago)
Author:Werner Almesberger
Commit:000d270b856a8bed29172d8361d612d2a51936c9
Message:atusb/cam2/mkmk: new-style CAM script

Run ./mkmk to generate toolpaths and a Makefile. Then
make cng changes tools (used for drill and mill)
make drill does the drilling
make mill does the milling
Files: atusb/cam2/mkmk (1 diff)

Change Details

atusb/cam2/mkmk
1#!/bin/sh
2PATH=$PATH:/home/qi/cae-tools/cameo
3PATH=$PATH:/home/moko/svn.openmoko.org/developers/werner/cncmap/gp2rml
4
5cameo <<EOF
6mm
7
8gerber 35mil ../atusb-PCB_Edges.gbr
9align 1 8.1mm 11.2mm # align relative to board corner
10translate 25mm 2mm # move to PCB zone assigned to project
11translate 2mm 17mm # move a bit further
12array 19mm 36mm 1 0 # skip over previous boards
13z 0 -56.1mm # board surface
14z -0.8mm # board thickness
15z -0.5mm # tool extra depth
16offset
17write mill.gp
18clear
19
20excellon ../atusb.drl
21drill 7mil 15mil # 12.5-13.5 mil drill
22write drill.gp
23
24remainder
25mill 35mil 0.01mm # 35 mil endmill
26append mill.gp
27
28remainder
29empty
30EOF
31
32
33gp2rml 2 0.5 0.5 mill.gp >mill.rml
34gp2rml 2 0.1 0.5 drill.gp >drill.rml
35
36
37cat <<EOF >Makefile
38SPOOL=/home/moko/svn.openmoko.org/developers/werner/cncmap/spool/spool
39CNGT=/home/qi/cae-tools/cngt/cngt
40
41.PHONY: mill drill cng
42
43mill:
44        PORT=/dev/ttyUSB0 \$(SPOOL) mill.rml
45
46drill:
47        PORT=/dev/ttyUSB0 \$(SPOOL) drill.rml
48
49cng:
50        \$(CNGT) -56.1 20 50 39
51EOF

Archive Download the corresponding diff file



interactive