Text-to-CAD: parametric source, geometry evidence and responsible handoff
Set up Text-to-CAD locally: match the skill pin and launch the right model workspace
Separate skill installation, cadgen dependencies and browser rendering, and understand the viewer’s directory-bound links.
What you will learn
- Skill text and runtime must agree
- Launch from a deliberate model workspace
- Verify local artifacts before sharing review links
Before you start
- Basic Python functions, modules and file paths
- Understanding of units and the difference between a design and a physical part
Plan a bounded CAD exercise and distinguish source freshness, document inspection, visual review and manufacturing decisions.
Key takeaways
- Match installed runtime to the skill’s dependency pin.
- The viewer’s current directory determines the served workspace.
- Use the launcher’s returned URL and verify the artifact path.
Skill text and runtime must agree
The README describes installing individual skills, while each skill’s requirements file pins the cadgen distribution it expects. The CAD guide says to use the active project interpreter and its requirements, and cadgen doctor checks compatibility with the selected skill directory. Do not assume an unrelated global cadgen matches newly downloaded instructions.
The viewer guide requires Python 3.11 or later and ships its server and prebuilt client through cadgen without Node at runtime. Snapshot rendering additionally needs a browser, installed separately from Python dependencies. Missing Chromium and missing cadgen are different setup failures.
Launch from a deliberate model workspace
The viewer serves the directory from which it is launched, fixed for the process lifetime. Choose a narrow model workspace rather than the repository root containing dependencies and unrelated files. Use the returned JSON URL instead of assuming the default starting port is free.
The documented launcher can reuse an instance for the same resolved directory and viewer identity, or start another instance on an available port. A link’s file parameter is relative to that instance’s served root. Identical relative links on different instances may therefore refer to different files.
Verify local artifacts before sharing review links
Build a generated model first and confirm its artifact exists. The viewer can compile an imported or existing STEP document’s bytes for display, but it cannot create missing geometry by running the source script. A directory or an inaccessible path is not a substitute for the intended artifact.
The example assumes a reviewed installation and that the current directory is the model workspace. Bind locally for this learning exercise. We did not install packages or browsers, launch the CAD viewer, expose it publicly or create manufacturing connections.
Decision guide
| Criterion | Option A | Option B |
|---|---|---|
| Best when | You need predictable behavior and easy auditing | You need adaptive optimization and have reliable telemetry |
| Main risk | May leave performance on the table | Can become difficult to explain or debug |
Implementation steps
- 1
Choose a dedicated interpreter and reviewed skill revision.
- 2
Check runtime compatibility and browser availability.
- 3
Build or locate the exact document.
- 4
Launch from its model workspace and inspect the returned URL.
Copy-ready example
cadgen viewer --host 127.0.0.1 --json
cadgen viewer listFrequently asked questions
Does the viewer require a Node installation at runtime?
The inspected guide says the cadgen package carries its server and prebuilt client without Node at runtime.
Does opening a viewer link run a missing model script?
No. It displays existing documents; generated artifacts must be built first.
Sources
- Text-to-CAD / README.mdSource checked 2026-09-14
- Text-to-CAD / skills/cad/SKILL.mdSource checked 2026-09-14
- Text-to-CAD / skills/cad-viewer/SKILL.mdSource checked 2026-09-14