Compare commits
No commits in common. "3ef050bdbb8f9d0e959a5839cd3dbf6e372c5b75" and "38929ade837ac7e9c146677afc9cbc3f07420be3" have entirely different histories.
3ef050bdbb
...
38929ade83
@ -7,8 +7,9 @@ from utils import extrude_shape, punch_hole
|
||||
# The hole is for a random USB sound card.
|
||||
# Consumers should set proper offsets for the hole
|
||||
|
||||
item_w = 49
|
||||
item_h = 20.5
|
||||
# FIXME: use actual sizes
|
||||
item_w = 40
|
||||
item_h = 20
|
||||
|
||||
hole_w = 17
|
||||
hole_h = 5
|
||||
|
@ -5,7 +5,7 @@ from modelo import mounting_pillar_positions, shell_t, width
|
||||
from utils import hex_vents, punch_hole
|
||||
|
||||
# Dimensions for countersunk M4 screws
|
||||
m4_top = 9
|
||||
m4_top = 8
|
||||
m4_bottom = 4
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ def model():
|
||||
model.faces(">Z")
|
||||
.workplane(centerOption="CenterOfBoundBox")
|
||||
.center(-width / 2 + position[0], height / 2 - position[1] - shell_t)
|
||||
.placeSketch(cq.Sketch().circle(m4_top / 2 + 1.5))
|
||||
.placeSketch(cq.Sketch().circle(6))
|
||||
.extrude(-thickness)
|
||||
.faces(">Z")
|
||||
.workplane(centerOption="CenterOfBoundBox")
|
||||
|
@ -45,19 +45,22 @@ mounting_pillar_positions = [
|
||||
]
|
||||
screen_pillars.init(mounting_pillar_positions, thickness - shell_t)
|
||||
|
||||
# Offset for the USB port from back-left corner
|
||||
# of the case to left side of the hub
|
||||
usb_offset_x = width - audio_plug.item_w - usb_hub.item_w
|
||||
# Thing to "grab" the hub so it stays in place
|
||||
# Distance from left edge to center of USB plug
|
||||
usb_offset = width - 48
|
||||
|
||||
|
||||
# CPU holder position from back-left corner of the case
|
||||
cpu_offset_x = 177
|
||||
cpu_offset_y = 2
|
||||
cpu_offset_x = 180
|
||||
cpu_offset_y = 3
|
||||
|
||||
# Battery holder position from back-left corner of the case
|
||||
battery_offset_x = 15
|
||||
battery_offset_y = 3
|
||||
|
||||
# Offset for the USB port from back-right corner of the case
|
||||
usb_offset = 48
|
||||
|
||||
|
||||
def model():
|
||||
# Create the basic shape of the case bottom.
|
||||
@ -83,7 +86,7 @@ def model():
|
||||
thickness=thickness,
|
||||
bottom_face="<Z",
|
||||
back_face=">Y",
|
||||
offset_x=usb_offset_x,
|
||||
offset_x=width - usb_offset,
|
||||
offset_y=0,
|
||||
shell_t=shell_t,
|
||||
)
|
||||
|
@ -8,13 +8,10 @@ from utils import punch_hole, extrude_shape
|
||||
# (from the bottom face to middle of the hole)
|
||||
# Consumers should set proper offsets for the hole
|
||||
|
||||
item_w = 17
|
||||
item_h = 93
|
||||
|
||||
holes = [
|
||||
# USB-A port
|
||||
{
|
||||
"x": -item_w / 2,
|
||||
"x": 0,
|
||||
"y": 4,
|
||||
"shape": cq.Sketch().trapezoid(13, 5, 90, mode="a").vertices().fillet(1),
|
||||
},
|
||||
@ -23,33 +20,22 @@ holes = [
|
||||
elements = [
|
||||
# Thing to grab the hub
|
||||
{
|
||||
"x": item_w / 2,
|
||||
"x": 0,
|
||||
"y": 5,
|
||||
"shape": (
|
||||
cq.Sketch().trapezoid(22, 10, 90, mode="a").trapezoid(17, 10, 90, mode="s")
|
||||
),
|
||||
"height": 8,
|
||||
},
|
||||
{
|
||||
"x": item_w / 2 + 5,
|
||||
"y": item_h - 3,
|
||||
"shape": (cq.Sketch().circle(2.5, mode="a")),
|
||||
"height": 8,
|
||||
},
|
||||
{
|
||||
"x": item_w / 2 - 5,
|
||||
"y": item_h - 3,
|
||||
"shape": (cq.Sketch().circle(2.5, mode="a")),
|
||||
"height": 8,
|
||||
},
|
||||
# Outline
|
||||
{
|
||||
"x": item_w / 2,
|
||||
"y": item_h / 2,
|
||||
"x": 0,
|
||||
"y": 35,
|
||||
"shape": (
|
||||
cq.Sketch()
|
||||
.trapezoid(item_w, item_h, 90, mode="a")
|
||||
.trapezoid(item_w - 2, item_h - 2, 90, mode="s")
|
||||
# FIXME: use actual size
|
||||
.trapezoid(17, 70, 90, mode="a")
|
||||
.trapezoid(15, 68, 90, mode="s")
|
||||
.vertices()
|
||||
.fillet(3)
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user