More work on the screen mount

This commit is contained in:
Roberto Alsina 2022-11-25 12:28:39 -03:00
parent b8d902ea11
commit e9b3a42564
2 changed files with 57296 additions and 310 deletions

View File

@ -18,7 +18,7 @@ height = 69
thickness = 10 thickness = 10
# Visible screen size # Visible screen size
vis_w = 223 vis_w = 220
vis_h = 58 vis_h = 58
viewport_cutout = cq.Sketch().trapezoid(vis_w, vis_h, 90, mode="a") 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 # Circuit board and cable space
board_cutout = cq.Sketch().polygon( 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 = ( def model():
cq.Workplane("XY") return (
.workplane() cq.Workplane("XY")
.box(width, height, thickness) .workplane()
.faces(">Z") .box(width, 59, 59)
# Cut off viewport .faces(">Z")
.placeSketch(viewport_cutout) .transformed(rotate=(45, 0, 0))
.cutBlind(-1000) .tag("slanted")
# Make hole for screen assembly .placeSketch(cq.Sketch().trapezoid(1000, 1000, 90, mode="a"))
.faces(">Z") .cutBlind(1000)
.workplane(offset=-shell_t, centerOption="CenterOfBoundBox") # Cut off viewport
# Left bezel is 4mm wider than right one, so this hole is displaced to the left .workplaneFromTagged("slanted")
.center(-2, 0) .placeSketch(viewport_cutout)
.placeSketch(screen_cutout) .cutBlind(-shell_t)
.cutBlind(-scr_thickness) # Make hole for screen assembly
.faces(">Z") .workplaneFromTagged("slanted")
.workplane(offset=-shell_t-scr_thickness, centerOption="CenterOfBoundBox") .workplane(offset=-shell_t, centerOption="CenterOfBoundBox")
.center(0, - vis_h / 2) # Left bezel is 4mm wider than right one, so this hole is displaced to the left
.placeSketch(board_cutout) # Cut for the scren assembly
.cutBlind(-1000) .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("<Z")
.shell(-2)
# Cut AGAIN for the screen board and cables
.workplaneFromTagged("slanted")
.workplane(offset=-shell_t - scr_thickness, centerOption="CenterOfBoundBox")
.center(0, -(vis_h -20 + 4) / 2)
.placeSketch(board_cutout_2)
.cutBlind(-7)
)
exporters.export(model(), "screen_mount.stl")
left_cutout = cq.Sketch().polygon(
[(0, 0), (160, 0), (160, -100), (0, -100), (0, 0)],
mode="a",
) )
exporters.export(model, "screen_mount.stl") right_side = (
model()
.faces("<Z")
.workplane(centerOption="CenterOfBoundBox", offset=3)
.center(-width / 2, height / 2)
.placeSketch(left_cutout)
.cutBlind(-100)
)
exporters.export(right_side, "right_screen_mount.stl")
left_side = (
model()
.faces("<Z")
.workplane(centerOption="CenterOfBoundBox", offset=3)
.center(0, height / 2)
.placeSketch(left_cutout)
.cutBlind(-100)
)
exporters.export(left_side, "left_screen_mount.stl")

File diff suppressed because it is too large Load Diff