diff options
author | Elena of Valhalla'' Grandi <valhalla@trueelena.org> | 2013-11-17 10:08:30 +0100 |
---|---|---|
committer | Elena of Valhalla'' Grandi <valhalla@trueelena.org> | 2013-11-17 10:08:30 +0100 |
commit | 2b9dfde03d56d6298cd168175a9fa8db13eb4a63 (patch) | |
tree | 6adda38ba2894ebd926463681dc01c7a0dbf10b9 | |
parent | d9bd902d2af94a962769d09833ab8a1909b4b118 (diff) |
Generation of tiles via Makefile
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | src/piecepack.scad (renamed from models/tiles.scad) | 13 | ||||
-rw-r--r-- | src/tile.scad | 6 |
3 files changed, 25 insertions, 6 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..dd0ffe6 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ + +DESTDIR=build + +tiles: + mkdir -p ${DESTDIR} + for SUITE in suns moons crowns arms; do \ + for VALUE in null ace 2 3 4 5; do \ + openscad -o ${DESTDIR}/tile-$$SUITE-$$VALUE.stl \ + -D suite=\"$$SUITE\" -D value=\"$$VALUE\" src/tile.scad; \ + done \ + done + diff --git a/models/tiles.scad b/src/piecepack.scad index f325d1d..0af95e5 100644 --- a/models/tiles.scad +++ b/src/piecepack.scad @@ -1,13 +1,15 @@ -suite="arms"; -value="arms"; - module tile(suite,value) { union() { difference(){ translate([0,0,0.4]) cube([50,50,4.6]); - translate([0,0,4]) linear_extrude(height=2) - import(str("../graphics/",value,".dxf")); + if (value == "ace") { + translate([0,0,4]) linear_extrude(height=2) + import(str("../graphics/",suite,".dxf")); + } else if (value != "null") { + translate([0,0,4]) linear_extrude(height=2) + import(str("../graphics/",value,".dxf")); + } translate([2,38,4]) linear_extrude(height=2) scale(0.2) import(str("../graphics/",suite,".dxf")); } cube([24.5,24.5,1]); @@ -17,4 +19,3 @@ module tile(suite,value) { } } -tile(suite,value); diff --git a/src/tile.scad b/src/tile.scad new file mode 100644 index 0000000..b168051 --- /dev/null +++ b/src/tile.scad @@ -0,0 +1,6 @@ +use <piecepack.scad>; + +suite="arms"; +value="ace"; + +tile(suite,value); |