Draftwright turns a 3D STEP file into a complete, dimensioned engineering drawing. It recognises the part's features (holes, patterns, slots, pockets, turned steps, threads), decides what to dimension and where, reads tolerances and GD&T from AP242 files, lays out the views on a standard sheet, and tells you anything it could not state. One Rust binary, one command, one repeatable drawing.
Python
, =
STEP paths and build123d shapes are supported (install build123d separately for
shapes). The wheel also installs draftwright and draftwright-mcp on PATH.
Changed from 0.4: make_drawing still returns (svg_path, dxf_path) as strings,
and the DXF is now editable in CAD; the other old Python
classes/functions are unavailable. Unsupported options with non-default values
raise TypeError; old names/imports give migration guidance. Pin
draftwright<0.6 to keep the old API. The Rust engine uses a Spec.
See the Python API, keyword mapping and interrupt behaviour.
Ways to use it
- In the browser: draftwright.io. Open a STEP file, see the drawing, move and edit dimensions, add requirements, and export PDF or STEP. The whole engine runs in the browser as WebAssembly.
- With an AI agent: the hosted MCP server at
mcp.draftwright.iolets Claude, ChatGPT and other MCP clients open parts, read drawings and make changes. See docs/mcp.md. - On the command line:
draftwright render part.step -o part(below). - From Rust: the
draftwrightcrate's five stateless operations (analyse,plan,edit,render,review). See docs/model.md.
Install
With a recent stable Rust toolchain:
Without Rust, download a ready-built archive for macOS (Apple silicon), Linux x86_64 or Windows x86_64 from the latest release.
From 0.6.0, the same two commands install from PyPI without Rust:
PyPI releases before 0.6 use the archived
Python implementation. Starting with
0.6, this Rust project provides both commands and the small
Python API. Pin draftwright<0.6 to keep the full old API.
The old command form draftwright part.step [options] still renders a drawing;
see CLI migration for the options it keeps.
Shell completion: draftwright completions zsh (or bash, fish, powershell, elvish)
prints a completion script; see docs/engine.md for where to put it.
Quick start
A drawing is adjusted with a Spec: a small JSON file naming only what you want different from the automatic drawing. For example, to fill in the title block:
More:
What it does
- Recognises features from the B-rep with quiddity: holes and counterbores, hole patterns, slots, pockets and recesses, turned steps, grooves, chamfers and fillets, threads. Anything it cannot read is reported, not guessed.
- Dimensions completely. Each feature family has its own rules. Dimensions are placed without collisions, and every omission is reported with a reason.
- Reads PMI. Tolerances, fits, datums, GD&T frames, threads and surface finish come from AP242 semantic PMI. Specify writes requirements back into STEP.
- US drawings.
draftwright render part.step --units in --paper ansiprints decimal inches on landscape ANSI A–E paper. Use--paper archfor ARCH A–E, or--paper isofor ISO A4–A0. In Python, usemake_drawing(part, units="in", page="ANSI B"). - Lays out sheets. Views, sections, detail views and hole tables go on landscape ISO, ANSI or ARCH sheets with an ISO 7200 title block. Sheet size and scale are chosen automatically, using more sheets when needed.
- Is deterministic. The same inputs give the same bytes. SVG and PDF carry real, searchable text and embed the Spec that made them.
- Handles assemblies.
packdraws each made part once and writes an ISO 7573 parts list, item numbers and a CSV/JSON bill of materials. - Tracks revisions.
diffcarries a drawing's edits to a new revision of the part and marks up what changed.
Examples
Drawings of NIST test parts, FreeCAD and build123d parts, and assemblies, rebuilt by CI on every release, are in pzfreo/dw-examples.
Documentation
- Engine guide: building, the full command line, what is and isn't supported, known limitations, checking a change
- Model and Spec reference: the Analysis, Spec and Plan, and every setting
- Python API and migration
- MCP and agents
- Browser / WASM package
- Thread callouts · Bills of materials · Finding impact
- Changelog
Status
Draftwright is young and moving quickly: 0.2.x releases come every few days. Drawings report what they do not state, but dense parts can still be less tidy than a hand-made drawing; see Known limitations. Issues and example parts are welcome.
Related projects
- quiddity: feature recognition from STEP B-rep, and the haecceity geometry kernel Draftwright is built on.
- Specify: writes requirements (tolerances, fits, GD&T, BOM data) into STEP as AP242 PMI. It is the Specify view at draftwright.io/specify.
- dw-examples: the example drawings.
- draftwright-python: the original Python implementation, no longer developed.
Licence and contributing
Draftwright is licensed under the GNU AGPL v3.0, and is also available under separate commercial terms; contact paul@draftwright.io. quiddity and haecceity are Apache-2.0. The bundled IBM Plex fonts are under the SIL Open Font License 1.1.
Contributions are welcome. See CONTRIBUTING.md; pull requests need the Contributor License Agreement.