commit 0915b2b6dcaa2bd7cc1e5d9f7edf7dfdd609f49a Author: Alex Selimov Date: Fri Sep 4 06:53:32 2026 -0400 Init repo with first model and README diff --git a/README.md b/README.md new file mode 100644 index 0000000..9e06d51 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# CAD Models + +This repo contains a collection of random CAD models I've created mainly using build123d. + +## How to run + + +``` +uv run +``` + +## Model descriptions + +### Laptop Holder + +![Vertical Laptop holder with 4 slots](./img/laptop_holder.png) + +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. + diff --git a/img/laptop_holder.png b/img/laptop_holder.png new file mode 100644 index 0000000..9db04a0 Binary files /dev/null and b/img/laptop_holder.png differ diff --git a/laptop_holder.py b/laptop_holder.py new file mode 100644 index 0000000..7186dbd --- /dev/null +++ b/laptop_holder.py @@ -0,0 +1,37 @@ +# /// script +# requires-python = ">=3.14" +# dependencies = ["ocp_vscode", "build123d"] +# /// + +from build123d import * +from ocp_vscode import * + +### USER INPUTS ### +base_thickness = 25.4 * MM +wall_thickness = 9 * MM +slots = [i * MM for i in [22, 22, 20, 20]] +slot_height = 60 * MM +width = 355.7 / 3 * MM # width of macbook pro +################### + +with BuildPart() as holder: # noqa: SIM117 + with BuildSketch() as sketch: + length = wall_thickness * (len(slots) + 1) + sum(slots) + height = slot_height + base_thickness + Rectangle(length, height) + + offset = wall_thickness + for slot in slots: + with Locations((offset - length / 2, base_thickness - height / 2)): + Rectangle( + slot, slot_height, mode=Mode.SUBTRACT, align=(Align.MIN, Align.MIN) + ) + Circle(slot / 2, mode=Mode.SUBTRACT, align=(Align.MIN, Align.CENTER)) + offset += wall_thickness + slot + extrude(amount=width) + fillet( + holder.edges().group_by(Axis.Y)[-1].filter_by(Axis.Z), + radius=wall_thickness / 2.5, + ) + show(holder) +export_stl(holder.part, "laptop_holder.stl") diff --git a/laptop_holder.stl b/laptop_holder.stl new file mode 100644 index 0000000..efc082e Binary files /dev/null and b/laptop_holder.stl differ