2012-03-19 06:21:51 +02:00
|
|
|
CAE_TOOLS = /home/qi/cae-tools
|
|
|
|
CAMEO = $(CAE_TOOLS)/cameo
|
|
|
|
SPOOL = $(CAE_TOOLS)/spool/spool
|
|
|
|
CNGT = $(CAE_TOOLS)/cngt/cngt
|
|
|
|
GP2RML = $(CAE_TOOLS)/gp2rml/gp2rml
|
|
|
|
|
2012-03-19 20:22:54 +02:00
|
|
|
X0 = 5
|
|
|
|
Y0 = 5
|
|
|
|
Z1 = -44
|
2012-03-19 06:21:51 +02:00
|
|
|
PIECE = -5 -5 30 55
|
|
|
|
PIECE_Z = 5.5
|
|
|
|
Z_STEP = 2
|
|
|
|
CLEARANCE = 5
|
|
|
|
SPEED_XY = 1
|
|
|
|
SPEED_Z = 1
|
2012-03-19 20:22:54 +02:00
|
|
|
OVERSHOOT = 0.2
|
|
|
|
|
|
|
|
PARAMS = X0=$(X0)mm Y0=$(Y0)mm Z1=$(Z1)mm PIECE_Z=$(PIECE_Z)mm
|
2012-03-19 06:21:51 +02:00
|
|
|
|
|
|
|
.PHONY: all plot mill pos cng clean
|
|
|
|
|
|
|
|
all: mill.rml
|
|
|
|
|
2012-03-21 06:06:02 +02:00
|
|
|
case.gp: case.fpd
|
2012-03-19 06:21:51 +02:00
|
|
|
fped -g case.fpd || { rm -f $@; exit 1; }
|
|
|
|
|
|
|
|
top.gp: case.gp
|
2012-03-19 20:22:54 +02:00
|
|
|
$(CAMEO)/fped2d2z.pl -r 0=-$(OVERSHOOT) top $^ >$@ || \
|
|
|
|
{ rm -f $@; exit 1; }
|
2012-03-19 06:21:51 +02:00
|
|
|
|
|
|
|
top-piece.gp: top.gp
|
2012-03-19 20:22:54 +02:00
|
|
|
./genpiece.pl -r $(PIECE) $< >$@ || { rm -f $@; exit 1; }
|
2012-03-19 06:21:51 +02:00
|
|
|
|
2012-03-19 20:22:54 +02:00
|
|
|
top-area.gp: top-piece.gp top.gp cam.sh Makefile
|
|
|
|
./cam.sh PART=top CAMEO=$(CAMEO)/cameo $(PARAMS) >$@ || \
|
|
|
|
{ rm -f $@; exit 1; }
|
2012-03-19 06:21:51 +02:00
|
|
|
|
2012-03-19 20:22:54 +02:00
|
|
|
mill.gp: top-area.gp Makefile
|
|
|
|
$(CAMEO)/zstack.pl $(Z1) $(Z_STEP) $< >$@ || \
|
2012-03-19 06:21:51 +02:00
|
|
|
{ rm -f $@; exit 1; }
|
|
|
|
|
2012-03-19 20:22:54 +02:00
|
|
|
mill.rml: mill.gp Makefile
|
2012-03-19 06:21:51 +02:00
|
|
|
$(GP2RML) $(CLEARANCE) $(SPEED_XY) $(SPEED_Z) $< >$@ || \
|
|
|
|
{ rm -f $@; exit 1; }
|
|
|
|
|
|
|
|
plot: mill.gp
|
|
|
|
echo 'splot "mill.gp" with lines' | gnuplot -persist
|
|
|
|
|
|
|
|
mill: mill.rml
|
|
|
|
PORT=/dev/ttyUSB0 $(SPOOL) $<
|
|
|
|
|
|
|
|
pos:
|
|
|
|
$(CNGT) 0
|
|
|
|
|
|
|
|
cng: mill.gp
|
|
|
|
$(CNGT) $(Z1) 10 $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f case.gp top-piece.gp top.gp top-area.gp mill.gp mill.rml
|