mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-23 23:00:38 +02:00
uart/cam/: the usual CAM process for cutting the PCB
This commit is contained in:
parent
d3ab4abe5c
commit
f67f7a9a30
19
uart/cam/Makefile
Normal file
19
uart/cam/Makefile
Normal file
@ -0,0 +1,19 @@
|
||||
.PHONY: all clean
|
||||
|
||||
NAME=uart
|
||||
|
||||
all: Makefile.mkmk
|
||||
|
||||
Makefile.mkmk: mkmk ../uart.drl ../uart-PCB_Edges.gbr
|
||||
./mkmk
|
||||
|
||||
../uart.drl: ../uart.brd
|
||||
pcbnew --drill `pwd`/../uart.brd
|
||||
|
||||
../uart-PCB_Edges.gbr: ../uart.brd
|
||||
pcbnew --plot=gerber -l PCB_Edges `pwd`/../uart.brd
|
||||
|
||||
-include Makefile.mkmk
|
||||
|
||||
clean::
|
||||
rm -f Makefile.mkmk
|
69
uart/cam/mkmk
Executable file
69
uart/cam/mkmk
Executable file
@ -0,0 +1,69 @@
|
||||
#!/bin/sh
|
||||
PATH=$PATH:/home/qi/cae-tools/cameo
|
||||
PATH=$PATH:/home/moko/svn.openmoko.org/developers/werner/cncmap/gp2rml
|
||||
|
||||
NAME=uart
|
||||
X=2
|
||||
Y=0
|
||||
|
||||
cameo <<EOF
|
||||
mm
|
||||
|
||||
gerber 35mil ../$NAME-PCB_Edges.gbr
|
||||
align 1 8.9mm 10.4mm # align relative to board corner
|
||||
translate 4mm 4mm # move to PCB zone assigned to project
|
||||
array +3mm +3mm $X $Y
|
||||
z 0 -58.9mm # board surface (tool fully retracted)
|
||||
z 1.5mm # slack for extending the tool
|
||||
z -0.8mm # board thickness
|
||||
z -0.5mm # tool extra depth
|
||||
clear
|
||||
|
||||
excellon ../$NAME.drl
|
||||
drill 7mil 15mil # 12.5-13.5 mil drill
|
||||
optimize
|
||||
write drill.gp
|
||||
|
||||
remainder
|
||||
mill 25mil 0.01mm # 35 mil endmill; pretend it is a little smaller,
|
||||
# to compensate for tool/board deflections
|
||||
write mill.gp
|
||||
|
||||
remainder
|
||||
empty
|
||||
|
||||
gerber 45mil ../$NAME-PCB_Edges.gbr # 35 mil endmill, -10 mil deflection
|
||||
offset
|
||||
append mill.gp
|
||||
EOF
|
||||
|
||||
gp2rml 2 0.5 0.5 mill.gp >mill.rml
|
||||
gp2rml 2 0.1 0.5 drill.gp >drill.rml
|
||||
|
||||
|
||||
cat <<EOF >Makefile.mkmk
|
||||
SPOOL=/home/moko/svn.openmoko.org/developers/werner/cncmap/spool/spool
|
||||
CNGT=/home/qi/cae-tools/cngt/cngt
|
||||
|
||||
.PHONY: mill drill cng plot dplot
|
||||
|
||||
mill:
|
||||
PORT=/dev/ttyUSB0 \$(SPOOL) mill.rml
|
||||
|
||||
drill:
|
||||
PORT=/dev/ttyUSB0 \$(SPOOL) drill.rml
|
||||
|
||||
cng:
|
||||
\$(CNGT) -57.4 20 mill.gp
|
||||
|
||||
plot:
|
||||
echo 'plot "drill.gp" with points, "mill.gp" with lines' | \\
|
||||
gnuplot -persist
|
||||
|
||||
dplot:
|
||||
echo 'plot "< sed /^\$\$/d drill.gp" with linespoints' | \\
|
||||
gnuplot -persist
|
||||
|
||||
clean::
|
||||
rm -f mill.gp mill.rml drill.gp drill.rml
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user