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

Add car-park wash-coin holder

Add first draft

Signed-off-by: Knut Ahlers <knut@ahlers.me>

Improve model after first assembly

- bottom cap fitting: was too tight
- top cap cover: 0.5 * width allows coin to fall out
- inner spacing: was too high for spring to cover

Signed-off-by: Knut Ahlers <knut@ahlers.me>

Generate waschmarken STL

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2022-09-12 19:36:16 +02:00
parent 6a3dc6c98b
commit 3878360fda
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D
3 changed files with 21523 additions and 0 deletions

View file

@ -15,3 +15,4 @@ In case you have use for those models thankfully to Github you can preview all m
| [`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 |
| [`towelholder.stl`](towelholder.stl) | [`towelholder.jscad`](towelholder.jscad) | 0.1.1 | Kitchen-towel holder for fridge |
| [`waschmarken.stl`](waschmarken.stl) | [`waschmarken.jscad`](waschmarken.jscad) | 0.1.0 | Spring-holder for coins for the car-wash-park |

128
waschmarken.jscad Normal file
View file

@ -0,0 +1,128 @@
/*
* title : Spring-holder for coins for the car-wash-park
* author : Knut Ahlers
* revision : 0.1.0
*/
const { cuboid, cylinder } = require('@jscad/modeling').primitives
const { subtract, union } = require('@jscad/modeling').booleans
const { translate } = require('@jscad/modeling').transforms
const coinDia = 27.0 // mm
const coinHeight = 1.8 // mm
const coinToWallSpacing = 0.25 // mm
const springCompressedHeight = 9 // mm
const springRelaxedHeight = 30 // mm
const springRadius = 9 // mm
const wallThickness = 1.5 // mm
function bottomCap() {
return union(
translate([0, 0, 0.5 * wallThickness], cylinder({
height: wallThickness,
radius: outerRadius(),
segments: 64,
})),
translate([0, 0, 0.5 * (wallThickness + springCompressedHeight)], subtract(
cylinder({
height: wallThickness + springCompressedHeight,
radius: outerRadius() - wallThickness - 0.5 * coinToWallSpacing,
segments: 64,
}),
cylinder({
height: wallThickness + springCompressedHeight,
radius: springRadius,
segments: 64,
})
))
)
}
function cylinderHeight() {
return innerSpacingHeight() + wallThickness
}
function innerBlock() {
return translate([0, 0, coinHeight], subtract(
cylinder({
height: 2 * coinHeight,
radius: 0.5 * coinDia,
segments: 64,
}),
translate([0, 0, 0.5 * coinHeight], subtract(
cylinder({
height: coinHeight,
radius: springRadius + 0.75,
segments: 64,
}),
cylinder({
height: coinHeight,
radius: springRadius - 0.75,
segments: 64,
})
))
))
}
function innerSpacingHeight() {
return springRelaxedHeight - 0.5 * coinHeight
}
function outerRadius() {
return 0.5 * coinDia + coinToWallSpacing + wallThickness
}
function topCap() {
const topCapHeight = 1.5 * coinHeight + wallThickness
const topCapInnerRadius = 0.5 * coinDia + coinToWallSpacing
const topCapRadius = topCapInnerRadius + wallThickness
return translate([0, 0, 0.5 * topCapHeight], subtract(
cylinder({
height: topCapHeight,
radius: topCapRadius,
segments: 64,
}),
subtract(
translate([0, 0.5 * topCapRadius, 0], cuboid({
size: [2 * topCapRadius, topCapRadius, topCapHeight],
})),
translate([0, 0, 0.5 * topCapHeight - 0.5 * wallThickness], cylinder({
height: wallThickness,
radius: 0.65 * topCapRadius,
segments: 64,
}))
),
translate([0, 0, -0.5 * wallThickness], cylinder({
height: 1.5 * coinHeight,
radius: topCapInnerRadius,
segments: 64,
}))
))
}
function main() {
return union(
translate([0, 0, 0.5 * cylinderHeight()], union(
subtract(
cylinder({
height: cylinderHeight(),
radius: outerRadius(),
segments: 64,
}),
cylinder({
height: cylinderHeight(),
radius: 0.5 * coinDia + coinToWallSpacing,
segments: 64,
})
),
translate([0, 0, 0.5 * cylinderHeight()], topCap())
)),
translate([2.5 * outerRadius(), 0, 0], bottomCap()),
translate([-2.5 * outerRadius(), 0, 0], innerBlock())
)
}
module.exports = { main }
// vim: set ft=javascript :

21394
waschmarken.stl Normal file

File diff suppressed because it is too large Load diff