diff --git a/notebook_nueva/model.stl b/notebook_nueva/model.stl index c9be31e..6bf7d16 100644 Binary files a/notebook_nueva/model.stl and b/notebook_nueva/model.stl differ diff --git a/notebook_nueva/modelo.py b/notebook_nueva/modelo.py index e297a1f..c3b5ddb 100644 --- a/notebook_nueva/modelo.py +++ b/notebook_nueva/modelo.py @@ -5,6 +5,7 @@ import audio_plug import battery_holder import usb_hub import zero_holder as cpu_holder +import screen_pillars from utils import extrude_shape, punch_hole, punch_hole2 # Base for the notebook. Basically a kbd base that extends back @@ -62,22 +63,14 @@ kbd_lower_pillars = ( # parts of the case. # Measured from top-left corner OUTSIDE mounting_pillar_positions = [ - (6, -6), - (6, -40), - (120, -6), - (170, -6), - (width - 6, -6), - (width - 6, -30), + (6, 6), + (6, 40), + (120, 6), + (170, 6), + (width - 6, 6), + (width - 6, 30), ] - -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") +screen_pillars.init(mounting_pillar_positions, thickness - shell_t) # Thing to "grab" the hub so it stays in place # Distance from edge to center of USB plug @@ -135,19 +128,6 @@ def model(): # Slope for the beyboard .workplaneFromTagged("sloped") .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 @@ -203,6 +183,18 @@ def model(): shell_t=shell_t, ) + model = screen_pillars.add( + model=model, + width=width, + height=height, + thickness=thickness, + offset_x=0, + offset_y=0, + bottom_face="