Refactored pillars to join screen (adds concept of screw holes)
This commit is contained in:
parent
cdf2e33f64
commit
d1e7b589c8
Binary file not shown.
@ -5,6 +5,7 @@ import audio_plug
|
|||||||
import battery_holder
|
import battery_holder
|
||||||
import usb_hub
|
import usb_hub
|
||||||
import zero_holder as cpu_holder
|
import zero_holder as cpu_holder
|
||||||
|
import screen_pillars
|
||||||
from utils import extrude_shape, punch_hole, punch_hole2
|
from utils import extrude_shape, punch_hole, punch_hole2
|
||||||
|
|
||||||
# Base for the notebook. Basically a kbd base that extends back
|
# Base for the notebook. Basically a kbd base that extends back
|
||||||
@ -62,22 +63,14 @@ kbd_lower_pillars = (
|
|||||||
# parts of the case.
|
# parts of the case.
|
||||||
# Measured from top-left corner OUTSIDE
|
# Measured from top-left corner OUTSIDE
|
||||||
mounting_pillar_positions = [
|
mounting_pillar_positions = [
|
||||||
(6, -6),
|
(6, 6),
|
||||||
(6, -40),
|
(6, 40),
|
||||||
(120, -6),
|
(120, 6),
|
||||||
(170, -6),
|
(170, 6),
|
||||||
(width - 6, -6),
|
(width - 6, 6),
|
||||||
(width - 6, -30),
|
(width - 6, 30),
|
||||||
]
|
]
|
||||||
|
screen_pillars.init(mounting_pillar_positions, thickness - shell_t)
|
||||||
mounting_pillars = (
|
|
||||||
cq.Sketch()
|
|
||||||
.push(mounting_pillar_positions)
|
|
||||||
.trapezoid(12, 12, 90, mode="a")
|
|
||||||
.circle(1.8, mode="s")
|
|
||||||
)
|
|
||||||
|
|
||||||
screw_holes = cq.Sketch().push(mounting_pillar_positions).circle(3, mode="a")
|
|
||||||
|
|
||||||
# Thing to "grab" the hub so it stays in place
|
# Thing to "grab" the hub so it stays in place
|
||||||
# Distance from edge to center of USB plug
|
# Distance from edge to center of USB plug
|
||||||
@ -135,19 +128,6 @@ def model():
|
|||||||
# Slope for the beyboard
|
# Slope for the beyboard
|
||||||
.workplaneFromTagged("sloped")
|
.workplaneFromTagged("sloped")
|
||||||
.split(keepBottom=True)
|
.split(keepBottom=True)
|
||||||
# Pillars to join with top half
|
|
||||||
.workplaneFromTagged("mid_height")
|
|
||||||
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
|
|
||||||
.center(-width / 2, height / 2)
|
|
||||||
.placeSketch(mounting_pillars)
|
|
||||||
.extrude(thickness)
|
|
||||||
# Holes to insert screws from the bottom
|
|
||||||
.workplaneFromTagged("mid_height")
|
|
||||||
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
|
|
||||||
.center(-width / 2, height / 2)
|
|
||||||
.placeSketch(screw_holes)
|
|
||||||
# 13 is 20-7 (screw thread length - threaded insert depth)
|
|
||||||
.cutBlind(thickness - 13)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Now the basic box shape is in place, start adding things
|
# Now the basic box shape is in place, start adding things
|
||||||
@ -203,6 +183,18 @@ def model():
|
|||||||
shell_t=shell_t,
|
shell_t=shell_t,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
model = screen_pillars.add(
|
||||||
|
model=model,
|
||||||
|
width=width,
|
||||||
|
height=height,
|
||||||
|
thickness=thickness,
|
||||||
|
offset_x=0,
|
||||||
|
offset_y=0,
|
||||||
|
bottom_face="<Z",
|
||||||
|
back_face=None,
|
||||||
|
shell_t=shell_t,
|
||||||
|
)
|
||||||
|
|
||||||
return model
|
return model
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user