1
0
Fork 0
mirror of https://github.com/Luzifer/3dmodels.git synced 2024-12-23 02:41:19 +00:00

Add power inlet, fix broken wall calculation

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-01-04 04:52:25 +01:00
parent 383f44e6d2
commit f4079cc3ef
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
3 changed files with 29843 additions and 40293 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.2.2 | Sonoff DEV box for lamp post | | [`sonoff_dev_housing.stl`](sonoff_dev_housing.stl) | [`sonoff_dev_housing.jscad`](sonoff_dev_housing.jscad) | 0.2.3 | Sonoff DEV box for lamp post |

View file

@ -1,22 +1,25 @@
// title : Sonoff DEV box for lamp post // title : Sonoff DEV box for lamp post
// author : Knut Ahlers // author : Knut Ahlers
// revision : 0.2.2 // revision : 0.2.3
// All measurements in mm // All measurements in mm
const innerSpace = 7 // free room on the inside from the board not to bend the cables that hard const boardSize = 51 // 51x51mm
const innerSpaceHeight = 30 const boardSupportHeight = 6 // pins to put the board on
const boardSize = 50 // 50x50mm const boardSupportRadius = 1.25
const boardSupportHeight = 10 // 10mm pins to put the board on
const boardSupportRadius = 2
const boardSupportEdgeDist = 2.5 // 2.5mm from the edges const boardSupportEdgeDist = 2.5 // 2.5mm from the edges
const innerSpace = 7 // free room on the inside from the board not to bend the cables that hard
const innerSpaceHeight = 20
const lampPostRadius = 7 // 14mm diameter const lampPostRadius = 7 // 14mm diameter
const lampPostSupport = lampPostRadius + 4.5 // adjust for proper grip const lampPostSupport = lampPostRadius + 4.5 // adjust for proper grip
const powerInletHeight = 8 // Size of power adapter
const powerInletWidth = 14 // Size of power adapter
const powerInletPosY = boardSize / -2 + 13 + powerInletWidth / 2
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 screwRadius = 0.7 // radius for the hole the screw is screwed into const screwRadius = 0.7 // radius for the hole the screw is screwed into
const ventSize = 1 const ventSize = 1
const ventWidth = (boardSize + innerSpace - 5 * ventSize) / 2 const ventWidth = (boardSize + innerSpace - 5 * ventSize) / 2
const wall = 2.5 // wall thickness const wall = 1.5 // wall thickness
function addVents(obj) { function addVents(obj) {
const ventRow = difference( const ventRow = difference(
@ -85,15 +88,18 @@ function main() {
// Housing without lid // Housing without lid
union( union(
// Housing with holder // Housing with holder
difference(
union(
addVents( addVents(
difference( difference(
union( union(
// Main housing block // Main housing block
cube({ size: [ cube({ size: [
boardSize + innerSpace + wall, boardSize + innerSpace + wall*2,
boardSize + innerSpace + wall, boardSize + innerSpace + wall*2,
innerSpaceHeight + wall, innerSpaceHeight + wall,
], center: true }), ], center: true }),
// Lamp post holder // Lamp post holder
difference( difference(
cylinder({ cylinder({
@ -107,7 +113,7 @@ function main() {
r: lampPostRadius, r: lampPostRadius,
center: true, center: true,
resolution: 100, resolution: 100,
}).translate([-7.5, 0, 0]) }).translate([lampPostRadius * -1, 0, 0])
) )
.rotateY(90) .rotateY(90)
.translate([0, 0, (innerSpaceHeight + wall)/2]) .translate([0, 0, (innerSpaceHeight + wall)/2])
@ -118,9 +124,25 @@ function main() {
boardSize + innerSpace, boardSize + innerSpace,
boardSize + innerSpace, boardSize + innerSpace,
innerSpaceHeight, innerSpaceHeight,
], center: true }).translate([0, 0, wall * -1]) ], center: true }).translate([0, 0, wall * -0.5])
) )
), ),
// Outer border of power inlet
cube({ size: [wall, powerInletWidth + wall * 2, powerInletHeight + wall * 2], center: true })
.translate([
(boardSize + innerSpace + wall) / 2,
powerInletPosY,
(innerSpaceHeight + wall) / 2 - (wall + powerInletHeight / 2)
])
),
// Inner space of power inlet
cube({ size: [wall, powerInletWidth, powerInletHeight], center: true})
.translate([
(boardSize + innerSpace + wall) / 2,
powerInletPosY,
(innerSpaceHeight + wall) / 2 - (wall + powerInletHeight / 2)
])
),
// Board supports // Board supports
translate([ translate([
@ -170,8 +192,8 @@ function main() {
// Lid // Lid
difference( difference(
cube({ size: [ cube({ size: [
boardSize + innerSpace + wall, boardSize + innerSpace + wall * 2,
boardSize + innerSpace + wall, boardSize + innerSpace + wall * 2,
wall, wall,
], center: true }), ], center: true }),

File diff suppressed because it is too large Load diff