1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-11-15 10:18:28 +02:00

bacon/case/: added smoothing pass for deburring; assorted other small changes

This commit is contained in:
Werner Almesberger 2012-03-22 04:17:49 -03:00
parent 3203db6347
commit 558e5daa90
3 changed files with 34 additions and 14 deletions

View File

@ -4,8 +4,12 @@ SPOOL = $(CAE_TOOLS)/spool/spool
CNGT = $(CAE_TOOLS)/cngt/cngt CNGT = $(CAE_TOOLS)/cngt/cngt
GP2RML = $(CAE_TOOLS)/gp2rml/gp2rml GP2RML = $(CAE_TOOLS)/gp2rml/gp2rml
X0 = 5 # #1: 5, 5
Y0 = 5 # #2: 5, 45
# #3: 65, 5
# #3: 70, 45
X0 = 70
Y0 = 45
Z1 = -44 Z1 = -44
PIECE = -5 -5 30 55 PIECE = -5 -5 30 55
PIECE_Z = 5.5 PIECE_Z = 5.5
@ -15,11 +19,16 @@ SPEED_XY = 1
SPEED_Z = 1 SPEED_Z = 1
OVERSHOOT = 0.2 OVERSHOOT = 0.2
PARAMS = X0=$(X0)mm Y0=$(Y0)mm Z1=$(Z1)mm PIECE_Z=$(PIECE_Z)mm Z_OFFSET = 0.1
FIN_SPEED_XY = 3
FIN_SPEED_Z = 3
PARAMS = X0=$(X0)mm Y0=$(Y0)mm Z1=$(Z1)mm PIECE_Z=$(PIECE_Z)mm \
Z_OFFSET=$(Z_OFFSET)mm
.PHONY: all plot mill pos cng clean .PHONY: all plot mill pos cng clean
all: mill.rml all: mill.rml finish.rml
case.gp: case.fpd case.gp: case.fpd
fped -g case.fpd || { rm -f $@; exit 1; } fped -g case.fpd || { rm -f $@; exit 1; }
@ -32,9 +41,13 @@ top-piece.gp: top.gp
./genpiece.pl -r $(PIECE) $< >$@ || { rm -f $@; exit 1; } ./genpiece.pl -r $(PIECE) $< >$@ || { rm -f $@; exit 1; }
top-area.gp: top-piece.gp top.gp cam.sh Makefile top-area.gp: top-piece.gp top.gp cam.sh Makefile
./cam.sh PART=top CAMEO=$(CAMEO)/cameo $(PARAMS) >$@ || \ ./cam.sh PART=top CAMEO=$(CAMEO)/cameo $(PARAMS) OUT=$@ || \
{ rm -f $@; exit 1; } { rm -f $@; exit 1; }
finish.gp: top-piece.gp top.gp cam.sh Makefile
./cam.sh PART=top CAMEO=$(CAMEO)/cameo $(PARAMS) \
Z_OFFSET=0mm REVERSE=reverse OUT=$@ || { rm -f $@; exit 1; }
mill.gp: top-area.gp Makefile mill.gp: top-area.gp Makefile
$(CAMEO)/zstack.pl $(Z1) $(Z_STEP) $< >$@ || \ $(CAMEO)/zstack.pl $(Z1) $(Z_STEP) $< >$@ || \
{ rm -f $@; exit 1; } { rm -f $@; exit 1; }
@ -43,11 +56,15 @@ mill.rml: mill.gp Makefile
$(GP2RML) $(CLEARANCE) $(SPEED_XY) $(SPEED_Z) $< >$@ || \ $(GP2RML) $(CLEARANCE) $(SPEED_XY) $(SPEED_Z) $< >$@ || \
{ rm -f $@; exit 1; } { rm -f $@; exit 1; }
finish.rml: finish.gp Makefile
$(GP2RML) $(CLEARANCE) $(FIN_SPEED_XY) $(FIN_SPEED_Z) \
$< >$@ || { rm -f $@; exit 1; }
plot: mill.gp plot: mill.gp
echo 'splot "mill.gp" with lines' | gnuplot -persist echo 'splot "mill.gp" with lines' | gnuplot -persist
mill: mill.rml mill: mill.rml finish.rml
PORT=/dev/ttyUSB0 $(SPOOL) $< PORT=/dev/ttyUSB0 $(SPOOL) $^
pos: pos:
$(CNGT) 0 $(CNGT) 0
@ -56,4 +73,5 @@ cng: mill.gp
$(CNGT) $(Z1) 10 $< $(CNGT) $(Z1) 10 $<
clean: clean:
rm -f case.gp top-piece.gp top.gp top-area.gp mill.gp mill.rml rm -f case.gp top-piece.gp top.gp top-area.gp
rm -f mill.gp mill.rml finish.gp finish.rml

View File

@ -10,16 +10,18 @@ done
: ${Y0:=0mm} : ${Y0:=0mm}
: ${Z1:=0mm} : ${Z1:=0mm}
: ${PIECE_Z:=0mm} : ${PIECE_Z:=0mm}
: ${Z_OFFSET:=0mm}
: ${CAMEO:=cameo} : ${CAMEO:=cameo}
: ${OUT:=out.gp}
echo Z1 is $Z1 1>&2
$CAMEO <<EOF $CAMEO <<EOF
gnuplot $MILL $PART-piece.gp gnuplot $MILL $PART-piece.gp
gnuplot $MILL $PART.gp gnuplot $MILL $PART.gp
$REVERSE
align 1 $X0 $Y0 align 1 $X0 $Y0
z 0 ${Z1} z 0 $Z1
z -${PIECE_Z} z $Z_OFFSET
z -$PIECE_Z
area $OVERLAP area $OVERLAP
write $PART-area.gp write $OUT
EOF EOF

View File

@ -114,7 +114,7 @@ table
table table
/* component area position relative to lower left corner of PCB */ /* component area position relative to lower left corner of PCB */
{ cmp_x0, cmp_y0, cmp_x1, cmp_y1, cmp_r } { cmp_x0, cmp_y0, cmp_x1, cmp_y1, cmp_r }
{ 7.0mm, 1.0mm, 20.0mm, 30.0mm, 2.0mm } { 6.5mm, 1.0mm, 19.5mm, 30.0mm, 2.0mm }
set width = pcbw+2*(pcbgap+topridge+topborder) set width = pcbw+2*(pcbgap+topridge+topborder)
set length = pcbl+2*(pcbgap+topridge+topborder) set length = pcbl+2*(pcbgap+topridge+topborder)