Rearrange right side to put USB plug in the back and audio on the side

This commit is contained in:
Roberto Alsina 2023-02-23 13:20:49 -03:00
parent 7fbf323e45
commit b5deb70cbd
7 changed files with 13 additions and 13 deletions

View File

@ -1,6 +1,6 @@
import cadquery as cq
cpu_stand_positions = [(0, 0), (23, 0), (23, 58), (0, 58)]
cpu_stand_positions = [(0, 0), (0, 23), (58, 23), (58, 0)]
stands = cq.Sketch().push(cpu_stand_positions).circle(3, mode="a").circle(2.65 / 2, mode="s")
pillar_height = 7

Binary file not shown.

Binary file not shown.

View File

@ -64,7 +64,7 @@ mounting_pillar_positions = [
(120, -6),
(170, -6),
(width - 6, -6),
(width - 6, -40),
(width - 6, -30),
]
mounting_pillars = (
@ -80,15 +80,15 @@ screw_holes = cq.Sketch().push(mounting_pillar_positions).circle(3, mode="a")
usb_in = cq.Sketch().trapezoid(13, 5.5, 90, mode="a")
# Thing to "grab" the hub so it stays in place
usb_holder = (
cq.Sketch().trapezoid(10, 22, 90, mode="a").trapezoid(10, 17, 90, mode="s").clean()
cq.Sketch().trapezoid(22, 10, 90, mode="a").trapezoid(17, 10, 90, mode="s").clean()
)
# Hole for the USB hub's exposed port
audio_in = cq.Sketch().trapezoid(17, 6, 90, mode="a")
# CPU holder position from back-right corner of the case
cpu_offset_x = 40
cpu_offset_y = 65
cpu_offset_x = 150
cpu_offset_y = 55
# Battery holder position from front-left corner of the case
battery_offset_x = 21
@ -139,17 +139,17 @@ def model():
# USB inlet
# The position is arbitrary, based on the components
# available, keyboard height, cable length, etc.
.faces(">X")
.faces(">Y")
.workplane(centerOption="CenterOfBoundBox")
.center(-height / 2 + shell_t + 45 + 13 / 2, -8)
.center(- width / 2 + shell_t + 45 + 13 / 2, -8)
.placeSketch(usb_in)
.cutBlind(-shell_t)
# Audio plugs
# The position is arbitrary, based on the components
# available, keyboard height, cable length, etc.
.faces("<Y")
.faces(">X")
.workplane(centerOption="CenterOfBoundBox")
.center(width / 2 - shell_t - 34.5 - 17 / 2, -8)
.center(height / 2 - shell_t - 34.5 - 17 / 2, -8)
.placeSketch(audio_in)
.cutBlind(-shell_t)
# Slanted mounting pillars on the kbd top
@ -210,11 +210,11 @@ def model():
.placeSketch(battery_holder.pin_holder)
.extrude(shell_t + 3)
# Channel for the usb hub
.workplaneFromTagged("mid_height")
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
.center(width / 2 - 5, -height / 2 + shell_t + 45 + 13 / 2)
.faces(">Y")
.workplane(centerOption="CenterOfBoundBox")
.center(- width / 2 + shell_t + 45 + 13 / 2, -8)
.placeSketch(usb_holder)
.extrude(shell_t + 8)
.extrude(-shell_t - 8)
)

Binary file not shown.

Binary file not shown.