* new sample code w tangental arc Signed-off-by: Jess Frazelle <github@jessfraz.com> * line 6 Signed-off-by: Jess Frazelle <github@jessfraz.com> * make sure sample code works in test Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
30 lines
696 B
TypeScript
30 lines
696 B
TypeScript
export const bracket = `const sigmaAllow = 15000 // psi
|
|
const width = 11 // inch
|
|
const p = 150 // Force on shelf - lbs
|
|
const distance = 12 // inches
|
|
const FOS = 2
|
|
const thickness = sqrt(distance * p * FOS * 6 / ( sigmaAllow * width ))
|
|
const filletR = thickness * 2
|
|
const shelfMountL = 9
|
|
const wallMountL = 8
|
|
|
|
const bracket = startSketchAt([0, 0])
|
|
|> line([0, wallMountL], %)
|
|
|> tangentalArc({
|
|
radius: filletR,
|
|
offset: 90
|
|
}, %)
|
|
|> line([-shelfMountL, 0], %)
|
|
|> line([0, -thickness], %)
|
|
|> line([shelfMountL, 0], %)
|
|
|> tangentalArc({
|
|
radius: filletR - thickness,
|
|
offset: -90
|
|
}, %)
|
|
|> line([0, -wallMountL], %)
|
|
|> close(%)
|
|
|> extrude(width, %)
|
|
|
|
show(bracket)
|
|
`
|