Skip to content

feat(objects): decode five small classes from AutoCAD's own DWG and DXF output (#152) - #326

Merged
DrunkOnJava merged 14 commits into
mainfrom
feat/unp-small
Oct 28, 2026
Merged

DrunkOnJava merged 14 commits into
mainfrom
feat/unp-small

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

Stacked on #325: this branch contains #325's commit (MATERIAL) and lands after it; its own change is the single commit on top.

Decodes five small custom classes ODA spec v5.4.1 never prints, on every release from R14 to R2018: WIPEOUTVARIABLES, ACDB_DYNAMICBLOCKPURGEPREVENTER_VERSION, ACDB_BLOCKREPRESENTATION_DATA, PDFDEFINITION and DBCOLOR. The layouts are derived by the CLEANROOM.md method of 2026-10-26 from the data bits of AutoCAD-written drawings against AutoCAD's own DXF export of the same handles.

Spec reference

None: §20.4 has no entry for any of them, so there is no docs/data/spec-coverage.tsv row; the class row in docs/spec-coverage.md ("Classes the spec does not prescribe") is added as closes. Layouts and evidence: ARCHITECTURE.md §7t (provisional letter). Per-class record: CLEANROOM.md (2026-10-26).

Evidence (probe_wipeout_variables, probe_purge_preventer, probe_block_representation, probe_pdf_definition, probe_dbcolor, each over ../dwg-corpus, all exit 0):

Class Records Close Values compared Differ
WIPEOUTVARIABLES 7 7 6 0
ACDB_DYNAMICBLOCKPURGEPREVENTER_VERSION 7 7 6 0
ACDB_BLOCKREPRESENTATION_DATA 14 14 12 0
PDFDEFINITION 7 7 12 0
DBCOLOR 7 7 14 0
Total 42 42 50 0

One record per release for each class (two for the block representation), R14 to R2018; R14 has no DXF twin and R2000's DXF carries none of DBCOLOR's groups, so those records are held to their boundary alone. Corpus baseline, relative to #325's head: decoded +42, skipped -42, errored 0 (measure.py check passes on this head). Unverified by value: the leading BS of the R2004+ DBCOLOR (reads 0, group 62 says 42), the R14 and R2000 DBCOLOR index, and the width of every integer beyond the one value it holds; a wider BS form and a DBCOLOR flag above 3 are refused as Error::Unsupported.

Test plan

  • cargo fmt --all -- --check, cargo clippy --all-targets --all-features -- -D warnings, RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features, cargo test --release --all-features pass locally
  • Shown working on real files: the five probes over the 52 pinned drawings (42 records, 50 values against the DXF twins, 0 differ)
  • python3 tools/ci/spec_coverage.py --check passes
  • No new unit tests. Tests touched: none. examples/support/twin.rs is byte-identical to the objects lane's copy (md5 f4c195ca).

Source-provenance declaration

By submitting this PR I certify that my contribution does not incorporate executable code from any source whose license is incompatible with Apache-2.0. Specifically:

  • No Autodesk DWG SDK source (RealDWG, ObjectARX, ObjectDBX) or NDA-protected Autodesk documentation was consulted or imported.
  • No Open Design Alliance Teigha / Drawings SDK source was consulted or imported.
  • No GPL-licensed DWG implementation source (LibreDWG, etc.) was consulted or imported.

My contribution is based on AutoCAD's own output, by the method recorded in CLEANROOM.md (2026-10-26): AutoCAD-written DWG files compared with AutoCAD-written DXF exports of the same drawing, from the pinned public corpus (ACadSharp samples/sample_base; data files only). No third-party DWG or DXF implementation was consulted, ACadSharp's and ezdxf's reading code, comments, tests and derived data included. No vocabulary beyond the DXF group codes in the twins was used.

Developer Certificate of Origin

I affirm that the contribution is my own work and can be distributed under the project's Apache-2.0 license.

…49, #152)

ODA spec v5.4.1 prints no MATERIAL layout. The field list is derived by the
CLEANROOM.md method of 2026-10-26: the data bits of all 212 corpus records
(R14 to R2018) against the AcDbMaterial AutoCAD exported to DXF for the same
handle. Every record closes on its data-stream boundary on every release, from
R2007 on a string stream the list consumes entirely, and 13,058 values equal
the DXF twin by handle with 0 differences. Fields no DXF group shows are named
unknown_* and listed in ARCHITECTURE.md section 7s.

probe_material becomes the twin probe over the shared harness
(examples/support/twin.rs, identical to the objects lane's copy). The strings-only
read_strings and its tests are kept untouched. Baseline: decoded +212,
skipped -212, errored 0.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T02:05:30.353413Z b82aa0e New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…XF output (#152)

WIPEOUTVARIABLES, ACDB_DYNAMICBLOCKPURGEPREVENTER_VERSION,
ACDB_BLOCKREPRESENTATION_DATA, PDFDEFINITION and DBCOLOR have no spec layout.
Each is derived by the CLEANROOM.md method of 2026-10-26 from the data bits of
the 42 corpus records (R14 to R2018) against the DXF object of the same handle.
All close on every release, from R2007 on a fully consumed string stream, and 50
values equal the DXF twin with 0 differences. DBCOLOR from R2004 reads the colour
word (group 420 and xdata 1071), name and book; its leading BS is unverified.
One probe per class over the shared twin harness. Baseline: decoded +42,
skipped -42, errored 0.
@DrunkOnJava DrunkOnJava added type:feature New capability, including a spec section not yet implemented area:objects Common object formats and non-graphical objects (§20.1 to §20.3, §20.4 objects, §28) labels Oct 28, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 09f0dbcde0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/entities/dispatch.rs Resolved
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 28, 2026 02:10
@DrunkOnJava
DrunkOnJava merged commit ff36b18 into main Oct 28, 2026
26 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/unp-small branch October 28, 2026 02:21
DrunkOnJava added a commit that referenced this pull request Oct 28, 2026
…s baseline (#421)

land.sh settled a baseline review thread only when its title asked to regenerate or re-measure
the corpus baseline. On #326 Codex titled the same request "Commit the corpus baseline for the
newly decoded classes", so the train stopped on it with Corpus green. The title may now ask to
regenerate, re-measure, commit, update or refresh it; the thread must still be the Codex bot's,
name tools/corpus/baseline.tsv and not mention the oracle. ci_baseline.sh refuses any count worse
than main's before committing, so a green Corpus job on the train's head also rules out a
baseline that hides a regression.
DrunkOnJava added a commit that referenced this pull request Oct 28, 2026
…till skipped (#424)

CHANGELOG gains the table objects (#313, #316, #317, #319), the nineteen classes derived from
AutoCAD's output (#326 to #341), the DIMENSION scorer (#387), the BLOCK fixtures (#407), the
maintainer tools (#406, #383) and the merge train's stack handling (#421 to #423). README said every
skipped type had a decoder in review; only SHAPE (#310) and the VIEWPORT entity header (#311) do,
and the rest are twelve custom classes in the BookViewerApp3 drawings with no DXF export yet, now
named. STATUS's pending section says its counts are the 2026-08-30 snapshot.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:objects Common object formats and non-graphical objects (§20.1 to §20.3, §20.4 objects, §28) type:feature New capability, including a spec section not yet implemented

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant