Make keyboard more parametric

This commit is contained in:
Roberto Alsina 2023-04-15 19:29:46 -03:00
parent 7217c7bc3b
commit e015585a8b
4 changed files with 15 additions and 5 deletions

View File

@ -9,6 +9,11 @@ kbd_back_thickness = 0
kbd_front_thickness = 0
kbd_actual_height = 0
kbd_angle = 0
kbd_pillar_offset_1 = 0
kbd_pillar_radius_1 = 0
kbd_pillar_offset_2 = 0
kbd_pillar_radius_2 = 0
kbd_screw_radius = 0
def init():
@ -19,19 +24,19 @@ def init():
{
"x": 0,
"y": 0,
"z": 5.5,
"shape": cq.Sketch().push(kbd_pillar_positions).circle(5, mode="a"),
"z": kbd_pillar_offset_1,
"shape": cq.Sketch().push(kbd_pillar_positions).circle(kbd_pillar_radius_1, mode="a"),
},
# Taller pillars with holes for self-tapping screws
{
"x": 0,
"y": 0,
"z": 2.5,
"z": kbd_pillar_offset_2,
"shape": (
cq.Sketch()
.push(kbd_pillar_positions)
.circle(2.4, mode="a")
.circle(1.1, mode="s")
.circle(kbd_pillar_radius_2, mode="a")
.circle(kbd_screw_radius, mode="s")
),
},
]

View File

@ -41,6 +41,11 @@ keyboard.kbd_pillar_positions = [
(145.5, 82.5),
(keyboard.kbd_width - 19, 79.5),
]
keyboard.kbd_pillar_offset_1 = 5.5
keyboard.kbd_pillar_radius_1 = 5
keyboard.kbd_pillar_offset_2 = 2.5
keyboard.kbd_pillar_radius_2 = 2.4
keyboard.kbd_screw_radius = 1.1
keyboard.init()
## Screen dimensions

Binary file not shown.

Binary file not shown.