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,41 +88,60 @@ function main() {
// Housing without lid // Housing without lid
union( union(
// Housing with holder // Housing with holder
addVents( difference(
difference( union(
union( addVents(
// Main housing block
cube({ size: [
boardSize + innerSpace + wall,
boardSize + innerSpace + wall,
innerSpaceHeight + wall,
], center: true }),
// Lamp post holder
difference( difference(
cylinder({ union(
h: boardSize + innerSpace + wall, // Main housing block
r: lampPostSupport, cube({ size: [
center: true, boardSize + innerSpace + wall*2,
resolution: 100, boardSize + innerSpace + wall*2,
}), innerSpaceHeight + wall,
cylinder({ ], center: true }),
h: boardSize + innerSpace + wall,
r: lampPostRadius,
center: true,
resolution: 100,
}).translate([-7.5, 0, 0])
)
.rotateY(90)
.translate([0, 0, (innerSpaceHeight + wall)/2])
),
// Inner housing // Lamp post holder
cube({ size: [ difference(
boardSize + innerSpace, cylinder({
boardSize + innerSpace, h: boardSize + innerSpace + wall,
innerSpaceHeight, r: lampPostSupport,
], center: true }).translate([0, 0, wall * -1]) center: true,
) resolution: 100,
}),
cylinder({
h: boardSize + innerSpace + wall,
r: lampPostRadius,
center: true,
resolution: 100,
}).translate([lampPostRadius * -1, 0, 0])
)
.rotateY(90)
.translate([0, 0, (innerSpaceHeight + wall)/2])
),
// Inner housing
cube({ size: [
boardSize + innerSpace,
boardSize + innerSpace,
innerSpaceHeight,
], 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
@ -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