Skip to content

0.6.0

Choose a tag to compare

@pzfreo pzfreo released this 17 Nov 01:03
91cef5a

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 TOLERANCE entities, callouts are MULTILEADERs and tables are ACAD_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_axis turns 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 draftwright gives the draftwright and draftwright-mcp commands 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.