2010-12-16 07:39:10 +02:00
|
|
|
#!/bin/sh
|
|
|
|
PATH=$PATH:/home/qi/cae-tools/cameo
|
|
|
|
PATH=$PATH:/home/moko/svn.openmoko.org/developers/werner/cncmap/gp2rml
|
|
|
|
|
2011-01-23 20:49:36 +02:00
|
|
|
NAME=atusb
|
2011-01-28 07:05:52 +02:00
|
|
|
X=0
|
2011-02-10 11:50:22 +02:00
|
|
|
Y=0
|
2011-01-23 20:49:36 +02:00
|
|
|
|
2010-12-16 07:39:10 +02:00
|
|
|
cameo <<EOF
|
|
|
|
mm
|
|
|
|
|
2011-01-23 20:49:36 +02:00
|
|
|
gerber 35mil ../$NAME-PCB_Edges.gbr
|
2011-01-04 04:11:00 +02:00
|
|
|
rotate 90
|
2011-02-10 11:50:22 +02:00
|
|
|
align 1 6.8mm 8.4mm # align relative to board corner
|
2011-01-28 07:05:52 +02:00
|
|
|
translate 4mm 4mm # move to PCB zone assigned to project
|
|
|
|
array +3mm +3mm $X $Y
|
2010-12-16 21:35:06 +02:00
|
|
|
z 0 -58.9mm # board surface (tool fully retracted)
|
|
|
|
z 1.5mm # slack for extending the tool
|
2010-12-16 07:39:10 +02:00
|
|
|
z -0.8mm # board thickness
|
|
|
|
z -0.5mm # tool extra depth
|
|
|
|
clear
|
|
|
|
|
2011-01-23 20:49:36 +02:00
|
|
|
excellon ../$NAME.drl
|
2010-12-16 07:39:10 +02:00
|
|
|
drill 7mil 15mil # 12.5-13.5 mil drill
|
2010-12-16 21:35:06 +02:00
|
|
|
optimize
|
2010-12-16 07:39:10 +02:00
|
|
|
write drill.gp
|
|
|
|
|
|
|
|
remainder
|
2010-12-16 21:35:06 +02:00
|
|
|
mill 20mil 0.01mm # 35 mil endmill; pretend it is a little smaller,
|
|
|
|
# to compensate for tool/board deflections
|
2010-12-16 09:56:01 +02:00
|
|
|
write mill.gp
|
2010-12-16 07:39:10 +02:00
|
|
|
|
|
|
|
remainder
|
|
|
|
empty
|
2010-12-16 09:56:01 +02:00
|
|
|
|
2011-01-28 07:05:52 +02:00
|
|
|
gerber 32mil ../$NAME-PCB_Edges.gbr # 35 mil endmill, 3 mil deflection
|
2010-12-16 09:56:01 +02:00
|
|
|
offset
|
|
|
|
append mill.gp
|
2010-12-16 07:39:10 +02:00
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
|
|
gp2rml 2 0.5 0.5 mill.gp >mill.rml
|
|
|
|
gp2rml 2 0.1 0.5 drill.gp >drill.rml
|
|
|
|
|
|
|
|
|
2010-12-28 04:37:10 +02:00
|
|
|
cat <<EOF >Makefile.mkmk
|
2010-12-16 07:39:10 +02:00
|
|
|
SPOOL=/home/moko/svn.openmoko.org/developers/werner/cncmap/spool/spool
|
|
|
|
CNGT=/home/qi/cae-tools/cngt/cngt
|
|
|
|
|
2010-12-16 21:35:06 +02:00
|
|
|
.PHONY: mill drill cng plot dplot
|
2010-12-16 07:39:10 +02:00
|
|
|
|
|
|
|
mill:
|
|
|
|
PORT=/dev/ttyUSB0 \$(SPOOL) mill.rml
|
|
|
|
|
|
|
|
drill:
|
|
|
|
PORT=/dev/ttyUSB0 \$(SPOOL) drill.rml
|
|
|
|
|
|
|
|
cng:
|
2010-12-16 21:35:06 +02:00
|
|
|
\$(CNGT) -57.4 20 mill.gp
|
2010-12-16 09:56:01 +02:00
|
|
|
|
|
|
|
plot:
|
2010-12-29 22:44:08 +02:00
|
|
|
echo 'plot "drill.gp" with points, "mill.gp" with lines' | \\
|
2010-12-16 09:56:01 +02:00
|
|
|
gnuplot -persist
|
2010-12-16 21:35:06 +02:00
|
|
|
|
|
|
|
dplot:
|
2010-12-29 22:44:08 +02:00
|
|
|
echo 'plot "< sed /^\$\$/d drill.gp" with linespoints' | \\
|
2010-12-16 21:35:06 +02:00
|
|
|
gnuplot -persist
|
2010-12-28 04:50:00 +02:00
|
|
|
|
|
|
|
clean::
|
|
|
|
rm -f mill.gp mill.rml drill.gp drill.rml
|
2010-12-16 07:39:10 +02:00
|
|
|
EOF
|