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