Can Text-to-CAD Be Integrated with Other CAD Software? Yes, Through Universal Export Formats

Text-to-CAD integrates with any downstream CAD platform—including FreeCAD, SolidWorks, Fusion 360, and CATIA—by generating industry-standard files in STEP, STL, 3MF, and GLB formats that contain no proprietary metadata.

The earthtojake/text-to-cad repository centers on the cadgen engine, a Python geometry generation system architected for maximum interoperability. Unlike closed CAD ecosystems that restrict data portability, cadgen writes clean exchange files that any external system can import directly, enabling seamless incorporation into existing engineering workflows.

File-Based Integration via Standard CAD Formats

The primary integration mechanism relies on universal file exchange. The cadgen engine exports geometry to industry-neutral formats that major CAD kernels read natively, ensuring zero vendor lock-in.

STEP Export for Parametric CAD Systems

For precise solid modeling workflows, packages/cadgen/src/cadgen/step.py implements ISO-standard STEP (ISO 10303) export. This file format carries exact boundary representation data suitable for SolidWorks, CATIA, Siemens NX, and Onshape. Because cadgen follows design law 4—zero metadata in written artifacts—the exported .step files contain pure geometry without proprietary headers or vendor-specific tags, allowing downstream systems to treat them as native-authored solids.

STL and 3MF for Mesh-Based Workflows

When targeting simulation or additive manufacturing, packages/cadgen/src/cadgen/stl.py and threemf.py generate tessellated meshes. STL files feed directly into finite-element solvers like Abaqus or ANSYS, while 3MF preserves color and material annotations for modern manufacturing pipelines. These mesh formats integrate with FreeCAD, MeshLab, and slicing software without conversion overhead.

Programmatic API Integration

Developers can embed text-to-cad generation directly into existing Python applications or CAD automation scripts. The public API entry point in packages/cadgen/src/cadgen/__init__.py exposes decorator-driven generators, while packages/cadgen/src/cadgen/cli_tree.py provides auto-generated CLI bindings for shell-based pipelines.

The following example demonstrates programmatic STEP generation:

from cadgen import build123d as bd, step

@step(out="my_part.step")
def my_part():
    # Build geometry using OpenCascade-based helpers

    return bd.box(10, 20, 5)

# Execution writes my_part.step, importable into any CAD system

For command-line automation:


# Install the skill set

npx skills add earthtojake/text-to-cad

# Generate STL directly from a model file

cadgen stl build my_model.py --out part.stl

Both methods produce deterministic outputs (per cadgen design law 5—byte determinism) that integrate reliably into version-controlled engineering workflows.

HTTP-Based Integration via the CAD Viewer

The built-in viewer provides a network interface for headless automation scenarios. The server bootstrap in packages/cadgen/src/cadgen/viewer/main.py launches a local HTTP service defined in packages/cadgen/src/cadgen/viewer/http_app.py, exposing endpoints that serve generated artifacts programmatically.

from cadgen.viewer import launch
import requests

# Start local server at http://localhost:8000

viewer = launch()

# Fetch generated STEP file via HTTP API

resp = requests.get("http://localhost:8000/api/artifacts")
step_url = resp.json()["step"]
step_data = requests.get(step_url).content

# Write to disk for downstream CAD consumption

with open("downloaded.step", "wb") as f:
    f.write(step_data)

This approach enables real-time integration where external CAD systems poll for generated geometry or trigger text-to-cad generation via scripted HTTP requests.

Design Principles Ensuring CAD Interoperability

Three architectural decisions in the cadgen engine guarantee reliable cross-platform integration:

  • Zero Metadata (Design Law 4): Written artifacts exclude proprietary headers, ensuring CAD kernels interpret them as standard exchange files.
  • Byte Determinism (Design Law 5): Identical inputs produce bit-identical outputs across runs, critical for reproducible engineering pipelines.
  • Content-Addressable Storage (Design Law 2): Generated files reside in a deterministic storage layer that external automation scripts can reference reliably.

Side-car JSON files (e.g., *.step.json) accompany geometry files but are ignored by standard CAD importers, preserving compatibility while allowing metadata retrieval when needed.

Summary

Text-to-cad achieves universal CAD integration through three primary mechanisms:

  • Standard file exports: STEP, STL, 3MF, and GLB formats open natively in FreeCAD, SolidWorks, Fusion 360, and other systems.
  • Python API: Import cadgen modules to generate geometry programmatically within existing scripts or CAD add-ons.
  • HTTP interface: The built-in viewer serves files over a local network for headless automation pipelines.

All exports maintain zero proprietary metadata, ensuring downstream tools process text-to-cad output exactly like files from native CAD authoring workflows.

Frequently Asked Questions

Can text-to-cad files be opened in SolidWorks or CATIA?

Yes. STEP files generated by packages/cadgen/src/cadgen/step.py import directly into SolidWorks, CATIA, Siemens NX, and Onshape as solid bodies or editable features, depending on the target system's import settings. The files contain standard ISO 10303 boundary representation data without vendor-specific extensions.

Does text-to-cad require internet connectivity to export CAD files?

No. The cadgen engine operates entirely offline. File generation occurs locally through the Python API or CLI, writing STEP, STL, or other formats directly to disk. The optional HTTP viewer requires only local network access unless explicitly configured otherwise.

Are exported files editable in parametric CAD systems?

Exported STEP files import as solid bodies or feature-based models depending on the target CAD system's recognition capabilities. The geometry is mathematically precise B-rep data, but parametric history (sketches, constraints) is not preserved—this is standard behavior for neutral format exchange in any CAD ecosystem.

Can I automate text-to-cad generation from my existing CAD software?

Yes. You can script the CLI (cadgen) from within macro systems like FreeCAD's Python console, SolidWorks VBA, or Siemens NX Open API. Alternatively, use the HTTP viewer endpoints to request geometry generation and file retrieval programmatically, allowing any CAD system with HTTP client capabilities to integrate text-to-cad functionality.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →