diff --git a/build/build.sh b/build.sh similarity index 73% rename from build/build.sh rename to build.sh index 7a6840c..da532ff 100755 --- a/build/build.sh +++ b/build.sh @@ -17,9 +17,9 @@ run () { "$@" } -basedir=$(dirname $0)/.. +basedir=$(dirname $0) cat $1 | jq -r ".parameterSets | keys | .[]" \ | while read param; do - run openscad -o "chip-${param}.stl" -p "$basedir/$1" -P "${param}" chip.scad + run openscad -o "chip-${param}.stl" -p "$1" -P "${param}" $basedir/chip.scad done diff --git a/chip.scad b/chip.scad index 2d0dc15..a2c7571 100644 --- a/chip.scad +++ b/chip.scad @@ -5,7 +5,7 @@ diameter = 39; height = 3.5; // Engraving depth (mm) -depth = 0.5; +depth = 0.4; // Number of sides on your coin sides = 360; // [3:360] @@ -45,13 +45,14 @@ module chip() { } } + spokeHeight = height - (2*depth); if (spokes == 0) { - cube([diameter, diameter, height*0.7], center=true); + cube([diameter, diameter, spokeHeight], center=true); } else { spokeWidth = (diameter/spokes) * 0.8; rotate((sides+spokes)%2?90:0) { for (i = [0 : 360/spokes : 360]) { - rotate(i) translate([diameter/2, 0, 0]) cube([diameter, spokeWidth, height*0.7], center=true); + rotate(i) translate([diameter/2, 0, 0]) cube([diameter, spokeWidth, spokeHeight], center=true); } } } diff --git a/build/full-circle.json b/parameters/full-circle.json similarity index 100% rename from build/full-circle.json rename to parameters/full-circle.json diff --git a/build/full-hex.json b/parameters/full-hex.json similarity index 100% rename from build/full-hex.json rename to parameters/full-hex.json diff --git a/build/mini-circle.json b/parameters/mini-circle.json similarity index 100% rename from build/mini-circle.json rename to parameters/mini-circle.json diff --git a/build/mini-hex.json b/parameters/mini-hex.json similarity index 100% rename from build/mini-hex.json rename to parameters/mini-hex.json