34 lines
629 B
Python
34 lines
629 B
Python
import cadquery as cq
|
|
|
|
# Measurements for my USB hub, YMMV
|
|
|
|
# The hole is for a USB-A plug, y is measured in the hub
|
|
# (from the bottom face to middle of the hole)
|
|
# Consumers should set proper offsets for the hole
|
|
|
|
holes = [
|
|
# USB-A port
|
|
{
|
|
"x": 0,
|
|
"y": 4,
|
|
"height": 5.5,
|
|
"width": 13,
|
|
"fillet": 2,
|
|
},
|
|
]
|
|
|
|
elements = [
|
|
# Thing to grab the hub
|
|
{
|
|
"x": 0,
|
|
"y": 5,
|
|
"shape": (
|
|
cq.Sketch()
|
|
.trapezoid(22, 10, 90, mode="a")
|
|
.trapezoid(17, 10, 90, mode="s")
|
|
.clean()
|
|
),
|
|
"height": 8,
|
|
}
|
|
]
|