From ec3cc8cb8a6d2ca77dadcb4a996067222b47ed90 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Tue, 30 Aug 2022 16:29:36 -0600 Subject: [PATCH] Trench depth tweak, build system work --- build/build.sh => build.sh | 4 ++-- chip.scad | 7 ++++--- {build => parameters}/full-circle.json | 0 {build => parameters}/full-hex.json | 0 {build => parameters}/mini-circle.json | 0 {build => parameters}/mini-hex.json | 0 6 files changed, 6 insertions(+), 5 deletions(-) rename build/build.sh => build.sh (73%) rename {build => parameters}/full-circle.json (100%) rename {build => parameters}/full-hex.json (100%) rename {build => parameters}/mini-circle.json (100%) rename {build => parameters}/mini-hex.json (100%) 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