Trench depth tweak, build system work

This commit is contained in:
Neale Pickett 2022-08-30 16:29:36 -06:00
parent 778d47ed42
commit ec3cc8cb8a
6 changed files with 6 additions and 5 deletions

View File

@ -17,9 +17,9 @@ run () {
"$@" "$@"
} }
basedir=$(dirname $0)/.. basedir=$(dirname $0)
cat $1 | jq -r ".parameterSets | keys | .[]" \ cat $1 | jq -r ".parameterSets | keys | .[]" \
| while read param; do | 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 done

View File

@ -5,7 +5,7 @@ diameter = 39;
height = 3.5; height = 3.5;
// Engraving depth (mm) // Engraving depth (mm)
depth = 0.5; depth = 0.4;
// Number of sides on your coin // Number of sides on your coin
sides = 360; // [3:360] sides = 360; // [3:360]
@ -45,13 +45,14 @@ module chip() {
} }
} }
spokeHeight = height - (2*depth);
if (spokes == 0) { if (spokes == 0) {
cube([diameter, diameter, height*0.7], center=true); cube([diameter, diameter, spokeHeight], center=true);
} else { } else {
spokeWidth = (diameter/spokes) * 0.8; spokeWidth = (diameter/spokes) * 0.8;
rotate((sides+spokes)%2?90:0) { rotate((sides+spokes)%2?90:0) {
for (i = [0 : 360/spokes : 360]) { 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);
} }
} }
} }