1
0
Fork 0
mirror of https://github.com/Luzifer/3dmodels.git synced 2024-10-18 13:14:18 +00:00

Add vents to housing for env sensors

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-01-03 18:16:53 +01:00
parent 17b0d31b95
commit b50433f5bb
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
3 changed files with 19222 additions and 7083 deletions

View file

@ -6,4 +6,4 @@ In case you have use for those models thankfully to Github you can preview all m
| Model | Source | Version | Title | | Model | Source | Version | Title |
| ----- | ------ | ------- | ----- | | ----- | ------ | ------- | ----- |
| [`sonoff_dev_housing.stl`](sonoff_dev_housing.stl) | [`sonoff_dev_housing.jscad`](sonoff_dev_housing.jscad) | 0.1 | Sonoff DEV box for lamp post | | [`sonoff_dev_housing.stl`](sonoff_dev_housing.stl) | [`sonoff_dev_housing.jscad`](sonoff_dev_housing.jscad) | 0.2 | Sonoff DEV box for lamp post |

View file

@ -1,8 +1,6 @@
// title : Sonoff DEV box for lamp post // title : Sonoff DEV box for lamp post
// author : Knut Ahlers // author : Knut Ahlers
// license : MIT License // revision : 0.2
// revision : 0.1
// file : sonoff_dev_lamp.jscad
// All measurements in mm // All measurements in mm
const innerSpace = 15 // free room on the inside from the board not to bend the cables that hard const innerSpace = 15 // free room on the inside from the board not to bend the cables that hard
@ -16,8 +14,50 @@ const lampPostSupport = lampPostRadius + 4.5 // adjust for proper grip
const screwBaseSize = 3 // block to screw the screw into const screwBaseSize = 3 // block to screw the screw into
const screwHeadRadius = 1.25 // screw head diameter = 2*screwHeadRadius const screwHeadRadius = 1.25 // screw head diameter = 2*screwHeadRadius
const screwDiameter = 0.4 // diameter for the hole the screw is screwed into const screwDiameter = 0.4 // diameter for the hole the screw is screwed into
const ventSize = 1
const ventWidth = (boardSize + innerSpace - 5 * ventSize) / 2
const wall = 2.5 // wall thickness const wall = 2.5 // wall thickness
function addVents(obj) {
const ventRow = difference(
union(
cube({ size: [
boardSize + innerSpace + wall + 10,
ventWidth * 2 + ventSize,
ventSize,
], center: true }),
cube({ size: [
ventWidth * 2 + ventSize,
boardSize + innerSpace + wall + 10,
ventSize,
], center: true })
),
union(
cube({ size: [
boardSize + innerSpace + wall + 10,
ventSize * 3,
ventSize
], center: true}),
cube({ size: [
ventSize * 3,
boardSize + innerSpace + wall + 10,
ventSize
], center: true})
)
)
const endZ = ((innerSpaceHeight + wall) / 2) * -1 + 1.5 * ventSize
const startZ = ((innerSpaceHeight + wall) / 2) - 2 * ventSize - wall
for (let z = startZ; z >= endZ; z -= 3 * ventSize) {
obj = difference(
obj,
ventRow.translate([0, 0, z])
)
}
return obj
}
function main() { function main() {
const boardSupport = cylinder({ const boardSupport = cylinder({
h: boardSupportHeight + wall, h: boardSupportHeight + wall,
@ -45,6 +85,7 @@ function main() {
// Housing without lid // Housing without lid
union( union(
// Housing with holder // Housing with holder
addVents(
difference( difference(
union( union(
// Main housing block // Main housing block
@ -71,12 +112,14 @@ function main() {
.rotateY(90) .rotateY(90)
.translate([0, 0, (innerSpaceHeight + wall)/2]) .translate([0, 0, (innerSpaceHeight + wall)/2])
), ),
// Inner housing // Inner housing
cube({ size: [ cube({ size: [
boardSize + innerSpace, boardSize + innerSpace,
boardSize + innerSpace, boardSize + innerSpace,
innerSpaceHeight, innerSpaceHeight,
], center: true }).translate([0, 0, wall * -1]) ], center: true }).translate([0, 0, wall * -1])
)
), ),
// Board supports // Board supports

File diff suppressed because it is too large Load diff