Spokes, not holes.

This commit is contained in:
Neale Pickett 2022-08-30 11:44:50 -06:00
parent f55fd473ae
commit 778d47ed42
6 changed files with 389 additions and 9 deletions

View File

@ -4,9 +4,9 @@ This is an OpenSCAD program to build a poker chip.
<img src="chip.webp" alt="sample chip" height="320"> <img src="chip.webp" alt="sample chip" height="320">
You can tell it how many sides you want. You can tell it how many sides you want (round = 360 sides),
Want round ones? Tell it 360 sides. how many spokes you want,
I like hexagonal ones, so that's the default. and the dimensions.
The front has text on it, The front has text on it,
the back doesn't. the back doesn't.

95
build/full-circle.json Normal file
View File

@ -0,0 +1,95 @@
{
"parameterSets": {
"full-circle-1": {
"diameter": 39,
"height": 3.5,
"sides": 360,
"spokes": 6,
"text": "1"
},
"full-circle-2": {
"diameter": 39,
"height": 3.5,
"sides": 360,
"spokes": 6,
"text": "2"
},
"full-circle-5": {
"diameter": 39,
"height": 3.5,
"sides": 360,
"spokes": 6,
"text": "5"
},
"full-circle-10": {
"diameter": 39,
"height": 3.5,
"sides": 360,
"spokes": 6,
"text": "10"
},
"full-circle-20": {
"diameter": 39,
"height": 3.5,
"sides": 360,
"spokes": 6,
"text": "20"
},
"full-circle-25": {
"diameter": 39,
"height": 3.5,
"sides": 360,
"spokes": 6,
"text": "25"
},
"full-circle-50": {
"diameter": 39,
"height": 3.5,
"sides": 360,
"spokes": 6,
"text": "50"
},
"full-circle-100": {
"diameter": 39,
"height": 3.5,
"sides": 360,
"spokes": 6,
"text": "100"
},
"full-circle-250": {
"diameter": 39,
"height": 3.5,
"sides": 360,
"spokes": 6,
"text": "250"
},
"full-circle-500": {
"diameter": 39,
"height": 3.5,
"sides": 360,
"spokes": 6,
"text": "500"
},
"full-circle-1000": {
"diameter": 39,
"height": 3.5,
"sides": 360,
"spokes": 6,
"text": "1000"
},
"full-circle-2000": {
"diameter": 39,
"height": 3.5,
"sides": 360,
"spokes": 6,
"text": "2000"
},
"full-circle-5000": {
"diameter": 39,
"height": 3.5,
"sides": 360,
"spokes": 6,
"text": "5000"
}
}
}

95
build/full-hex.json Normal file
View File

@ -0,0 +1,95 @@
{
"parameterSets": {
"full-hex-1": {
"diameter": 39,
"height": 3.5,
"sides": 6,
"spokes": 6,
"text": "1"
},
"full-hex-2": {
"diameter": 39,
"height": 3.5,
"sides": 6,
"spokes": 6,
"text": "2"
},
"full-hex-5": {
"diameter": 39,
"height": 3.5,
"sides": 6,
"spokes": 6,
"text": "5"
},
"full-hex-10": {
"diameter": 39,
"height": 3.5,
"sides": 6,
"spokes": 6,
"text": "10"
},
"full-hex-20": {
"diameter": 39,
"height": 3.5,
"sides": 6,
"spokes": 6,
"text": "20"
},
"full-hex-25": {
"diameter": 39,
"height": 3.5,
"sides": 6,
"spokes": 6,
"text": "25"
},
"full-hex-50": {
"diameter": 39,
"height": 3.5,
"sides": 6,
"spokes": 6,
"text": "50"
},
"full-hex-100": {
"diameter": 39,
"height": 3.5,
"sides": 6,
"spokes": 6,
"text": "100"
},
"full-hex-250": {
"diameter": 39,
"height": 3.5,
"sides": 6,
"spokes": 6,
"text": "250"
},
"full-hex-500": {
"diameter": 39,
"height": 3.5,
"sides": 6,
"spokes": 6,
"text": "500"
},
"full-hex-1000": {
"diameter": 39,
"height": 3.5,
"sides": 6,
"spokes": 6,
"text": "1000"
},
"full-hex-2000": {
"diameter": 39,
"height": 3.5,
"sides": 6,
"spokes": 6,
"text": "2000"
},
"full-hex-5000": {
"diameter": 39,
"height": 3.5,
"sides": 6,
"spokes": 6,
"text": "5000"
}
}
}

95
build/mini-circle.json Normal file
View File

