blob: 70e0a9ed36cf6e4d57f0850b426ce5c33eb1b0ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
DESTDIR=build
CONFDIR=conf
SLIC3R=~/opt/Slic3r/bin/slic3r
SUITES=suns moons crowns arms
# Basic piecepack:
#SUITES=suns moons crowns arms
# Playing cards expansion:
#SUITES=clubs diamonds hearts spades
VALUES=null ace 2 3 4 5
all: tiles coins dice pawns saucers pyramids
.PHONY : all
tiles:
mkdir -p ${DESTDIR}
for SUITE in ${SUITES}; do \
for VALUE in ${VALUES}; do \
openscad -o ${DESTDIR}/tile-$$SUITE-$$VALUE.stl \
-D suite=\"$$SUITE\" -D value=\"$$VALUE\" src/tile.scad; \
done \
done
coins:
mkdir -p ${DESTDIR}
for SUITE in ${SUITES}; do \
for VALUE in ${VALUES}; do \
openscad -o ${DESTDIR}/coin-$$SUITE-$$VALUE.stl \
-D suite=\"$$SUITE\" -D value=\"$$VALUE\" src/coin.scad; \
done \
done
dice:
mkdir -p ${DESTDIR}
for SUITE in ${SUITES}; do \
for S in 12 15; do \
openscad -o ${DESTDIR}/die-$$SUITE-$$S.stl \
-D suite=\"$$SUITE\" -D s=$$S src/die.scad; \
done \
done
for S in 12 15; do \
openscad -o ${DESTDIR}/suite_die-$$S.stl \
-D suites='["'`echo ${SUITES} | sed 's/ /","/g'`'"]' \
-D s=$$S src/suite_die.scad; \
done
pawns:
mkdir -p ${DESTDIR}
for SUITE in ${SUITES}; do \
openscad -o ${DESTDIR}/pawn-$$SUITE.stl \
-D suite=\"$$SUITE\" src/pawn.scad; \
done
saucers:
mkdir -p ${DESTDIR}
for SUITE in ${SUITES}; do \
openscad -o ${DESTDIR}/saucer-$$SUITE.stl \
-D suite=\"$$SUITE\" src/saucer.scad; \
done
pyramids:
mkdir -p ${DESTDIR}
for SUITE in ${SUITES} null; do \
for VALUE in null; do \
for S in "24 44" "22 40" "20 36" "18 32" "16 28" "14 24"; do \
W=`echo $$S | cut -d' ' -f 1`; \
H=`echo $$S | cut -d' ' -f 2`; \
openscad -o ${DESTDIR}/pyramid-$${W}x$$H-$$SUITE-$$VALUE.stl \
-D suite=\"$$SUITE\" -D value=\"$$VALUE\" \
-D w=$$W -D h=$$H src/pyramid.scad; \
done \
done \
done
gcode: tiles coins dice pawns saucers pyramids
for T in ${DESTDIR}/tile*.stl; do \
${SLIC3R} --load ${CONFDIR}/tiles.ini $$T; \
done
for T in ${DESTDIR}/coin*.stl ${DESTDIR}/saucer*.stl; do \
${SLIC3R} --load ${CONFDIR}/coins.ini $$T; \
done
for T in ${DESTDIR}/die*.stl ${DESTDIR}/suite_die*.stl; do \
${SLIC3R} --load ${CONFDIR}/dice.ini $$T; \
done
for T in ${DESTDIR}/pawn*.stl ${DESTDIR}/pawn*.stl; do \
${SLIC3R} --load ${CONFDIR}/pawns.ini $$T; \
done
for T in ${DESTDIR}/pyramid*.stl; do \
${SLIC3R} --load ${CONFDIR}/pyramids.ini $$T; \
done
|