-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apply fillets before a shell (#3261)
* add test for fillet and shell Signed-off-by: Jess Frazelle <[email protected]> * apply fillets before a shell Signed-off-by: Jess Frazelle <[email protected]> --------- Signed-off-by: Jess Frazelle <[email protected]>
- Loading branch information
Showing
3 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
const rpizWidth = 30 | ||
const rpizLength = 65 | ||
|
||
const caseThickness = 1 | ||
|
||
const border = 4 | ||
|
||
const screwHeight = 4 | ||
|
||
const caseWidth = rpizWidth + border * 2 | ||
const caseLength = rpizLength + border * 2 | ||
const caseHeight = 8 | ||
|
||
const widthBetweenScrews = 23 | ||
const lengthBetweenScrews = 29 * 2 | ||
|
||
const miniHdmiDistance = 12.4 | ||
const microUsb1Distance = 41.4 | ||
const microUsb2Distance = 54 | ||
|
||
const miniHdmiWidth = 11.2 | ||
const microUsbWidth = 7.4 | ||
const connectorPadding = 4 | ||
|
||
const 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(%) | ||
|
||
const case = startSketchOn('XY') | ||
|> startProfileAt([0, 0], %) | ||
|> lineTo([caseWidth, 0], %, $edge1) | ||
|> lineTo([caseWidth, caseLength], %, $edge2) | ||
|> lineTo([0, caseLength], %, $edge3) | ||
|> close(%, $edge4) | ||
|> extrude(caseHeight, %) | ||
|> fillet({ | ||
radius: 1, | ||
tags: [ | ||
getNextAdjacentEdge(edge1), | ||
getNextAdjacentEdge(edge2), | ||
getNextAdjacentEdge(edge3), | ||
getNextAdjacentEdge(edge4) | ||
], | ||
}, %) | ||
|
||
|
||
fn m25Screw = (x, y, height) => { | ||
const screw = startSketchOn("XY") | ||
|> startProfileAt([0, 0], %) | ||
|> circle([x, y], 2.5, %) | ||
|> hole(circle([x, y], 1.25, %), %) | ||
|> 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({ | ||
faces: ['end'], | ||
thickness: caseThickness | ||
}, case) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters