Make screen_pillars more parametric
This commit is contained in:
parent
e015585a8b
commit
ea06783e66
@ -4,6 +4,13 @@ import cadquery as cq
|
||||
elements = None
|
||||
bottom_holes = None
|
||||
|
||||
# These are set from dimensions.py
|
||||
pillar_width = 0
|
||||
pillar_height = 0
|
||||
screw_head_radius = 0
|
||||
screw_head_depth = 0
|
||||
screw_radius = 0
|
||||
|
||||
|
||||
def init(positions, thickness):
|
||||
"""Because these need to match in multiple models, we create the
|
||||
@ -13,7 +20,9 @@ def init(positions, thickness):
|
||||
{
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"shape": cq.Sketch().push(positions).trapezoid(12, 12, 90, mode="a"),
|
||||
"shape": cq.Sketch()
|
||||
.push(positions)
|
||||
.trapezoid(pillar_width, pillar_height, 90, mode="a"),
|
||||
"height": thickness,
|
||||
}
|
||||
]
|
||||
@ -22,13 +31,13 @@ def init(positions, thickness):
|
||||
{
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"shape": cq.Sketch().push(positions).circle(3, mode="a"),
|
||||
"depth": thickness - 13, # (screw thread length - threaded insert depth)
|
||||
"shape": cq.Sketch().push(positions).circle(screw_head_radius, mode="a"),
|
||||
"depth": screw_head_depth
|
||||
},
|
||||
{
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"shape": cq.Sketch().push(positions).circle(1.8, mode="a"),
|
||||
"shape": cq.Sketch().push(positions).circle(screw_radius, mode="a"),
|
||||
"depth": 100,
|
||||
},
|
||||
]
|
||||
|
@ -3,6 +3,7 @@ import math
|
||||
import components.audio_plug as audio_plug
|
||||
import components.usb_hub as usb_hub
|
||||
import components.keyboard as keyboard
|
||||
import components.screen_pillars as screen_pillars
|
||||
|
||||
## Standard things (TODO move to separate file)
|
||||
|
||||
@ -19,7 +20,6 @@ m3_hn_thickness = 2.5
|
||||
m4_top = 9
|
||||
m4_bottom = 4
|
||||
|
||||
|
||||
## Keyboard dimensions
|
||||
keyboard.kbd_height = 95.5
|
||||
keyboard.kbd_width = 305
|
||||
@ -135,3 +135,10 @@ sl_height = (
|
||||
)
|
||||
sl_thickness = shell_t
|
||||
sl_front_lip = 8
|
||||
|
||||
## Dimensions for pillars that connect base and lids
|
||||
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)
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user