Make screen pillars more parametric

This commit is contained in:
Roberto Alsina 2023-04-15 19:49:53 -03:00
parent ea06783e66
commit bd215573eb
9 changed files with 5 additions and 4 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -32,7 +32,7 @@ def init(positions, thickness):
"x": 0,
"y": 0,
"shape": cq.Sketch().push(positions).circle(screw_head_radius, mode="a"),
"depth": screw_head_depth
"depth": screw_head_depth,
},
{
"x": 0,

View File

@ -141,4 +141,4 @@ screen_pillars.pillar_width = 12
screen_pillars.pillar_height = 12
screen_pillars.screw_head_radius = 3
screen_pillars.screw_radius = 1.8
screen_pillars.screw_head_depth = base_thickness - 13, # (screw thread length - threaded insert depth)
screen_pillars.screw_head_depth = base_thickness - 13 # (screw thread length - threaded insert depth)

View File

@ -2,6 +2,7 @@ import cadquery as cq
import dimensions as dim
from utils import export
from components import screen_pillars
viewport_cutout = (
cq.Sketch().trapezoid(dim.vis_w, dim.vis_h, 90, mode="a").vertices().fillet(2)
@ -20,13 +21,13 @@ board_cutout = cq.Sketch().trapezoid(
kbd_cable_hole = cq.Sketch().trapezoid(20, 9, 90, mode="a").vertices().fillet(1)
# y needs to be inverted because this is the top side, adn there's 2 pillars we don't use
# y needs to be inverted because this is the top side, and there's 2 pillars we don't use
dim.mounting_pillar_positions = [(x, -y) for x, y in dim.mounting_pillar_positions[:-2]]
mounting_pillars = (
cq.Sketch()
.push(dim.mounting_pillar_positions)
.trapezoid(-12, 12, 90, mode="a")
.trapezoid(screen_pillars.pillar_width, screen_pillars.pillar_height, 90, mode="a")
.circle(dim.ti_radius, mode="s")
.clean()
)

Binary file not shown.

Binary file not shown.

Binary file not shown.