{"id":51149051,"url":"https://github.com/fa-mc/vibe-cading","last_synced_at":"2026-06-26T05:00:44.808Z","repository":{"id":365761027,"uuid":"1179338760","full_name":"fa-mc/vibe-cading","owner":"fa-mc","description":"3D model generators with CadQuery for humans and LLM agents","archived":false,"fork":false,"pushed_at":"2026-06-26T03:13:14.000Z","size":4035,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-26T03:13:46.972Z","etag":null,"topics":["3d-printing","ai-agents","cad","cadquery","code-cad","generative-design","lego-technic","llm","mcp","mechanical-engineering","parametric-cad","python","step","stl"],"latest_commit_sha":null,"homepage":"https://vibe-cading.ai","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fa-mc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":"CLA.md"}},"created_at":"2026-03-11T23:45:02.000Z","updated_at":"2026-06-26T03:12:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fa-mc/vibe-cading","commit_stats":null,"previous_names":["fa-mc/vibe-cading"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fa-mc/vibe-cading","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fa-mc%2Fvibe-cading","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fa-mc%2Fvibe-cading/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fa-mc%2Fvibe-cading/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fa-mc%2Fvibe-cading/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fa-mc","download_url":"https://codeload.github.com/fa-mc/vibe-cading/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fa-mc%2Fvibe-cading/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34803678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-26T02:00:06.560Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-printing","ai-agents","cad","cadquery","code-cad","generative-design","lego-technic","llm","mcp","mechanical-engineering","parametric-cad","python","step","stl"],"created_at":"2026-06-26T05:00:28.500Z","updated_at":"2026-06-26T05:00:44.770Z","avatar_url":"https://github.com/fa-mc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003evibe-cading\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eA parametric, AI-friendly Code-CAD library in Python.\u003c/b\u003e\u003cbr\u003e\n  Reusable mechanical components — plus adapters that bridge RC hardware to Lego\u0026nbsp;Technic.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg alt=\"License: AGPL v3\" src=\"https://img.shields.io/badge/License-AGPLv3-blue.svg\"\u003e\u003c/a\u003e\n  \u003cimg alt=\"Python 3.11\" src=\"https://img.shields.io/badge/python-3.11-blue.svg\"\u003e\n  \u003cimg alt=\"Built with CadQuery\" src=\"https://img.shields.io/badge/CAD-CadQuery-orange.svg\"\u003e\n\u003c/p\u003e\n\nBuilt on [CadQuery](https://cadquery.readthedocs.io/), **every part is a Python class\nwhose geometry regenerates from typed parameters** — change a number, get a new part.\nStandard families (screws, gears, nuts) build straight from real-world size tables.\nAnd it's designed to be driven by humans *and* AI agents.\n\n---\n\n## Samples\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" width=\"50%\"\u003e\n      \u003ca href=\"assets/sample-gear.stl\" title=\"Click to rotate in 3D\"\u003e\u003cimg src=\"assets/sample-gear.png\" alt=\"Parametric spur gear\" width=\"290\"\u003e\u003c/a\u003e\u003cbr\u003e\n      \u003csub\u003e\u003cb\u003eSpurGear\u003c/b\u003e · \u003ccode\u003emodule=1.5, teeth=18\u003c/code\u003e\u003c/sub\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" width=\"50%\"\u003e\n      \u003ca href=\"assets/sample-lliftarm.stl\" title=\"Click to rotate in 3D\"\u003e\u003cimg src=\"assets/sample-lliftarm.png\" alt=\"Lego Technic L-liftarm (3×5)\" width=\"200\"\u003e\u003c/a\u003e\u003cbr\u003e\n      \u003csub\u003e\u003cb\u003eLegoTechnicLLiftarm\u003c/b\u003e · 3×5 Technic L-liftarm\u003c/sub\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" width=\"50%\"\u003e\n      \u003ca href=\"assets/sample-servo.stl\" title=\"Click to rotate in 3D\"\u003e\u003cimg src=\"assets/sample-servo.png\" alt=\"SG90 servo mount: base plus dovetail clamp\" width=\"240\"\u003e\u003c/a\u003e\u003cbr\u003e\n      \u003csub\u003e\u003cb\u003eServoMountBase + ServoMountClamp\u003c/b\u003e · SG90 → Lego, dovetail-clamped\u003c/sub\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\" width=\"50%\"\u003e\n      \u003ca href=\"assets/sample-hinge.stl\" title=\"Click to rotate in 3D\"\u003e\u003cimg src=\"assets/sample-hinge.png\" alt=\"Print-in-place hinge with countersunk M3 mount holes\" width=\"250\"\u003e\u003c/a\u003e\u003cbr\u003e\n      \u003csub\u003e\u003cb\u003ePrintInPlaceHinge\u003c/b\u003e · 2 countersunk M3 holes / leaf\u003c/sub\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cp align=\"center\"\u003e\u003csub\u003e🔄 \u003cb\u003eClick any sample\u003c/b\u003e to spin the real model in GitHub's interactive 3D viewer.\u003c/sub\u003e\u003c/p\u003e\n\nEach part is a few lines of Python. The geometry is a function of the parameters,\nso a part is never a static shape — it's a generator:\n\n```python\nimport cadquery as cq\nfrom vibe_cading.mechanical.gears.spur import SpurGear\n\n# Parameters drive the geometry — change teeth, get a new gear.\ngear = SpurGear.from_iso(module=1.0, teeth=20, face_width=5.0)\ncq.exporters.export(gear.solid, \"gear.step\")   # extension picks the format\n```\n\n---\n\n## Why vibe-cading\n\n- **Parametric by construction.** Every part regenerates from typed constructor\n  parameters; there are no frozen meshes. Standard families come from size tables —\n  `MetricMachineScrew.from_size(\"M3\", length=12)`, `SpurGear.from_iso(module=1, teeth=20, face_width=5.0)` —\n  so one class yields a whole catalogue of real-world parts.\n- **Parametric both ways.** Forward is params → part. *Reverse* goes the other\n  direction: bring an existing **STEP** file, let the engine's analysis tools\n  measure it, and rebuild it — by hand or with an AI agent — as editable parametric\n  code. `boolean_diff` then confirms the rebuild matches the original to within ~1%\n  by volume. That's how the **SG90 servo body** in the samples above was built:\n  measured from a reference STEP, rebuilt as a parametric class. Works best on\n  simple prismatic parts.\n- **Print-ready fits.** Real-world *nominal* geometry stays fixed; per-machine,\n  per-material clearances live in a separate **tolerance profile** you calibrate once.\n  The same model bores a tight hole on one printer and a loose one on another — the\n  profile absorbs that, not your code.\n- **Built for humans *and* AI agents.** Drive it from Python, from the live OCP CAD\n  viewer, or from any [MCP](docs/mcp.md) client. A multi-role agent workflow ships\n  in-repo so models can be generated, validated, and reviewed by AI agents.\n- **RC ↔ Lego Technic.** A library of reusable mechanical components (screws, gears,\n  joints, bearings, heat-set inserts, hinges, standoffs) plus adapters that mate RC\n  hardware to the 8\u0026nbsp;mm Lego Technic stud grid (motor mounts, ESC holders, axle adapters).\n\n---\n\n## Featured models\n\nEach is parametric — the call below is the *whole* construction.\n\n| Component | Build it | Parametric handle |\n|---|---|---|\n| Lego Technic beam | `LegoTechnicBeam(length_in_studs=5)` | studs → mm on the 8\u0026nbsp;mm grid |\n| Metric machine screw | `MetricMachineScrew.from_size(\"M3\", length=12)` | M2–M5 size table; socket / flat / pan heads, hex / Torx / Phillips drives |\n| Spur gear | `SpurGear.from_iso(module=1.0, teeth=20, face_width=5.0)` | ISO module + teeth → involute profile |\n| Hex nut | `MetricHexNut.from_size(\"M3\")` | M2–M8 size table |\n| Snap-fit joint | `CantileverSnapFit(hook_depth=1.5, retention_angle=90)` | hook geometry; `.male()` solid / `.to_cutter()` cavity |\n\n…plus magnets, enclosures, more fastener and bearing types, the Lego Technic\nprimitives, and the RC adapters. See [`vibe_cading/`](vibe_cading/) for the full library tree,\nand four runnable demos under [`examples/`](examples/).\n\n---\n\n## Quick start\n\nThis project runs in a **VS Code Dev Container** — no local Python or CadQuery install.\n\n1. Clone the repo, open it in VS Code, and click **Reopen in Container**\n   (Python 3.11 + CadQuery + the OCP CAD viewer are provisioned for you).\n2. Run an example — writes STEP + SVG to `examples/build/`:\n   ```bash\n   python3 examples/gear_from_iso.py\n   ```\n3. Preview any part live in the OCP CAD viewer (port 3939):\n   ```bash\n   python3 vibe_cading/tools/view.py vibe_cading.mechanical.gears.spur.SpurGear\n   ```\n4. **Before your first print**, calibrate the slip fit for your printer + material:\n   print the axle gauge and run `python3 vibe_cading/tools/calibrate.py slip` — it\n   writes the measured `slip.radial` into your gitignored `print_profiles_user.json`\n   so Lego pins and axles fit. (Why it matters, plus the other knobs:\n   [docs/print-tolerances.md](docs/print-tolerances.md).)\n\n→ Full dev environment, the local test/lint/build loop (`python build.py`), and\nadding your own parts: **[CONTRIBUTING.md](CONTRIBUTING.md)**.\n\n**Just want the library in your own project?** It's on PyPI:\n\n```bash\npip install vibe_cading            # the library\npip install \"vibe_cading[mcp]\"     # + the MCP server for AI agents\n```\n\nOn headless Linux (cloud servers, CI runners, slim Docker images), CadQuery's\ngeometry kernel also needs the system OpenGL library — install it once with\n`apt install libgl1` (or your distro's equivalent). Desktop Linux, macOS, and\nWindows already have it.\n\n---\n\n## Tolerances \u0026 fit\n\nPrinted fits are printer- and material-dependent. vibe-cading keeps real-world\n*nominal* geometry fixed and carries the per-machine clearance separately in a\n**tolerance profile** — `fdm_standard`, `resin_precise`, and `cnc` ship in-repo,\nselected via `PRINT_PROFILE` and overridable per-machine in a gitignored\n`print_profiles_user.json`.\n\n`slip.radial` (the Lego-axle slip fit) is the one knob almost everyone re-tunes;\ncalibrate it by printing a gauge and running `python3 vibe_cading/tools/calibrate.py slip`.\nThe `free` and `press` defaults work for most FDM printers out of the box.\n\n→ Full fit-grade model and calibration workflow: **[docs/print-tolerances.md](docs/print-tolerances.md)**.\n\n---\n\n## Learn more\n\n| If you want to… | Read |\n|---|---|\n| Set up, build, and contribute parts | [CONTRIBUTING.md](CONTRIBUTING.md) |\n| Understand tolerances \u0026 calibration | [docs/print-tolerances.md](docs/print-tolerances.md) |\n| Look up Lego Technic dimensions | [docs/lego-technic.md](docs/lego-technic.md) |\n| Look up fastener sizes \u0026 fits | [docs/screws.md](docs/screws.md) |\n| Drive the engine from an MCP client | [docs/mcp.md](docs/mcp.md) |\n| Understand the multi-role agent workflow | [docs/agentic-workflow.md](docs/agentic-workflow.md) |\n| **Onboard an AI coding agent** | **[AGENTS.md](AGENTS.md)** → [vibe/INSTRUCTIONS.md](vibe/INSTRUCTIONS.md) |\n\n---\n\n## License\n\n[AGPLv3](LICENSE). See [LICENSE-FAQ.md](LICENSE-FAQ.md) for a plain-language guide\nto what this means for your projects.\n\nFor commercial or closed-source use cases that are incompatible with AGPLv3,\ndual-licensing is available. Contact licensing@vibe-cading.com for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffa-mc%2Fvibe-cading","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffa-mc%2Fvibe-cading","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffa-mc%2Fvibe-cading/lists"}