Repository navigation
Releases
0.6.1
draftwright 0.6.1 adds one-line installers and more platforms, CLI controls for the sheet and any Spec setting, faster planning, and drawings that stay readable in dark viewers.
Install in one line
- macOS and Linux:
curl -fsSL https://raw.githubusercontent.com/pzfreo/draftwright/main/install.sh | sh - Windows (PowerShell):
irm https://raw.githubusercontent.com/pzfreo/draftwright/main/install.ps1 | iex
Both verify the release's SHA-256 checksums, install to your user directory (no admin needed) and can pin a version with DRAFTWRIGHT_VERSION.
New binaries: Linux ARM64 and Intel Mac. The Linux builds now need only glibc 2.17 (was 2.35), so they run on most distributions from the last decade.
CLI
--size,--max-sizeand--scalechoose the sheet and scale (scale accepts2,0.5or1:2).- Repeatable
--set PATH=VALUEsets any Spec value from the command line, for single drawings and packs. - Refusals print as a plain
error:line on stderr, with the choices when there are any. Successful results stay JSON on stdout. Exit codes are unchanged.
Python
Drawing.views()takescolour=(orcolor=) for shaded pictorials andbelow=for the view from below.Drawing.render(dpi=...)sets PNG resolution.
Faster planning: about 28% fewer instructions across our 68-part survey, with every plan identical to 0.6.0.
Dark viewers: every SVG sheet now has an opaque white background, so drawings stay readable in GitHub dark mode, chat apps and dark image viewers.
0.6.0
draftwright 0.6.0 is the first full release of the Rust engine on PyPI and the next release on crates.io. pip install draftwright and cargo install draftwright now install it without --pre. The version jumps from 0.2.15 (Rust) and 0.4.x (Python) so both share one number. This note covers everything since those releases, including the three alphas.
About ten times faster, in a sixth of the memory
The Rust engine replaces the Python one. Drawing the same STEP files through make_drawing, one drawing per part on the same 4-core Linux machine:
| Part | 0.4 (Python) | 0.6 (Rust) | Faster | Peak memory 0.4 → 0.6 |
|---|---|---|---|---|
| Circular flange | 12.4 s | 1.1 s | 11× | 501 → 69 MB |
| Electronics enclosure base | 13.4 s | 1.4 s | 9× | 493 → 68 MB |
| Guide bar | 15.6 s | 1.2 s | 13× | 490 → 56 MB |
| L bracket | 39.7 s | 0.7 s | 57× | 517 → 64 MB |
| Mounting plate | 27.0 s | 1.8 s | 15× | 499 → 79 MB |
| NIST CTC-01 | 30.6 s | 4.9 s | 6× | 510 → 100 MB |
| NIST CTC-02 | 11.3 min | 2.6 min | 4× | 997 → 530 MB |
| NIST FTC-06 | no drawing after 8 min | 17 s | 6,973 → 200 MB | |
| NIST FTC-10 | no drawing after 15 min | 48 s | 1,063 → 607 MB |
Times are the make_drawing call; starting Python and importing the package adds about 5 s more for 0.4 and 0.1 s for 0.6. Large PMI-heavy parts are still slower than they should be; that is tracked for 0.6.1 (#507).
Coming from the Python 0.4 package? This is a new API. make_drawing keeps 0.4's arguments and returns (svg_path, dxf_path); the rest of the old API is gone. To keep the old package, pin draftwright<0.6. See Migrating from Python 0.4.
Drawings
- Inch drawings and US paper (ANSI and ARCH) with imperial scales. A STEP file that declares inches is drawn in inches unless the Spec sets
units. - Editable DXF: native text, live dimensions, blocks and title-block attributes. GD&T frames are native
TOLERANCEentities, callouts areMULTILEADERs and tables areACAD_TABLEs, editable in AutoCAD. Some free readers (QCAD Community, FreeCAD) don't show the newer entities yet (#484). - GD&T frames at CAD size on every format, so the PDF and the DXF match.
- Incremental planning: adding PMI or GD&T to a drawn part keeps its layout, and the drawing offers to re-base when a fresh layout would be better.
- Better sheet sizes: smaller sheets win when the drawing fits, and a STEP with PMI keeps a readable scale.
- Assembly drawing packs (in the CLI since 0.2.5, now also from Python): a general-assembly sheet with balloons and a parts list, a sheet per made part, and a CSV/JSON bill of materials. The assembly is now drawn as modelled rather than turned to put its longest axis across the sheet;
ga.horizontal_axisturns it. - Shaded pictorial views (
--shaded,--below,--colour). - Counterbore mouth chamfers in hole callouts (
⌀4.2 ↧ 10 C0.8), PMI hole depths in callouts, and angular dimension text at its arc. - Problems are grouped as fix before printing, tidy and information; fixes are offered only when they leave fewer problems.
From build123d
State fits, threads, GD&T, finish and notes in the script that builds the part, and draw it or a whole assembly from there. See the build123d guide.
Install
pip install draftwrightgives thedraftwrightanddraftwright-mcpcommands and the Python API, with no Rust needed. For build123d:pip install "draftwright[build123d]".cargo install draftwright, or the release archives below for macOS, Linux and Windows.- Upgrading from the 0.4 command line with shell completion installed? Tab prints a mess until you replace the old script:
draftwright completions zsh > ~/.zfunc/_draftwright(bash and fish in the README).
For agents
Two skills in skills/: one for any STEP file (a basic drawing, or requirements written with Specify) and one for build123d. The draftwright-mcp server ships with the wheel and the archives.
On quiddity 0.5.4, the same as specify-core 0.1.17.
Known issues are tracked for 0.6.1. Please report problems at https://github.com/pzfreo/draftwright/issues.
draftwright 0.6.0-alpha.3
Pre-release for testing. It is hidden from normal installs: use pip install --pre draftwright or cargo install draftwright --version 0.6.0-alpha.3.
New since alpha.2:
- Better sheet sizes: below the fill band the smaller sheet now wins, and a STEP with PMI keeps a readable scale instead of shrinking the drawing.
- Python:
Partcovers shaft fits, external threads, toleranced sizes and distances, perpendicularity, parallelism, cylindricity, runouts, profile, concentricity and knurls. Drawing packs from Python withdraftwright.Pack: a build123d assembly plus its parts gives a GA and part sheets as PDF, CSV and JSON. Pack-wide title-block fields (drawn by, date, revision and so on) are set once, and--partaccepts the part's key. - DXF: callouts are native
MULTILEADERs, GD&T frame leaders are associated with theirTOLERANCE, and hole tables, parts lists and notes are nativeACAD_TABLEs, editable in AutoCAD. Some free readers (QCAD Community, FreeCAD) don't show these entities yet; see #484. - Drawing fixes: PMI hole depths in callouts, all-around/all-over symbols clear of their frames, and angular dimension text at its arc. Issues are grouped as fix before printing, tidy and information.
- On quiddity 0.5.3.
Still to come in 0.6.0: inch drawings by default for STEP files that declare inches, and incremental planning for adding GD&T without re-laying out a drawing.
Please report problems at https://github.com/pzfreo/draftwright/issues.
Kernel note: draftwright-rust uses haecceity: tag v0.5.3; quiddity: tag v0.5.3; pzfreo/specify-core-rust v0.1.15 uses haecceity: tag v0.4.9; quiddity: tag v0.4.9. Different quiddity pins may change STEP face numbering.
draftwright 0.6.0-alpha.2
Pre-release for testing. It is hidden from normal installs: use pip install --pre draftwright or cargo install draftwright --version 0.6.0-alpha.2.
New since alpha.1:
- Inch drawings and US paper sizes (ANSI and ARCH) with imperial scales.
- Editable DXF export: native text, dimensions, blocks, attributes and groups. Each GD&T feature control frame is one native
TOLERANCEentity, using thegdtfont. Diameter and radius signs read correctly in AutoCAD and QCAD. In the browser, WASMsheetDxfgives a sheet as DXF. - GD&T frames at CAD size on PDF and SVG too: 2.5 mm text and 0.25 mm pen, with the same cell sizes as CAD's
TOLERANCE, so the DXF and the drawing match. Some layouts got worse with the change (bigger sheets, longer leaders); they're listed in #452 and will be improved in later alphas. - Counterbore mouth chamfers in hole callouts, with depths measured from the surface (
⌀4.2 ↧ 10 C0.8), on quiddity 0.5.1. - build123d requirements API, Python half.
make_drawingreturns(svg_path, dxf_path)again, as in 0.4.- Fuller sheets, characters no font can draw are reported, the MCP render tools plan once, and fixes are offered only when they leave fewer findings.
Still to come in 0.6.0: the Rust half of the build123d API, and work on the layout regressions above.
Please report problems at https://github.com/pzfreo/draftwright/issues.
Kernel note: draftwright-rust uses haecceity: tag v0.5.1; quiddity: tag v0.5.1; pzfreo/specify-core-rust v0.1.15 uses haecceity: tag v0.4.9; quiddity: tag v0.4.9. Different quiddity pins may change STEP face numbering.
draftwright 0.6.0-alpha.1
Pre-release for testing. It is hidden from normal installs: use pip install --pre draftwright or cargo install draftwright --version 0.6.0-alpha.1.
0.6.0 is the first release of the Rust engine on PyPI. It takes over the draftwright name from the Python draftwright (0.4.x / 0.5.0rc).
- Python:
pip install --pre draftwrightinstalls thedraftwrightanddraftwright-mcpcommands and a small Python API.make_drawing(step_or_build123d_shape, ...)keeps 0.4's argument order and defaults and currently returns(svg_path, pdf_path). Other 0.4 names raise a migration error: pindraftwright<0.6to keep the old library. - Shaded pictorial views (
--shaded,--below,--colour). - The new README.
Still to come in 0.6.0: inch drawings and US paper sizes, editable DXF export, counterbore-mouth chamfers, and the build123d requirements API.
Please report problems at https://github.com/pzfreo/draftwright/issues.
0.2.15
Still on quiddity-rust 0.4.9. Automatic item IDs are now anchored on faces, so resizing a part
or adding unrelated geometry no longer renames features, hole patterns or ladder items, and
saved references keep pointing at the same geometry.
This release writes draftwright.spec/3. Engines before 0.2.15 cannot read spec/3, so a
Spec saved by 0.2.15 does not open in 0.2.14 or earlier. Specs /1 and /2 are still read and
migrated exactly through 0.2.24: each saved ID key is renamed to its face-anchored ID, and plans
and openSpec replies list what was renamed (migrated, ids). Keys that name no current item
are kept and reported as id_not_migrated. A rank-keyed /1 or /2 Spec opened with an
analysis older than draftwright.analysis/8 is refused rather than saved unmigrated:
re-analyse the STEP with this release and reopen the saved Spec. From 0.2.25, /1 and /2
are refused, with instructions to convert them using 0.2.24.
Drawings do not change: on the 154-part corpus (157 pages) and on 10 saved example Specs
migrated from /1 and /2, the PDF pages are pixel-identical to 0.2.14 and report the same
problems. plan costs about 0.35% more instructions.
Changed
- Automatic feature and hole-pattern IDs use
f:<kind>:f<lowest face>, with local
suffixes only on a shared lowest face. Ladder IDs use supporting or level plane
faces; coordinate names remain only where the analysis has no face evidence. draftwright.analysis/8records the faces that support each level and step riser,
an optionallegacy_idon features and hole patterns, and apresentation_order
that keeps the drawing order when IDs are renamed.draftwright.spec/3, with exact migration of /1 and /2 Specs (compatibility is
explained above).- Opening a rank-keyed spec/1 or spec/2 with an analysis older than /8 is refused:
re-analyse the STEP with a current engine and reopen the original saved Spec.
Added
- Plans and session/browser
openSpecreplies exposemigrated: [{path, from, to}]
andids: {old: new}.idslists every old-to-new rename for this part, not only the
keys this Spec used. - The informational
id_not_migratedproblem identifies saved ID keys without an
exact current mapping. Those unmapped keys are retained; colliding renamed keys
are refused.
Fixed
- With a pinned isometric view, the hole schedule is no longer dropped or crowded by
nearby annotations.
0.2.14
Still on quiddity-rust 0.4.9. An explicit paper and scale pair is kept by moving an
overflowing view row into free space on the sheet; the title-block tolerance fix no longer pins
the paper, scale or layout; and a bracketed reference dimension is no longer flagged for rounding.
Existing drawings change only where a paper and scale pair was set and a view row overflowed:
in the corpus, three CTC-01 variants lose an off-sheet annotation and a page-fit warning, and
two of them also lose two GD&T-moved reports because datums B and C now stay put.
Callers that apply fixes see one change: the title-block tolerance fix is now a single local
set sheet/title/tolerance op, where it used to also pin the paper, scale and layout.
Fixed
-
Translate overflowing projection rows into vacant same-sheet space at an
explicit paper/scale pair, keeping unrelated rows and controls fixed. Preserve
authored placements, routes and scale; CTC-01 keeps A3 1:5 and its placed 510
dimension without a page-fit warning or scale-change fix (#331). Retain existing
carriers when the finished assembly cannot fit at the requested pair. -
Keep the general-tolerance remedy local to the title block, without pinning paper, scale
or layout. Honour deliberate reference precision, including bracketed mm and inch labels
(#299).
0.2.13
Now on quiddity v0.4.9 from crates.io (was 0.4.8 from a git tag). This release makes
drawings easier to steer from the Spec: broken views, sections through named features,
per-part manufacturing process, and clearer reports when one edit moves something else.
Existing drawings change in three ways:
- Hole-table tags are renumbered in reading order (17 corpus drawings; only tags and row order change).
- Keyway and pocket depths read
3 DEEPinstead of3 MAX DEEP. - Better recognition of circular blind steps changes
mfcadpp_holdout/363.step.
Refer to holes by tag_id or key, not by the printed tag.
The optimised browser build is about 21.3 MB, under its 23.3 MB budget.
Added
- Broken views (
views/<id>/break): a long principal view can be shortened with ISO 128
zig-zag break lines. Dimensions keep their true values. Break gaps are in paper millimetres.
Breaks that conflict with view alignment, or that would remove a dimension's anchor, warn
(break_not_applied,break_anchor_removed) (#315). - Sections through a named feature (
views/sections: [{id, through}]), showing a pocket's
width, length and depth (#304). An explicitviews/section_aarequest can now cut through
plain through holes (#314). Requested sections are counted when the sheet is chosen. An
unmet request keeps the automatic section and gives a specific warning. - Per-part manufacturing process (top-level
process), from the Spec, a STEP user-defined
attribute or the material class. The drawing states only what is known. Process tolerance
and finish defaults never override authored PMI. The GA drawing gains a Process column when
any part has one; bought parts and guesses are left blank.pack.csvgainsprocessand
process_sourcecolumns. - Select a part in the Spec by persistent key or numeric index (top-level
part) (#324).
Conflicting command-line and Spec selections are refused, and session opens honour the
Spec's part. - Hole plan records gain
tag_id, a stable identity for a hole-table tag, and
label_box_before(#322). gdt_position_changedwarning: when a dimension edit moves a datum or control frame by
more than 0.01 mm on paper, the warning names the cause where it can (#330).placement_displacedreports where an explicit dimension placement was moved to fit, with
the final side, lane and position (#325).dimension_witness_detachederror, when a dimension's witness line does not reach its feature.- Every automatic decision's plan entry names the Spec field that overrides it, or says why
none exists (#309).
Changed
- Hole-table tags are numbered in reading order (row, then column, from the origin) after
layout. Hole identities, leader routes and sheet size don't change. A table keeps its old
numbering, with an info finding, when new labels would collide (#322). - Pocket and keyway depths say
DEEP, with the depth measured either to the tangent or to
the far side of the floor, which the Spec can choose (dimensions/<id>/presentation) (#305). - Lint credits a location only when the drawing shows it. A bolt circle on the axis of the
round outline counts as located when the true-shape view draws the outline, the pitch circle
and their common centre. A reference-only dimension, or table credit taken from another
feature, no longer locates a hole. A slot's transverse location can be taken from either
edge (#310, #316, #319). Across the corpus,duplicate_measurementfindings fall and
slot_requirement_missingfindings rise slightly. - Spec validation keeps what the author asked for (#308): duplicate measurements, layout that
can't be honoured and stale edits warn. Axis origins and Cartesian note
roles are accepted. ISO 286 fit classes print even without the optional deviation table.
Contradictory repeated requirements or fits on the same location, pitch or station network
are refused. - Required lengths stay alongside reference dimensions (#317). Pattern notes attach in the
circle's plan view (#312), authored dimension views are kept (#303), and slot-centre
references are accepted (#320). Centred keyways no longer get a tangent location (#302),
and feature notes no longer add tangent locations to unrelated bores on the same axis (#311). - Linear repair offers no longer include
lane: 0, along: outside. - Single-part Analyses omit
part_keys. MCP error schemas include the Specpath.
Fixed
- Packs merge identical parts that are pure translations of each other, such as bolts
exported as separate products ("M3×8 hex bolt #1" … "#4"). The face-by-face proof still
decides each merge, and the trailing " #n" is dropped from the shared display name (#351). - An explicit hole table is kept by rearranging the views around another table shape before
it is withdrawn. An unmet request names what blocked it (#321). - Explicit dimension lanes reserve their printed space before views are placed, and pinned
dimensions move with their view. When the requested dimensions cannot fit, the finding
names the sheet edge they exceed (#296). - Datums and control frames keep their positions when unrelated dimension placements are edited (#330).
- Automatic sheet selection checks the finished drawing, including centre lines, so a sheet it
accepts cannot end up with ink off the sheet. - Keyway depth callouts attach to the keyway floor in sections.
Dependencies
- quiddity and haecceity 0.4.9 from crates.io (
=0.4.9), with quiddity's command-line
feature turned off for library and browser builds. PMI reading is unchanged. Recognition now
keeps circular blind steps cut by another feature:mfcadpp_holdout/363.stepgains an
R4.550 × 3.359 DEEP callout in place of a bare profile radius and a redundant step height.
0.2.12
Now on quiddity v0.4.8 (was 0.4.7).
This release moves Draftwright onto quiddity 0.4.8 and rebuilds its command line on clap, with shell completion. Draftwright's planning and rendering code is unchanged.
Changed
- quiddity 0.4.8 (#348):
- The PMI reader no longer reports a face-less shape aspect for a default saved view.
- Files with a default saved view lose that info-level
pmi_not_extractedfinding, including the Notes view quiddity 0.4.8 writes, and NIST STC-06 and STC-10. - Draftwright reads PMI but doesn't write it. The Notes view itself comes from quiddity's PMI writer, used by Specify and the quiddity CLI.
- Command line on clap (#347):
- Commands, flags, defaults, exit codes and the JSON errors for bad values are unchanged.
- Help and usage errors come from clap. A missing argument, a missing
-o, or an unknown command or flag is reported on stderr, still with exit 2, instead of as a JSONinvaliderror on stdout.--helpworks on each command. - Usage that was silently ignored is now refused as a usage error:
- a flag the command doesn't take, such as
-oonplan; - an extra positional argument;
- a trailing flag with no value.
- a flag the command doesn't take, such as
plan --analysis A STEPnow checks the analysis against that STEP instead of ignoring it.- A positional argument may follow the flags. When a flag is repeated, the last value wins; it was the first.
- The WASM package is built without the command line, so clap stays out of the browser build.
Added
draftwright completions SHELLprints a completion script for bash, zsh, fish, powershell or elvish. The README gives the install one-liners.
Notes
- Release build: a release can now be rebuilt for an existing tag through the workflow's manual trigger. The WASM release job builds the native binary that its parity test needs (#346).
Kernel note: draftwright-rust uses haecceity: tag v0.4.8; quiddity: tag v0.4.8; pzfreo/specify-core-rust v0.1.12 uses haecceity: tag v0.4.7; quiddity: tag v0.4.7. Different quiddity pins may change STEP face numbering.
0.2.11
Still on quiddity v0.4.7, as in 0.2.10.
This release brings drawing packs to the browser and the native service, and reads bill-of-materials data from the STEP. It chooses the largest readable scale on the smallest sheet that fits, never moving a drawing to bigger paper, and it closes several gaps that agents hit when steering drawings.
Added
- Drawing packs in WASM and the native service (#342):
- WASM adds a
Packclass: build from STEP bytes and an optional pack Spec; report and Spec JSON;pageCountand one-based page SVG; PDF; CSV; a transactionalsetSpec; andfree. It also addslistParts(name, bytes). Build packs in a Worker, since v1 has no progress callback. ExistingEngineAPIs are unchanged. - The native JSON-lines service adds a
packoperation, which returns the report and base64 files. - The MCP server gains a
packtool. By default it returns one compact report and summary (67 KB on a real 9-page assembly, against 1.64 MB with every format inline). Other formats are exported only when asked for, as resource links, and duplicate formats are refused.
- WASM adds a
- BOM data read from the STEP (#267):
- The pack reads part number, name, description, revision, make/buy, categories and material from the file's PDM data, and Specify's
specify bomanswers (make/buy, part number, description, revision, item number, optional, stock). - Precedence: the pack Spec, then the file, then draftwright's guess. Each value records its source:
spec,file,suggestedorguess. - Exporter ids such as "SOLID" or "Open CASCADE STEP translator" never reach DWG NO, REFERENCE or the GA title.
- MATERIAL is filled from the file. The CSV and JSON gain description, material, part number, revision, an optional-quantity range, stock, the raw
product_idsand each value's source. - Duplicate find numbers in a file raise
pack_duplicate_item. - On a Specify-written assembly,
pmi_not_extractedfindings go from 242 to 18, because the BOM properties count as metadata.
- The pack reads part number, name, description, revision, make/buy, categories and material from the file's PDM data, and Specify's
- For agents (#298, #323, #297, #313):
draftwright --helpand--versionwork.- The CLI exposes
spec_schemaanditem_options.serverefuses anitem_optionsrequest without a nestedargumentsobject. - Plan records carry
callout_offsetfor callouts. - Axis-reference errors give a copyable
axis:face:v1:…example. - Reference records add feature membership, stock-side roles, and face and edge boundary links. Reference ids are unchanged; analysis JSON is about 3% larger.
- An authored
⌀renders with the bundled glyph instead of a missing-glyph box. - Release archives now include
draftwright-mcp,schemas/, anddocs/model.md,docs/mcp.mdanddocs/rules/.
Changed
- Scale choice (#318, #331, #295):
- On the smallest sheet that fits, draftwright chooses the largest preferred scale that lays out cleanly and legibly. It judges the finished views, not the space reserved for them.
- A scale smaller than the automatic choice is refused if a dimensioned hole, boss or slot would be under 1.5 mm on paper, or if two callouts or frames would end within 1 mm of a feature under 8 mm on paper.
- Cosmetic leader-on-extension contacts alone never choose the paper.
- An authored sheet or scale is never overridden.
- Duplicate dimensions (K6, #294): an authored dimension that locates one feature is accepted even when its span matches another feature's location. A real duplicate on the same feature is still refused. A face reference that resolves to more than one feature is refused as ambiguous, naming the candidate
axis:f:keys. - Completeness review (#301, #307 step 1): printed one-axis chains of dimensions now count as locating a feature without PMI. For example, a start of 40 plus a length of 40 locates a keyway centre at 60. Only the review changes; the drawings are the same.
Notes
-
Drawings that change: seven corpus drawings change, and none moves to bigger paper. Three get a larger scale on the same A4. Four move from A3 to A4, at a smaller scale or, for grm04, the same one.
Drawing 0.2.10 0.2.11 10146 A4 1:1 A4 2:1 assembly pack-nested A4 1:1 A4 2:1 pad-x-positive A4 1:1 A4 2:1 turned-step-repeated-lengths A3 5:1 A4 2:1 u_channel and u_channel_asymmetric A3 2:1 A4 1:1 grm04 drive plate A3 5:1 A4 5:1 10224 stays at A3 2:1. A4 1:2 would make it too small to read.
-
Speed: planning is about 5.6% slower, because of the wider scale search. Interactive edits are faster: a tolerance edit goes from 123 ms to 14 ms.
-
Tests: a new steerability suite has one case per steering issue (#293–#331). 38 cases each pass or fail as expected.
Kernel note: draftwright-rust and pzfreo/specify-core-rust v0.1.11 both use haecceity and quiddity at tag v0.4.7.