bracket for holding the pi and touchscreen rev0.1
This commit is contained in:
34
bracket.py
Normal file
34
bracket.py
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import solid2
|
||||||
|
|
||||||
|
extra_space = 10
|
||||||
|
slop = 0.5
|
||||||
|
|
||||||
|
screen_height = 87
|
||||||
|
screen_width = 155
|
||||||
|
screen_depth = 3
|
||||||
|
|
||||||
|
pi_height = 56
|
||||||
|
pi_width = 85
|
||||||
|
pi_depth = 16
|
||||||
|
|
||||||
|
|
||||||
|
def padded(num: int) -> int:
|
||||||
|
return num + (2 * extra_space)
|
||||||
|
|
||||||
|
|
||||||
|
base = (
|
||||||
|
solid2.cube(padded(screen_height), padded(screen_width), screen_depth + 1)
|
||||||
|
.difference()(
|
||||||
|
solid2.cube(
|
||||||
|
screen_height + slop, screen_width + slop, screen_depth + 1
|
||||||
|
).translate(extra_space, extra_space, -1)
|
||||||
|
)
|
||||||
|
.difference()(
|
||||||
|
solid2.cube(pi_height + slop, pi_width + slop, 50).translate(
|
||||||
|
padded(screen_height) / 2 - pi_height / 2,
|
||||||
|
padded(screen_width) / 2 - pi_width / 2,
|
||||||
|
-2,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
base.save_as_scad()
|
||||||
Reference in New Issue
Block a user