# What Output Formats Does Text-to-CAD Generate? Complete File Type Reference

> Explore Text-to-CAD's extensive output formats, including STEP, GLB, STL, OBJ, DXF, URDF, SDF, and PNG. Access over ten file types with simple CLI commands for your projects.

- Repository: [earthtojake/text-to-cad](https://github.com/earthtojake/text-to-cad)
- Tags: api-reference
- Published: 2026-09-13

---

**Text-to-CAD produces over ten distinct file types including STEP, GLB, STL, OBJ, DXF, URDF, SDF, and PNG, with each format exposed through dedicated CLI commands in the `cadgen` package.**

The `text-to-cad` repository by earthtojake is an open-source Python framework that transforms natural language descriptions into manufacturable 3D assets. Mastering the **text-to-cad output formats** ensures seamless integration with CAD workflows, additive manufacturing pipelines, and robotics simulation environments.

## Core CAD Exchange Formats

### STEP and STP (ISO 10303)

The framework treats **STEP** (`.step`, `.stp`) as the canonical 3D CAD exchange format. According to the source code in [`tests/python/skills/gcode/test_gcode_tool.py`](https://github.com/earthtojake/text-to-cad/blob/main/tests/python/skills/gcode/test_gcode_tool.py), the system validates STEP file ingestion and conversion to mesh formats. The `cadgen.cli.step_snapshot` module provides a CLI wrapper that accepts `.step` or `.stp` inputs and produces derivative outputs.

### GLB (Binary glTF)

**GLB** files serve as the web-ready mesh standard. The test suite confirms that STEP inputs convert to `.glb` via the snapshot CLI, enabling browser-based visualization without native CAD software.

## Additive Manufacturing Mesh Formats

The DFAM (Design for Additive Manufacturing) skill suite supports triangulated meshes for 3D printing. As implemented in [`tests/python/skills/dfam-check/test_dfam_tool.py`](https://github.com/earthtojake/text-to-cad/blob/main/tests/python/skills/dfam-check/test_dfam_tool.py), the system handles:

- **STL** – the universal stereolithography format for FDM printing
- **OBJ** – Wavefront geometry with material library support
- **PLY** – Polygon File Format for colored meshes or point clouds
- **3MF** – modern 3D Manufacturing Format replacing legacy STL

These formats are generated through the DFAM-check tool's validation pipeline, ensuring watertight geometry suitable for fabrication.

## 2D Drafting and Documentation

### DXF (Drawing Exchange Format)

For technical drawings and laser-cutting workflows, text-to-cad emits **DXF** files. The validation logic in [`tests/python/skills/dxf/test_standalone_source.py`](https://github.com/earthtojake/text-to-cad/blob/main/tests/python/skills/dxf/test_standalone_source.py) confirms that DXF is a primary standalone output, not merely an intermediate format.

## Robotics Simulation Standards

### URDF and SDF

The system exports **URDF** (Unified Robot Description Format) and **SDF** (Simulation Description Format) for ROS and Gazebo integration. The GCode skill tests in [`tests/python/skills/gcode/test_gcode_tool.py`](https://github.com/earthtojake/text-to-cad/blob/main/tests/python/skills/gcode/test_gcode_tool.py) demonstrate URDF generation alongside CAD files, allowing immediate import into robotics simulators.

## Snapshot and Metadata Outputs

### PNG Raster Images

The CLI tools `cadgen.cli.step_snapshot` and `cadgen.cli.dxf_snapshot` generate **PNG** thumbnails. These raster images provide visual previews of DXF drawings or GLB meshes without requiring dedicated 3D viewers.

### JSON Sidecars

Metadata files (e.g., [`.step.json`](https://github.com/earthtojake/text-to-cad/blob/main/.step.json), [`.dxf.json`](https://github.com/earthtojake/text-to-cad/blob/main/.dxf.json)) accompany primary CAD outputs. These sidecars contain inspection data, bounding boxes, and manufacturing constraints, implicitly referenced across the test suites for quality validation.

## CLI Usage Examples

The `cadgen` package exposes format generation through autogenerated CLI commands.

Generate a web-ready mesh from STEP:

```python
import cadgen.cli.step_snapshot as step_cli

# Converts my_model.step to my_model.glb

result = step_cli.main(["my_model.step"])

```

Export robotics descriptions and meshes simultaneously:

```python
import cadgen.cli.gcode_tool as gcode

# Produces part.stl, part.glb, and associated URDF

gcode.main(["--out", "part.stl", "--out", "part.glb", "source.py"])

```

Command-line equivalents:

```bash

# Create GLB from STEP

cadgen step snapshot model.step

# Generate PNG preview from DXF

cadgen dxf snapshot drawing.dxf

```

## Summary

- **STEP/STP** serves as the native CAD exchange format, convertible to GLB via `cadgen.cli.step_snapshot`
- **STL, OBJ, PLY, and 3MF** support additive manufacturing workflows through the DFAM-check skill
- **DXF** provides 2D vector output for technical drawings and laser cutting
- **URDF and SDF** enable direct import into ROS and Gazebo simulation environments
- **PNG and JSON sidecars** deliver visual previews and metadata for every primary CAD file

## Frequently Asked Questions

### Does text-to-cad support 3MF format for 3D printing?

Yes. The DFAM-check skill explicitly supports **3MF** alongside STL, OBJ, and PLY, as validated in [`tests/python/skills/dfam-check/test_dfam_tool.py`](https://github.com/earthtojake/text-to-cad/blob/main/tests/python/skills/dfam-check/test_dfam_tool.py). This modern format preserves color and lattice data superior to legacy STL.

### Can text-to-cad generate robotics description files?

Yes. The framework emits **URDF** and **SDF** files for robot simulation. The GCode skill tests demonstrate URDF generation concurrent with mesh outputs, allowing immediate testing in ROS or Gazebo without manual conversion.

### What is the difference between STEP and GLB outputs?

**STEP** (`.step`) is a precise CAD boundary representation (B-rep) format for engineering workflows, while **GLB** is a compressed mesh format optimized for web viewing. The `cadgen.cli.step_snapshot` tool converts STEP to GLB for browser-based visualization.

### How do I export a PNG snapshot from a CAD file?

Use the dedicated snapshot CLIs. Run `cadgen dxf snapshot drawing.dxf` to generate a PNG from a 2D drawing, or `cadgen step snapshot model.step` to create a rendered thumbnail of a 3D model. These commands are defined in `cadgen.cli.dxf_snapshot` and `cadgen.cli.step_snapshot` respectively.