mirror of
https://github.com/Luzifer/3dmodels.git
synced 2024-12-23 02:41:19 +00:00
Add first revision of change holder
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
a036d1f599
commit
11c6e1eac1
3 changed files with 3187 additions and 0 deletions
|
@ -6,6 +6,7 @@ In case you have use for those models thankfully to Github you can preview all m
|
||||||
|
|
||||||
| Model | Source | Version | Title |
|
| 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 |
|
| [`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 |
|
| [`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 |
|
| [`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
76
change-holder.jscad
Normal 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
3110
change-holder.stl
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue