Merge pull request #1633 from KnottyDyes/squad/docs-dxf-dwg-write-version

Docs: describe DXF and DWG save-version selection
This commit is contained in:
FredApps authored and GitHub committed 2026-11-26 15:12:38 +01:00
commit a3ed0682ab
4 files changed
+55 -13

No files matched your search

+10 -4
View File
@@ -89,9 +89,15 @@
line, prompts with clickable `[Keywords]`, AutoComplete, object snaps, polar tracking, ortho,
direct distance entry, window and crossing selection, grips, and right-click-to-repeat behave
the way decades of drafting habit expect.
- **Open files.** DXF is read and written natively (ASCII and binary, R12 through 2018), and DWG
files (R13 through 2018) open and save through the open-source acadrust library. Export to SVG
and PNG today.
- **Open files.** DXF is read natively (R12 through 2018, with binary support from R13) and
written as 2000 through 2018 (ASCII and binary). DWG files (R13 through 2018; R13 and R14
untested, 2018 tested only on synthetic files) open through the open-source acadrust library
and save as 2000 through 2018. New drawings default to
2018 (AC1032) in both formats. In the app's Save dialog, File ▸ Default Save Format
(also Options ▸ Open and Save, `saveVersion`, default 2018) sets the version for untitled
drawings; drawings with a file keep their own version, subject to supported-version mapping
and the DWG minimum. SAVEAS `version` overrides this choice and is remembered for later
saves. Export to SVG and PNG today.
- **Fast and native.** Pure Rust and egui, no Electron, no web view. One binary on macOS
(universal), Windows, Linux and FreeBSD, plus a WebAssembly build for the browser.
- **Built for agents.** Every menu item, tool and prompt is a command. Agents can type at the
@@ -114,7 +120,7 @@ numbers):
| Layers & properties | Layers palette and Layer Properties Manager (on/off, freeze, lock, plot, colour, linetype), layer tools (isolate, freeze, off, lock, match, previous), Properties palette with per-object editing, linetypes, lineweights, colour index and true colour |
| Annotation | All DIM* commands with full DIMSTYLE variables, overrides and every arrowhead, associative dimensions that follow geometry, MLEADER, TABLE, TrueType fonts (`.ttf`, `.otf`, `.ttc` collections), MTEXT formatting codes (fonts, heights, colours, stacked fractions), our own single-stroke drafting font |
| Hatch & blocks | Pick-point hatch boundaries with islands, pattern, solid and gradient fills from our own pattern library, BLOCK/INSERT, attributes and nested blocks |
| Files | DXF read (R12–2018, ASCII and binary) and write (R2000), including dimension styles, associativity, tables and constraints; DWG read (via the acadrust library) and write (R2000); PDF plotting, SVG and PNG export. Entities CADCraft doesn't model yet are not kept on save: see [file-format parity](docs/file-format-parity.md) |
| Files | DXF read (R12–2018, binary from R13) and write (2000–2018, ASCII and binary), including dimension styles, associativity, tables and constraints; DWG read (via the acadrust library; R13 and R14 untested, 2018 tested only on synthetic files) and write (2000–2018). New drawings save as 2018 (AC1032); opened drawings keep their supported version, except DWG defaults to at least 2004. In the app's Save dialog, File ▸ Default Save Format (also Options ▸ Open and Save, `saveVersion`, default 2018) sets the version for untitled drawings; drawings with a file keep their own version, subject to supported-version mapping and the DWG minimum. SAVEAS `version` overrides this choice and is remembered for later saves. DXF uses R2000 structure with the chosen `$ACADVER`. PDF plotting, SVG and PNG export. Entities CADCraft doesn't model yet are not kept on save: see [file-format parity](docs/file-format-parity.md) for version selection and fidelity |
| Layouts & plotting | Paper-space layouts, viewports (scale, lock, per-viewport layer freeze), MSPACE/PSPACE through viewports, page setups, PLOT and EXPORTPDF |
| Parametric | Geometric and dimensional constraints, AUTOCONSTRAIN, PARAMETERS with expressions, conflict detection; constraints re-solve after every edit |
| Grips | Hot grips with Space to cycle Stretch, Move, Rotate, Scale and Mirror |
+14 -3
View File
@@ -1,6 +1,6 @@
# CADCraft architecture
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-10 · **Change:** major (first committed architecture doc, written from the code on main at bd2412f) · **Target:** Autodesk AutoCAD 2027
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-18 · **Change:** minor (DXF/DWG save-version documentation corrected) · **Target:** Autodesk AutoCAD 2027
How CADCraft is built today. This describes the code on `main`, not plans; plans live in
[roadmap.md](roadmap.md). Agents: the rules that keep this shape (layering, never-crash,
@@ -64,8 +64,18 @@ SVG and plot preview reuse the same display list through the CPU rasteriser or v
## Files
DXF is the native path: `dxf` parses tags, `io::dxf_read` maps them to the document, and
`io::dxf_write` writes an R2000 (AC1015) DXF. DWG is converted to DXF in memory by shared `craft-dwg` and
read through the same path; saving DWG writes our DXF and converts it back. CADCraft-only data
`io::dxf_write` uses R2000 DXF structure with the chosen version's `$ACADVER` (2000–2018),
version-specific groups and UTF-8 text from 2007. New drawings default to 2018 (AC1032).
In the app's Save dialog, File ▸ Default Save Format (also Options ▸ Open and Save,
`saveVersion`, default 2018) sets the version for untitled drawings; drawings with a file keep
their own version, subject to supported-version mapping and the DWG minimum. SAVEAS `version`
overrides this choice and is remembered for later saves.
Without an explicit save version, `io::save_version` uses the drawing's `$ACADVER`, keeping
supported versions, mapping older files to 2000 and newer files to 2018 (missing or invalid
codes also default to 2018). DWG is converted to DXF in memory by shared `craft-dwg` and read through
the same path; saving DWG converts an internal R2000 DXF to the chosen DWG version, not
necessarily R2000. DWG defaults to at least 2004 to retain true colours, transparency, table
styles and gradients; an explicit save version can still request 2000. CADCraft-only data
(constraints, associativity details, table flags) travels in xdata under our own application
name. Detail and gaps: [file-format-parity.md](file-format-parity.md).
@@ -91,4 +101,5 @@ allocations are capped (DXF tag counts, DWG size limits, hatch segment and islan
| Date | Change | Summary |
|---|---|---|
| 2026-10-18 | minor | Clarify 2018 defaults, opened-drawing version selection, the DWG 2004 minimum unless explicitly overridden, and R2000 DXF structure versus output version |
| 2026-10-10 | major | First committed architecture doc, measured from the code (crate sizes, entity kinds, command counts) |
+21 -3
View File
@@ -31,9 +31,12 @@ below, and ≈ 20–40 h for 3D exchange formats that wait for 3D modelling.
AutoCAD 2027 opens every DWG version from R2.0 onward and saves 2018 (AC1032, still the current
DWG format), 2013, 2010, 2007, 2004, 2000 and R14. CADCraft reads DWG by converting it to DXF
with the `acadrust` 0.6.6 crate (failsafe mode since 0.6.4: an object record it can't decode is left out and a note says so, #859; if the file's header or section map can't be read, or it isn't a DWG, the file is rejected) and reading that DXF; it saves by writing its own R2000 DXF and
converting it to a DWG of the chosen version (#421): SAVEAS `version`, else the drawing's own
version (the file's `$ACADVER`, 2018 for a new drawing), at least 2004 unless 2000 is asked for.
with the `acadrust` 0.6.6 crate (failsafe mode since 0.6.4: an object record it can't decode is left out and a note says so, #859; if the file's header or section map can't be read, or it isn't a DWG, the file is rejected) and reading that DXF; saving uses an internal R2000 DXF as a
bridge, not as the output DWG version. The bridge converts it to the chosen DWG version
(2000/2004/2007/2010/2013/2018, #421): SAVEAS `version`, else the drawing's own version as
selected below, at least 2004 unless 2000 is explicitly asked for. New drawings therefore
save as 2018 (AC1032), not R2000. The 2004 minimum retains true colours, transparency,
table styles and gradients that R2000 DWG cannot represent.
The bridge repairs two acadrust gaps in 2010+ DWG (measured with 0.6.3): merged table cells and table-style
title/header suppression.
@@ -60,6 +63,20 @@ on read with a note, so such files no longer exceed the DXF limit (#1482). **DWG
## DXF, version by version
New drawings have `$ACADVER` AC1032 (`crates/doc/src/header.rs`) and default to 2018 DXF
and DWG. Without an explicit save version, `io::save_version` keeps an opened drawing's
`$ACADVER` when supported; older versions map to 2000, newer versions to 2018, and a missing
or invalid code defaults to 2018 (`crates/io/src/lib.rs`, `crates/dxf/src/version.rs`). DWG
uses the version carried through its DXF read bridge, with the 2004 minimum described above.
In the app's Save dialog, File ▸ Default Save Format (also Options ▸ Open and Save,
`saveVersion`, default 2018) sets the version for untitled drawings; drawings with a file keep
their own version, subject to supported-version mapping and the DWG minimum.
CLI, script and engine SAVEAS/QSAVE JSON saves do not read this UI preference; MCP honours it only when
driving the app's Save dialog.
SAVEAS `version` overrides this choice and remembers it for later saves. DXF output uses
R2000 structure with the selected `$ACADVER`, version-specific groups and UTF-8 text from
2007; that structure does not mean every saved file declares AC1015.
| DXF version | AutoCAD 2027 | CADCraft read | CADCraft write |
|---|---|---|---|
| R12 (AC1009), ASCII | read, write | yes: no version gating; old-style POLYLINE/VERTEX read (polyface meshes flattened to 3D polylines) | **no** |
@@ -144,6 +161,7 @@ our output in AutoCAD black-box.
| 2026-10-29 | minor | R2000 DXF: CLASS records written without group 91 (instance count), which came with the 2004 format; AutoCAD LT 2026 stopped responding on every R2000 DXF CADCraft saved (checked black-box in AutoCAD LT 2026) |
| 2026-10-26 | minor | CC-046: ATTEDIT and -ATTEDIT value changes invalidate derived justified baselines before DXF/DWG export; preserve alignment anchors, unchanged values and Aligned/Fit endpoints. Review follow-up: baseline recomputation preserves insertion elevation independently of alignment elevation. The shared writer correction also applies to justified TEXT. Independent of attribute editor UI; reverting the follow-up restores elevation loss on recomputation, while reverting the value setter restores stale XY baselines. |
| 2026-10-25 | minor | LAYOUT SAveas (`layout.saveas`) writes a layout as a drawing template: its page setup and paper space objects, no model space objects or other layouts, and only the named objects they use |
| 2026-10-25 | minor | Clarify default 2018 (AC1032) saves, opened-drawing version selection, explicit overrides and the DWG 2004 minimum; distinguish R2000 DXF structure and the internal DWG bridge from output versions |
| 2026-10-24 | minor | Re-audit against main 41d9b5e95: acadrust 0.6.5, ACIS data, dynamic block, SCRIPT and SHX rows, io test count |
| 2026-10-22 | minor | DXF/DWG save: angular, diametric and radial dimensions get standard DIMASSOC objects (one centre reference to the circle for radial/diametric, the definition points for angular), so AutoCAD follows their geometry; the standard objects of those kinds are read back too, without CADCraft's xdata (#1651) |
| 2026-10-19 | minor | DXF/DWG save: angular dimension block text honors DIMDSEP, including per-dimension overrides (#1646) |
+10 -3
View File
@@ -197,11 +197,17 @@ tail factor for verification against AutoCAD.
**Why the total went up.** The 2026-10-07 roadmap put full parity at ≈ 29% with ≈ 570 h left,
from agent-reported milestone percentages. This pass audited behaviour instead of presence and
found new evidence: object snap tracking, extension, parallel and apparent snaps are toggles;
dynamic input is read-only; saves drop every entity the reader doesn't model; DWG always saves as
R2000; tolerances are absolute; and the old estimate had no rows for localization, ecosystem,
platforms, stability or AI. The weighted figure rose (29% → 41% features) because breadth and
dynamic input is read-only; saves drop every entity the reader doesn't model; DWG saves were
limited to R2000 (since #421, 2000–2018 with 2018 for new drawings; see
[file formats](file-format-parity.md)); tolerances are absolute; and the old estimate had no
rows for localization, ecosystem, platforms, stability or AI. The weighted figure rose
(29% → 41% features) because breadth and
depth both grew since 2026-10-07 and the weights are now written down; the hours rose because
the remaining work is depth and 3D.
In the app's Save dialog, File ▸ Default Save Format (also Options ▸ Open and Save,
`saveVersion`, default 2018) sets the version for untitled drawings; drawings with a file keep
their own version, subject to supported-version mapping and the DWG minimum. SAVEAS `version`
overrides this choice and is remembered for later saves.
**Parallelism.** About 70% of the work splits across 4–6 agents by area (each feature area,
file formats, UI precision, localization per language), so elapsed time is roughly a quarter of
@@ -224,6 +230,7 @@ DWG/DXF corpus (files from people who own them); black-box checks in AutoCAD of
|---|---|---|
| 2026-11-26 | minor | Leaders, tables, fields row: QLEADER at the command line, without its Settings dialog (#2740, #3532); parity percentages and hours not re-measured |
| 2026-10-27 | minor | Blocks, attributes, xrefs, groups row: XCLIP and XCLIPFRAME clip block and xref references; parity percentages and hours not re-measured |
| 2026-10-25 | minor | Mark the R2000-only DWG save limitation as historical and link current version-selection rules; percentages and hours not re-measured |
| 2026-10-24 | minor | Re-audit against main 41d9b5e95: evidence text of the feature, stability, platforms and localization rows refreshed against main 41d9b5e95; percentages, hours and breadth counts (245/491, 233/491) not re-measured |
| 2026-10-24 | minor | Inquiry and utilities row: COMPAREEXPORT exports a comparison to a new drawing; parity percentages and hours not re-measured |
| 2026-10-22 | minor | Draw row: RECTANG gained a centre construction mode (`Center` keyword, `center: true`) beside its corner mode (#1127); parity percentages and hours not re-measured |