2024-11-18 16:20:32 -06:00
|
|
|
rpizWidth = 30
|
|
|
|
rpizLength = 65
|
|
|
|
|
|
|
|
caseThickness = 1
|
|
|
|
|
|
|
|
border = 4
|
|
|
|
|
|
|
|
screwHeight = 4
|
|
|
|
|
|
|
|
caseWidth = rpizWidth + border * 2
|
|
|
|
caseLength = rpizLength + border * 2
|
|
|
|
caseHeight = 8
|
|
|
|
|
|
|
|
widthBetweenScrews = 23
|
|
|
|
lengthBetweenScrews = 29 * 2
|
|
|
|
|
|
|
|
miniHdmiDistance = 12.4
|
|
|
|
microUsb1Distance = 41.4
|
|
|
|
microUsb2Distance = 54
|
|
|
|
|
|
|
|
miniHdmiWidth = 11.2
|
|
|
|
microUsbWidth = 7.4
|
|
|
|
connectorPadding = 4
|
|
|
|
|
|
|
|
miniHdmiHole = startSketchAt([
|
|
|
|
0,
|
|
|
|
border + miniHdmiDistance - (miniHdmiWidth / 2)
|
|
|
|
])
|
|
|
|
|> lineTo([
|
|
|
|
0,
|
|
|
|
border + miniHdmiDistance + miniHdmiWidth / 2
|
|
|
|
], %)
|
|
|
|
|> lineTo([
|
|
|
|
1,
|
|
|
|
border + miniHdmiDistance + miniHdmiWidth / 2
|
|
|
|
], %)
|
|
|
|
|> lineTo([
|
|
|
|
1,
|
|
|
|
border + miniHdmiDistance - (miniHdmiWidth / 2)
|
|
|
|
], %)
|
|
|
|
|> close(%)
|
|
|
|
|
|
|
|
case = startSketchOn('XY')
|
|
|
|
|> startProfileAt([0, 0], %)
|
|
|
|
|> lineTo([caseWidth, 0], %, $edge1)
|
|
|
|
|> lineTo([caseWidth, caseLength], %, $edge2)
|
|
|
|
|> lineTo([0, caseLength], %, $edge3)
|
|
|
|
|> close(%, $edge4)
|
|
|
|
|> extrude(caseHeight, %)
|
|
|
|
|> fillet({
|
2024-11-25 09:21:55 +13:00
|
|
|
radius = 1,
|
|
|
|
tags = [
|
2024-11-18 16:20:32 -06:00
|
|
|
getNextAdjacentEdge(edge1),
|
|
|
|
getNextAdjacentEdge(edge2),
|
|
|
|
getNextAdjacentEdge(edge3),
|
|
|
|
getNextAdjacentEdge(edge4)
|
|
|
|
]
|
|
|
|
}, %)
|
|
|
|
|
|
|
|
fn m25Screw = (x, y, height) => {
|
|
|
|
screw = startSketchOn("XY")
|
|
|
|
|> startProfileAt([0, 0], %)
|
2024-11-25 09:21:55 +13:00
|
|
|
|> circle({ center = [x, y], radius = 2.5 }, %)
|
|
|
|
|> hole(circle({ center = [x, y], radius = 1.25 }, %), %)
|
2024-11-18 16:20:32 -06:00
|
|
|
|> extrude(height, %)
|
|
|
|
return screw
|
|
|
|
}
|
|
|
|
|
|
|
|
m25Screw(border + rpizWidth / 2 - (widthBetweenScrews / 2), 0 + border + rpizLength / 2 - (lengthBetweenScrews / 2), screwHeight)
|
|
|
|
|
|
|
|
m25Screw(border + rpizWidth / 2 - (widthBetweenScrews / 2), 0 + border + rpizLength / 2 + lengthBetweenScrews / 2, screwHeight)
|
|
|
|
|
|
|
|
m25Screw(border + rpizWidth / 2 + widthBetweenScrews / 2, 0 + border + rpizLength / 2 + lengthBetweenScrews / 2, screwHeight)
|
|
|
|
|
|
|
|
m25Screw(border + rpizWidth / 2 + widthBetweenScrews / 2, 0 + border + rpizLength / 2 - (lengthBetweenScrews / 2), screwHeight)
|
|
|
|
|
|
|
|
shell({
|
2024-11-25 09:21:55 +13:00
|
|
|
faces = ['end'],
|
|
|
|
thickness = caseThickness
|
2024-11-18 16:20:32 -06:00
|
|
|
}, case)
|