What I'm printing in bulk.

I did a bunch of annonying my family members with stupid questions
about whether 0.5mm change was important. This is what we wound up with.
This commit is contained in:
Neale Pickett 2022-08-29 16:46:59 -06:00
commit fdd57cc133
6 changed files with 143 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.stl

21
LICENSE.md Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright © 2022 Neale Pickett <neale@woozle.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The software is provided "as is", without warranty of any kind, express or
implied, including but not limited to the warranties of merchantability,
fitness for a particular purpose and noninfringement. In no event shall the
authors or copyright holders be liable for any claim, damages or other
liability, whether in an action of contract, tort or otherwise, arising from,
out of or in connection with the software or the use or other dealings in the
software.

45
README.md Normal file
View File

@ -0,0 +1,45 @@
# Poker Chips
This is an OpenSCAD program to build a poker chip.
You can tell it how many sides you want.
Want round ones? Tell it 360 sides.
I like hexagonal ones, so that's the default.
The front has text on it,
the back doesn't.
So you can use them for games that need some sort of coin with two sides.
# Chip Colors
This is what I found on some random crafting web site.
I hate poker,
so random website's color scheme works fine for me.
| Value | Color |
| --- | --- |
| 1 | White |
| 5 | Red |
| 10 | Blue |
| 25 | Green |
| 50 | Orange |
| 100 | Black |
| 250 | Light Red |
| 500 | Purple |
| 1000 | Yellow |
| 2000 | Light Blue |
| 5000 | Brown |
# Chip Sizes
A "standard" poker chip is 39mm wide, and 3.5mm thick.
A "miniature" poker chip is 22m wide, and 3.5mm thick.
There are boxes you can print that work will with these dimensions.
You can make yours whatever size you like, though.
I won't tell anybody.

6
build.sh Executable file
View File

@ -0,0 +1,6 @@
#! /bin/sh
cat parameters.json | jq -r ".parameterSets | keys | .[]" \
| while read param; do
openscad -o "${param}.stl" -p parameters.json -P "${param}" chip.scad
done

53
chip.scad Normal file
View File

@ -0,0 +1,53 @@
// Diameter of the coin (mm)
diameter = 22;
// Height of the coin (mm)
height = 2;
// Engraving depth (mm)
depth = 0.5;
// Number of sides on your coin
sides = 6; // [3:360]
// Text to display
TEXT = "100";
fontScale = (
sides == 3 ? 0.50
: sides == 4 ? 0.80
: sides == 5 ? 0.80
: sides == 6 ? 0.90
: 1.00
);
// Enough width to fit four digits
fontSize = diameter * 0.21 * fontScale;
// Rotate odd-numbers of sides to maximize width
rotation = (sides%2)?90:0;
module chip() {
intersection() {
cylinder(h=height, d=diameter, center=true, $fn=sides);
union() {
difference() {
cube([diameter, diameter, height], center=true);
difference() {
cylinder(h=height, d=diameter*0.8-0.0, center=true, $fn=sides);
cylinder(h=height, d=diameter*0.8-2, center=true, $fn=sides);
}
}
for (i = [0 : 30 : 360]) {
rotate(i) cube([diameter*0.8, diameter/8, height*0.7], center=true);
}
}
}
}
difference() {
rotate(rotation) chip();
translate([0, 0, height/2-depth])
linear_extrude(height=depth+0.1, convexity = 10, twist = 0)
text(text=TEXT, font="Droid Sans:style=Bold", size=fontSize, halign="center", valign="center");
}

17
parameters.json Normal file
View File

@ -0,0 +1,17 @@
{
"parameterSets": {
"1": {"TEXT": "1"},
"2": {"TEXT": "2"},
"5": {"TEXT": "5"},
"10": {"TEXT": "10"},
"20": {"TEXT": "20"},
"25": {"TEXT": "25"},
"50": {"TEXT": "50"},
"100": {"TEXT": "100"},
"250": {"TEXT": "250"},
"500": {"TEXT": "500"},
"1000": {"TEXT": "1000"},
"2000": {"TEXT": "2000"},
"5000": {"TEXT": "5000"}
}
}