Compare commits
2 Commits
21faab26d0
...
539583ac8f
Author | SHA1 | Date |
---|---|---|
Roberto Alsina | 539583ac8f | |
Roberto Alsina | 2d53b8f006 |
|
@ -13,7 +13,7 @@ from modelo import (
|
|||
shell_t,
|
||||
)
|
||||
|
||||
from screen_mount import height_bottom
|
||||
import screen_mount
|
||||
|
||||
import keyboard
|
||||
|
||||
|
@ -25,7 +25,7 @@ hinge_width = 25
|
|||
thickness = 43
|
||||
|
||||
|
||||
mounting_pillar_positions = [(x, -y) for x, y in mounting_pillar_positions[:-2]]
|
||||
mounting_pillar_positions = [(x, -y) for x, y in mounting_pillar_positions]
|
||||
mounting_pillars = (
|
||||
cq.Sketch()
|
||||
.push(mounting_pillar_positions)
|
||||
|
@ -48,6 +48,7 @@ def model():
|
|||
# Hollow box
|
||||
.workplane(offset=-thickness / 2)
|
||||
.box(width, height, thickness)
|
||||
.tag("base")
|
||||
.edges("|X and >Z and <Y")
|
||||
.fillet(10)
|
||||
.edges("|X and >Z and >Y")
|
||||
|
@ -63,7 +64,11 @@ def model():
|
|||
# Outer surface of the hinge
|
||||
.workplaneFromTagged("rightSide")
|
||||
.placeSketch(cq.Sketch().circle(hinge_radius))
|
||||
.extrude(-width)
|
||||
.extrude(-hinge_width)
|
||||
.workplaneFromTagged("rightSide")
|
||||
.workplane(offset=-width + hinge_width)
|
||||
.placeSketch(cq.Sketch().circle(hinge_radius))
|
||||
.extrude(-hinge_width)
|
||||
# Cut middle section between the hinges
|
||||
.workplaneFromTagged("rightSide")
|
||||
.workplane(offset=-hinge_width)
|
||||
|
@ -82,10 +87,24 @@ def model():
|
|||
)
|
||||
)
|
||||
.cutBlind(-width + 2 * hinge_width - 1)
|
||||
# Pillars to attach to base
|
||||
.workplaneFromTagged("base")
|
||||
.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)
|
||||
# Hole for screws
|
||||
.workplaneFromTagged("rightSide")
|
||||
.placeSketch(cq.Sketch().circle(screw_radius))
|
||||
.cutBlind(-width)
|
||||
.cutBlind(-hinge_width)
|
||||
.workplaneFromTagged("rightSide")
|
||||
.workplane(offset=-width + hinge_width)
|
||||
.placeSketch(cq.Sketch().circle(screw_radius))
|
||||
.cutBlind(-hinge_width)
|
||||
# Holes for rings & screw heads
|
||||
.workplaneFromTagged("rightSide")
|
||||
.placeSketch(cq.Sketch().circle(ring_radius))
|
||||
|
@ -209,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 = (
|
||||
|
@ -231,14 +289,6 @@ def model():
|
|||
.cutBlind(-1000)
|
||||
)
|
||||
|
||||
model = (
|
||||
model.faces(">Z")
|
||||
.workplane(offset=-model_thickness)
|
||||
.center(-width, height)
|
||||
.placeSketch(mounting_pillars)
|
||||
.extrude(10)
|
||||
)
|
||||
|
||||
return model
|
||||
|
||||
|
||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 153 KiB |
Loading…
Reference in New Issue