From e9b3a425649c3c7f9faf7c3258559ed3aa6b4cf2 Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Fri, 25 Nov 2022 12:28:39 -0300 Subject: [PATCH] More work on the screen mount --- notebook_nueva/screen_mount.py | 108 +- notebook_nueva/screen_mount.stl | 57498 +++++++++++++++++++++++++++++- 2 files changed, 57296 insertions(+), 310 deletions(-) diff --git a/notebook_nueva/screen_mount.py b/notebook_nueva/screen_mount.py index 62936bd..f54de00 100644 --- a/notebook_nueva/screen_mount.py +++ b/notebook_nueva/screen_mount.py @@ -18,7 +18,7 @@ height = 69 thickness = 10 # Visible screen size -vis_w = 223 +vis_w = 220 vis_h = 58 viewport_cutout = cq.Sketch().trapezoid(vis_w, vis_h, 90, mode="a") @@ -30,30 +30,92 @@ screen_cutout = cq.Sketch().trapezoid(scr_w, scr_h, 90, mode="a") # Circuit board and cable space board_cutout = cq.Sketch().polygon( - [(0, 0), (width / 2 - 10, 0), (width / 2 - 10, vis_h), (0, vis_h), (0, 0)], mode="a" + [ + (0, 0), + (width / 2 - 10, 0), + (width / 2 - 10, vis_h - 20), + (0, vis_h - 20), + (0, 0), + ], + mode="a", +) +board_cutout_2 = cq.Sketch().polygon( + [ + (0, 0), + (width / 2 - 10 + 4, 0), + (width / 2 - 10 + 4, vis_h - 20 + 4), + (0, vis_h - 20 + 4), + (0, 0), + ], + mode="a", ) -model = ( - cq.Workplane("XY") - .workplane() - .box(width, height, thickness) - .faces(">Z") - # Cut off viewport - .placeSketch(viewport_cutout) - .cutBlind(-1000) - # Make hole for screen assembly - .faces(">Z") - .workplane(offset=-shell_t, centerOption="CenterOfBoundBox") - # Left bezel is 4mm wider than right one, so this hole is displaced to the left - .center(-2, 0) - .placeSketch(screen_cutout) - .cutBlind(-scr_thickness) - .faces(">Z") - .workplane(offset=-shell_t-scr_thickness, centerOption="CenterOfBoundBox") - .center(0, - vis_h / 2) - .placeSketch(board_cutout) - .cutBlind(-1000) +def model(): + return ( + cq.Workplane("XY") + .workplane() + .box(width, 59, 59) + .faces(">Z") + .transformed(rotate=(45, 0, 0)) + .tag("slanted") + .placeSketch(cq.Sketch().trapezoid(1000, 1000, 90, mode="a")) + .cutBlind(1000) + # Cut off viewport + .workplaneFromTagged("slanted") + .placeSketch(viewport_cutout) + .cutBlind(-shell_t) + # Make hole for screen assembly + .workplaneFromTagged("slanted") + .workplane(offset=-shell_t, centerOption="CenterOfBoundBox") + # Left bezel is 4mm wider than right one, so this hole is displaced to the left + # Cut for the scren assembly + .center(-4, 0) + .placeSketch(screen_cutout) + .cutBlind(-scr_thickness) + # Cut for the screen board and cables + .workplaneFromTagged("slanted") + .workplane(offset=-shell_t - scr_thickness, centerOption="CenterOfBoundBox") + .center(0, -(vis_h - 20) / 2) + .placeSketch(board_cutout) + .cutBlind(-5) + # Make it hollow + .faces("