Add headphone holder model
This commit is contained in:
parent
9a65b4d8f4
commit
542e3c531a
3 changed files with 76 additions and 0 deletions
|
|
@ -18,3 +18,8 @@ uv run <model.py file>
|
||||||
I needed a laptop holder that could hold 4 laptops (work, personal macbook, personal linux laptop, wife's laptop when she didn't need it).
|
I needed a laptop holder that could hold 4 laptops (work, personal macbook, personal linux laptop, wife's laptop when she didn't need it).
|
||||||
This is my first real model created with build123d.
|
This is my first real model created with build123d.
|
||||||
|
|
||||||
|
### Headphone Holder
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
This is a headphone holder with holes to screw into the rectangular leg of [my standing desk](https://www.amazon.com/dp/B0DX6XN1SJ?th=1).
|
||||||
|
|
|
||||||
71
headphone_holder.py
Normal file
71
headphone_holder.py
Normal file
|
|
@ -0,0 +1,71 @@
|
||||||
|
# /// script
|
||||||
|
# requires-python = ">=3.14"
|
||||||
|
# dependencies = ["ocp_vscode", "build123d"]
|
||||||
|
# ///
|
||||||
|
|
||||||
|
from build123d import *
|
||||||
|
from ocp_vscode import *
|
||||||
|
|
||||||
|
height = 1.0 * IN
|
||||||
|
hole_spacing = 1.5 * IN
|
||||||
|
x_padding = 0.25 * IN
|
||||||
|
y_padding = 0.25 * IN
|
||||||
|
thickness = 0.1 * IN
|
||||||
|
headphone_holder_thickness = 1.75 * IN
|
||||||
|
holder_roc = 3.75 * IN
|
||||||
|
bolt_diameter = 3 / 16 * IN
|
||||||
|
lip_length = 0.15 * IN
|
||||||
|
lip_thickness = 0.15 * IN
|
||||||
|
|
||||||
|
|
||||||
|
with BuildPart() as holder:
|
||||||
|
with BuildSketch() as sketch:
|
||||||
|
with BuildLine():
|
||||||
|
l1 = Line((0, 0), (0, height))
|
||||||
|
l2 = Line(l1 @ 1, (hole_spacing + 2 * x_padding, height))
|
||||||
|
l3 = Line(l2 @ 1, (hole_spacing + 2 * x_padding, 0))
|
||||||
|
l4 = RadiusArc(l1 @ 0, l3 @ 1, holder_roc)
|
||||||
|
make_face()
|
||||||
|
|
||||||
|
with Locations(
|
||||||
|
(x_padding, height - y_padding),
|
||||||
|
(x_padding + hole_spacing, height - y_padding),
|
||||||
|
):
|
||||||
|
Circle(
|
||||||
|
radius=bolt_diameter / 2,
|
||||||
|
mode=Mode.SUBTRACT,
|
||||||
|
align=(Align.CENTER, Align.MAX),
|
||||||
|
)
|
||||||
|
extrude(amount=thickness)
|
||||||
|
fillet(
|
||||||
|
holder.edges().filter_by(Axis.Z).sort_by(Axis.Y)[-2:], radius=bolt_diameter / 2
|
||||||
|
)
|
||||||
|
with BuildSketch() as sketch:
|
||||||
|
with BuildLine():
|
||||||
|
l1 = RadiusArc((0, 0), (hole_spacing + 2 * x_padding, 0), holder_roc)
|
||||||
|
offset(amount=lip_thickness, side=Side.LEFT)
|
||||||
|
make_face()
|
||||||
|
extrude(amount=headphone_holder_thickness + thickness)
|
||||||
|
|
||||||
|
with BuildSketch(
|
||||||
|
Plane.XY.offset(headphone_holder_thickness + thickness)
|
||||||
|
) as sketch2:
|
||||||
|
with BuildLine():
|
||||||
|
l1 = RadiusArc((0, 0), (hole_spacing + 2 * x_padding, 0), holder_roc)
|
||||||
|
offset(amount=lip_thickness, side=Side.LEFT)
|
||||||
|
make_face()
|
||||||
|
with BuildSketch(
|
||||||
|
Plane.XY.offset(headphone_holder_thickness + thickness + lip_length)
|
||||||
|
):
|
||||||
|
with BuildLine():
|
||||||
|
l1 = RadiusArc(
|
||||||
|
(0, lip_length),
|
||||||
|
(hole_spacing + 2 * x_padding, lip_length),
|
||||||
|
holder_roc,
|
||||||
|
)
|
||||||
|
offset(amount=lip_thickness, side=Side.LEFT)
|
||||||
|
make_face()
|
||||||
|
|
||||||
|
loft()
|
||||||
|
show(holder)
|
||||||
|
export_stl(holder.part, "headphone_holder.stl")
|
||||||
BIN
img/headphone_holder.png
Normal file
BIN
img/headphone_holder.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Loading…
Add table
Add a link
Reference in a new issue