@ -0,0 +1,95 @@
{
"parameterSets": {
"mini-circle-1": {
"diameter": 22,
"height": 2,
"sides": 360,
"spokes": 4,
"text": "1"
},
"mini-circle-2": {
"diameter": 22,
"height": 2,
"sides": 360,
"spokes": 4,
"text": "2"
},
"mini-circle-5": {
"diameter": 22,
"height": 2,
"sides": 360,
"spokes": 4,
"text": "5"
},
"mini-circle-10": {
"diameter": 22,
"height": 2,
"sides": 360,
"spokes": 4,
"text": "10"
},
"mini-circle-20": {
"diameter": 22,
"height": 2,
"sides": 360,
"spokes": 4,
"text": "20"
},
"mini-circle-25": {
"diameter": 22,
"height": 2,
"sides": 360,
"spokes": 4,
"text": "25"
},
"mini-circle-50": {
"diameter": 22,
"height": 2,
"sides": 360,
"spokes": 4,
"text": "50"
},
"mini-circle-100": {
"diameter": 22,
"height": 2,
"sides": 360,
"spokes": 4,
"text": "100"
},
"mini-circle-250": {
"diameter": 22,
"height": 2,
"sides": 360,
"spokes": 4,
"text": "250"
},
"mini-circle-500": {
"diameter": 22,
"height": 2,
"sides": 360,
"spokes": 4,
"text": "500"
},
"mini-circle-1000": {
"diameter": 22,
"height": 2,
"sides": 360,
"spokes": 4,
"text": "1000"
},
"mini-circle-2000": {
"diameter": 22,
"height": 2,
"sides": 360,
"spokes": 4,
"text": "2000"
},
"mini-circle-5000": {
"diameter": 22,
"height": 2,
"sides": 360,
"spokes": 4,
"text": "5000"
}
}
}

95
build/mini-hex.json Normal file
View File

@ -0,0 +1,95 @@
{
"parameterSets": {
"mini-hexagon-1": {
"diameter": 22,
"height": 2,
"sides": 6,
"spokes": 3,
"text": "1"
},
"mini-hexagon-2": {
"diameter": 22,
"height": 2,
"sides": 6,
"spokes": 3,
"text": "2"
},
"mini-hexagon-5": {
"diameter": 22,
"height": 2,
"sides": 6,
"spokes": 3,
"text": "5"
},
"mini-hexagon-10": {
"diameter": 22,
"height": 2,
"sides": 6,
"spokes": 3,
"text": "10"
},
"mini-hexagon-20": {
"diameter": 22,
"height": 2,
"sides": 6,
"spokes": 3,
"text": "20"
},
"mini-hexagon-25": {
"diameter": 22,
"height": 2,
"sides": 6,
"spokes": 3,
"text": "25"
},
"mini-hexagon-50": {
"diameter": 22,
"height": 2,
"sides": 6,
"spokes": 3,
"text": "50"
},
"mini-hexagon-100": {
"diameter": 22,
"height": 2,
"sides": 6,
"spokes": 3,
"text": "100"
},
"mini-hexagon-250": {
"diameter": 22,
"height": 2,
"sides": 6,
"spokes": 3,
"text": "250"
},
"mini-hexagon-500": {
"diameter": 22,
"height": 2,
"sides": 6,
"spokes": 3,
"text": "500"
},
"mini-hexagon-1000": {
"diameter": 22,
"height": 2,
"sides": 6,
"spokes": 3,
"text": "1000"
},
"mini-hexagon-2000": {
"diameter": 22,
"height": 2,
"sides": 6,
"spokes": 3,
"text": "2000"
},
"mini-hexagon-5000": {
"diameter": 22,
"height": 2,
"sides": 6,
"spokes": 3,
"text": "5000"
}
}
}

View File

@ -10,8 +10,8 @@ depth = 0.5;
// Number of sides on your coin // Number of sides on your coin
sides = 360; // [3:360] sides = 360; // [3:360]
// How many holes (spokes) do you want? // How many spokes do you want?
holes = 6; // [0:12] spokes = 6; // [0:12]
// Text to display // Text to display
text = "100"; text = "100";
@ -45,12 +45,12 @@ module chip() {
} }
} }
if (holes == 0) { if (spokes == 0) {
cube([diameter, diameter, height*0.7], center=true); cube([diameter, diameter, height*0.7], center=true);
} else { } else {
spokeWidth = (diameter/holes) * 0.8; spokeWidth = (diameter/spokes) * 0.8;
rotate((sides+holes)%2?90:0) { rotate((sides+spokes)%2?90:0) {
for (i = [0 : 360/holes : 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, height*0.7], center=true);
} }
} }