From fb12832bfbfd1f2e0237bacd2776d215557ade9d Mon Sep 17 00:00:00 2001 From: Elena of Valhalla'' Grandi Date: Thu, 21 Nov 2013 17:54:19 +0100 Subject: Coin model --- Makefile | 10 ++++++++++ src/coin.scad | 6 ++++++ src/piecepack.scad | 16 ++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 src/coin.scad diff --git a/Makefile b/Makefile index dd0ffe6..880eb7e 100644 --- a/Makefile +++ b/Makefile @@ -10,3 +10,13 @@ tiles: done \ done +coins: + mkdir -p ${DESTDIR} + for SUITE in suns moons crowns arms; do \ + for VALUE in null ace 2 3 4 5; do \ + openscad -o ${DESTDIR}/coin-$$SUITE-$$VALUE.stl \ + -D suite=\"$$SUITE\" -D value=\"$$VALUE\" src/coin.scad; \ + done \ + done + +all: tiles coins diff --git a/src/coin.scad b/src/coin.scad new file mode 100644 index 0000000..30e032f --- /dev/null +++ b/src/coin.scad @@ -0,0 +1,6 @@ +use ; + +suite="arms"; +value="ace"; + +coin(suite,value); diff --git a/src/piecepack.scad b/src/piecepack.scad index 0af95e5..ce6e62a 100644 --- a/src/piecepack.scad +++ b/src/piecepack.scad @@ -19,3 +19,19 @@ module tile(suite,value) { } } +module coin(suite,value) { + difference() { + cylinder(r=10, h=3); + translate([0,0,-0.5]) linear_extrude(height=1.5) scale(0.4) + translate([-25,-25,0]) + import(str("../graphics/",suite,".dxf"),center=true); + if (value != "null") { + translate([0,0,2]) linear_extrude(height=1.5) scale(0.4) + translate([-25,-25,0]) + import(str("../graphics/",value,".dxf"),center=true); + } + translate([0,10,3]) rotate([90,0,0]) cylinder(r=0.8, h=2); + translate([0,10,0]) rotate([90,0,0]) cylinder(r=0.8, h=2); + } +} + -- cgit v1.2.3