diff --git a/notebook_nueva/battery_holder.py b/notebook_nueva/battery_holder.py index f157303..c305e2c 100644 --- a/notebook_nueva/battery_holder.py +++ b/notebook_nueva/battery_holder.py @@ -1,11 +1,12 @@ import cadquery as cq -stand_positions = [(0, 0), (58, 0), (58, 49), (0, 49)] +stand_positions = [(3.5, 3.5), (61.5, 3.5), (61.5, 52.5), (3.5, 52.5)] stands = ( cq.Sketch().push(stand_positions).circle(3, mode="a").circle(2.65 / 2, mode="s") ) pillar_height = 7 - +width = 85 +height = 56 # This is a holder for DuPont cables so they connect to this # things' pogo pins which are used to power the CPU @@ -39,13 +40,53 @@ elements = [ "shape": stands, "height": pillar_height, }, - # Pogo pin connector channels { "x": 0, - "y": 40, + "y": 0, + "shape": cq.Sketch().push(stand_positions).circle(5), + "height": 0, + }, + # Pogo pin connector channels + { + "x": 3.5, + "y": 43.5, "shape": pin_holder, "height": 3, }, + # Perimeter + { + "x": width / 2, + "y": height / 2, + "shape": ( + cq.Sketch() + .trapezoid(width, height, 90, mode="a") + .trapezoid(width - 2, height - 2, 90, mode="s") + .vertices() + .fillet(3) + ), + "height": 0.2, + }, +] + + +hex_size = width // 13 +vent_positions = [] +for x in range(1, width // hex_size): + for y in range(0, int(height // hex_size / 0.8) - 1): + vent_positions.append( + ( + (x + (y % 2) / 2) * hex_size - hex_size * 0.2, + y * hex_size * 0.8 + hex_size * 0.2, + ) + ) +vents = cq.Sketch().push(vent_positions).regularPolygon((hex_size) / 2, 6) + +vents = [ + { + "x": 0, + "y": 0, + "shape": vents, + } ] diff --git a/notebook_nueva/left_side.stl b/notebook_nueva/left_side.stl index 16afaa5..68c8469 100644 Binary files a/notebook_nueva/left_side.stl and b/notebook_nueva/left_side.stl differ diff --git a/notebook_nueva/model.stl b/notebook_nueva/model.stl index b816deb..3bfd904 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 dfbed79..6302030 100644 --- a/notebook_nueva/modelo.py +++ b/notebook_nueva/modelo.py @@ -5,7 +5,7 @@ import audio_plug import battery_holder import usb_hub import zero_holder as cpu_holder -from utils import extrude_shape, punch_hole +from utils import extrude_shape, punch_hole, punch_hole2 # Base for the notebook. Basically a kbd base that extends back # as much as possible @@ -89,8 +89,8 @@ cpu_offset_x = 160 cpu_offset_y = 25 # Battery holder position from back-left corner of the case -battery_offset_x = 22 -battery_offset_y = 8 +battery_offset_x = 19 +battery_offset_y = 5 # Offset for the USB port from back-right corner of the case usb_offset = 48 @@ -205,6 +205,18 @@ def model(): depth=shell_t, ) + for vent in battery_holder.vents: + model = punch_hole2( + model=model, + face="