Add screen holder to hinged lid

This commit is contained in:
Roberto Alsina 2023-04-08 14:41:27 -03:00
parent 2d53b8f006
commit 539583ac8f
3 changed files with 145 additions and 7 deletions

View File

@ -13,7 +13,7 @@ from modelo import (
shell_t,
)
from screen_mount import height_bottom
import screen_mount
import keyboard
@ -92,9 +92,11 @@ def model():
.workplane(
centerOption="CenterOfBoundBox", offset=model_thickness - thickness / 2
)
.workplaneFromTagged("base")
.workplane(offset=thickness / 2 - shell_t)
.center(-width / 2, height / 2 - shell_t)
.placeSketch(mounting_pillars)
.extrude(10)
.extrude(-10)
# Hole for screws
.workplaneFromTagged("rightSide")
.placeSketch(cq.Sketch().circle(screw_radius))
@ -226,6 +228,45 @@ def model():
.cutBlind(-hinge_width / 2 - 1)
)
# Screen mount
model = (
model.workplaneFromTagged("base")
.center(0, -32)
.tag("screen_plane")
.workplane(offset=thickness / 2 - shell_t)
.placeSketch(
cq.Sketch()
.trapezoid(
screen_mount.scr_w + 2 * shell_t, screen_mount.scr_h + 2 * shell_t, 90
)
.vertices()
.fillet(2)
)
.extrude(-9)
.workplaneFromTagged("screen_plane")
.workplane(offset=thickness / 2 - shell_t)
.placeSketch(
cq.Sketch()
.trapezoid(screen_mount.vis_w, screen_mount.vis_h, 90)
.vertices()
.fillet(2)
)
.cutBlind(-9)
.workplaneFromTagged("screen_plane")
.workplane(offset=thickness / 2 - shell_t)
.placeSketch(
cq.Sketch()
.trapezoid(screen_mount.scr_w - 40, screen_mount.scr_h + 2 * shell_t, 90)
.vertices()
.fillet(2)
)
.cutBlind(-9)
.workplaneFromTagged("screen_plane")
.workplane(offset=thickness / 2 - shell_t - screen_mount.scr_thickness - 2)
.placeSketch(cq.Sketch().trapezoid(screen_mount.scr_w, screen_mount.scr_h, 90))
.cutBlind(screen_mount.scr_thickness)
)
# Cut off shape of the base
model = (

Binary file not shown.

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 153 KiB