# text-to-CAD Supported File Formats for Input: Mesh, CAD, and Slicer Files

> Explore text-to-CAD supported file formats. Import mesh, CAD, and slicer files like STL, OBJ, DXF, and G-code for seamless AI-powered 3D model generation.

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

---

**text-to-CAD accepts plain text prompts for AI generation and supports geometry imports via STL, OBJ, DXF, G-code, and other formats specific to each modular skill.**

The `earthtojake/text-to-cad` repository implements a skill-based architecture where independent modules declare their own supported file types. While the core language model processes natural language prompts, importing existing geometry requires specific file formats documented in individual skill configuration files.

## Primary Input: Plain Text Prompts

The foundation of every operation is a **plain text prompt** sent to the language model. This natural language input instructs the AI to generate new geometry or manipulate existing designs. However, when importing external files rather than generating from scratch, users must provide formats compatible with the specific skill being invoked.

## Supported File Formats by Skill

Each skill in the repository declares compatible input formats in its dedicated [`SKILL.md`](https://github.com/earthtojake/text-to-cad/blob/main/SKILL.md) documentation. The supported file formats for input vary by skill specialty.

### CAD Skill: Mesh Formats

According to [`skills/cad/SKILL.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/cad/SKILL.md), the CAD skill accepts standard **mesh formats** including **.stl**, **.obj**, **.3mf**, **.ply**, **.glb**, and **.gltf**. These files can be sliced into printable `.gcode` or inspected directly as 3D geometry.

### DXF Skill: 2D CAD Drawings

The DXF skill, documented in [`skills/dxf/SKILL.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/dxf/SKILL.md), exclusively handles **.dxf** files. This skill parses layers, units, and 2D geometry from CAD drawings for downstream processing and conversion to 3D models.

### G-code Skill: Printer-Ready Files

As specified in [`skills/gcode/SKILL.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/gcode/SKILL.md), this skill accepts **.gcode** files containing already-sliced printer instructions. The skill validates and visualizes these print-ready outputs.

### Bambu Labs Skill: Manufacturer-Specific Formats

The Bambu Labs skill supports **.gcode** and **.3mf** files produced specifically by Bambu Labs slicers, as outlined in [`skills/bambu-labs/SKILL.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/bambu-labs/SKILL.md).

### CAD-Viewer Skill: Universal Visualization

The viewer skill, referenced in [`skills/cad-viewer/SKILL.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/cad-viewer/SKILL.md) and [`skills/cad-viewer/references/viewer-features.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/cad-viewer/references/viewer-features.md), can display **all** previously mentioned mesh and 2D formats plus any generated **.glb** snapshots, providing comprehensive visualization capabilities.

## File Format Documentation Locations

The repository stores format specifications in skill-specific documentation files:

- [`skills/cad/SKILL.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/cad/SKILL.md) defines mesh format support and slicing capabilities
- [`skills/dxf/SKILL.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/dxf/SKILL.md) specifies 2D drawing requirements and layer parsing
- [`skills/gcode/SKILL.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/gcode/SKILL.md) lists accepted printer outputs and validation rules
- [`skills/bambu-labs/SKILL.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/bambu-labs/SKILL.md) details manufacturer-specific artifacts
- [`skills/cad-viewer/references/viewer-features.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/cad-viewer/references/viewer-features.md) enumerates viewer-compatible file types

## Practical Command Examples

The following commands demonstrate how to invoke different skills with their supported file formats:

```bash

# Generate a mesh from a textual prompt and export as STL

npx skills run cad "a hollow cylinder 30 mm tall, 20 mm outer radius, 15 mm inner radius" \
    --output stl

# Convert a DXF drawing to a 3-D mesh (STL)

npx skills run dxf my-part.dxf --output stl

# Slice a mesh into G-code for a Bambu printer

npx skills run gcode my-part.stl --printer bambu

```

## Summary

- text-to-CAD processes **plain text prompts** as its primary input method for AI generation
- Geometry imports require skill-specific formats documented in individual [`SKILL.md`](https://github.com/earthtojake/text-to-cad/blob/main/SKILL.md) files
- The CAD skill supports mesh formats: **STL, OBJ, 3MF, PLY, GLB, and GLTF**
- 2D drawings require **DXF** format handled by the dedicated DXF skill
- Printer files use **G-code** or Bambu-specific **3MF** formats
- The CAD-Viewer skill aggregates all supported types plus generated **GLB** snapshots for visualization

## Frequently Asked Questions

### Does text-to-CAD accept plain text files (.txt) as input?

Yes, the core system processes natural language prompts as plain text. However, when importing geometry, you must use the specific binary or structured formats (STL, DXF, etc.) supported by the target skill as documented in the repository.

### Can I import a STEP file into text-to-CAD?

No, the repository does not list STEP (.stp or .step) files among supported formats. According to [`skills/cad/SKILL.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/cad/SKILL.md), the CAD skill specifically implements parsers for mesh formats like STL, OBJ, and GLTF, excluding CAD-native solid formats.

### What format should I use for 2D drawings?

Use **DXF** format for 2D CAD drawings. The DXF skill is specifically designed to parse these files, extracting layer information, units, and geometric data for conversion to 3D models as implemented in [`skills/dxf/SKILL.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/dxf/SKILL.md).

### How do I know which skill supports my file?

Check the corresponding [`SKILL.md`](https://github.com/earthtojake/text-to-cad/blob/main/SKILL.md) file in the `skills/` directory. Each skill maintains its own documentation declaring supported input types, with the CAD skill handling meshes, the DXF skill handling 2D drawings, and the G-code skill handling printer files.