1
0
Fork 0
mirror of https://github.com/Luzifer/3dmodels.git synced 2024-12-22 18:31:19 +00:00

Add first revision of change holder

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-07-14 19:36:28 +02:00
parent a036d1f599
commit 11c6e1eac1
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
3 changed files with 3187 additions and 0 deletions

View file

@ -6,6 +6,7 @@ In case you have use for those models thankfully to Github you can preview all m
| Model | Source | Version | Title |
| ----- | ------ | ------- | ----- |
| [`change-holder.stl`](change-holder.stl) | [`change-holder.jscad`](change-holder.jscad) | 0.1.0 | Spare-Change holder |
| [`razorholder.stl`](razorholder.stl) | [`razorholder.jscad`](razorholder.jscad) | 0.1.1 | Holder for T-Shape razor |
| [`sonoff_dev_housing.stl`](sonoff_dev_housing.stl) | [`sonoff_dev_housing.jscad`](sonoff_dev_housing.jscad) | 0.2.6 | Sonoff DEV box for lamp post |
| [`tas6515_swimmer.stl`](tas6515_swimmer.stl) | [`tas6515_swimmer.jscad`](tas6515_swimmer.jscad) | 0.1.10 | Tassimo TAS6515 swimmer replacement |

76
change-holder.jscad Normal file
View file

@ -0,0 +1,76 @@
/*
* title : Spare-Change holder
* author : Knut Ahlers
* revision : 0.1.0
*/
const coinCount = 15
const coinDiameters = [
24, // 1 EUR
26, // 2 EUR
]
const coinHeight = 3 // Use max coin thickness + a little but less than 2 coins
const fingerDia = 18 // Measure your finger, should be less than the smallest coin diameter
const height = coinCount * coinHeight // Think of something to hold all the coins but not too big
const wall = 2 // Something you're comfortable with to print and hold your coin
const blockHeight = () => coinDiameters.sort().reverse()[0] + wall
const blockWidth = () => coinDiameters.reduce((sum, v) => sum + v) + (coinDiameters.length + 1) * wall
const calcMove = (posY, slotDia) => slotDia / 2 + posY
/* exported main */
function main() {
// Create a block containing everything
let obj = cube({ size: [
height,
blockWidth(),
blockHeight(),
], center: true }).translate([0, blockWidth() / 2, 0])
let posY = wall
for (const slotDia of coinDiameters) {
// Remove pipes holding the coins
obj = difference(obj, cylinder({
center: true,
h: height,
r: slotDia / 2,
})
.rotateY(90)
.translate([
wall,
calcMove(posY, slotDia),
blockHeight() / 2 - slotDia / 2,
]))
// Remove finger access to coins
obj = difference(obj, cube({ size: [
height,
fingerDia,
slotDia / 2,
], center: true })
.translate([
0,
posY + slotDia / 2,
blockHeight() / 2 - slotDia / 4,
]))
// Remove one-coin-slot to pull coins out
obj = difference(obj, cube({ size: [
coinHeight,
slotDia,
slotDia / 2,
], center: true })
.translate([
height / -2 + wall + coinHeight / 2,
posY + slotDia / 2,
blockHeight() / 2 - slotDia / 4,
]))
posY += slotDia + wall
}
return obj
}
// vim: set ft=javascript:

3110
change-holder.stl Normal file

File diff suppressed because it is too large Load diff