Skip to content

DXF

DXF is the AutoCAD interchange. Prompt2CAD writes R2000 (AC1015) DXF using 3DFACE entities — the broadest-compatibility cross-section across AutoCAD, Fusion 360, BricsCAD, Inventor, Rhino, and SketchUp.

Use DXF when:

  • You're handing the model to a CAM workflow (CNC router, laser, plasma).
  • You're sending drawings into AutoCAD or a draftsperson's tool of choice.
  • Your downstream tool is older and STEP support is dodgy.

How to export

Export → DXF (.dxf). A .dxf file downloads.

What's in the file

Every triangle of every mesh becomes a 3DFACE entity in world space. Each unique material maps to a layer, with the true 24-bit RGB carried via group code 420 on both the layer record and each entity. Legacy AutoCAD palette index (ACI, group 62) is also written for older readers.

So a model with three materials produces a DXF with three layers (named after the material slots) and 3DFACE entities partitioned across them. Turning layers on/off in AutoCAD lets you isolate parts.

FreeCAD's Part workbench ignores 3DFACE

FreeCAD's Part workbench will show an empty model. Switch to the Mesh workbench (File → Import → set type to Mesh) and the 3DFACEs come through. STEP is the better choice for FreeCAD if you have it.

Units

DXF files are written in millimeters with $INSUNITS = 4. Same meters → millimeters conversion as STEP.

Coordinate convention

Three.js is Y-up; DXF files are conventionally Z-up:

dxf_x =  three_x
dxf_y = -three_z
dxf_z =  three_y

Your model imports right-side up in AutoCAD without any extra rotation.

What's preserved

AspectPreservedNotes
GeometryTriangulated mesh, faithful to the viewport.
ColorOne layer per material, 24-bit RGB via group 420.
LayersOne per material slot.
TexturesDXF has no texture concept.
ParametersBaked at current values.
SectionsPartialLayer names reflect materials, not section groups.

CAM and CNC workflows

For 2D toolpathing (laser cutting, CNC routing of flat sheet goods), the typical workflow is:

  1. Export the model as DXF.
  2. Import into your CAM tool.
  3. Select the top-view (XY plane) entities.
  4. Generate toolpaths for the projected outlines.

The 3DFACE entities are 3D — your CAM tool will project them onto the cutting plane automatically. If you want flat 2D drawings for individual panels (so a flat-pack cabinet can be cut from sheets), the better workflow is currently:

  1. Export STEP.
  2. Use your CAM tool's "unfold" or "flatten" operation on each panel.
  3. Export the resulting flat geometry as DXF from CAM.

Prompt2CAD does not yet do automatic flat-pack unfolding. If you need it, ask the agent for a per-panel breakdown (each as its own primitive) and you can manipulate them in CAM.

When NOT to use DXF

  • Anything that needs textures. Use GLB or OBJ.
  • 3D printing. Slicers don't read DXF. Use STL.
  • FreeCAD (Part workbench). Use STEP instead.
  • Web / AR visualisation. Way too large and not browser-readable. Use GLB.

Next: OBJ + MTL.

Docs for Prompt2CAD — derived from the source code at the commit that built them.