Skip to content

feat(objects): decode TABLEGEOMETRY from §20.4.103 (#151) - #316

Merged
DrunkOnJava merged 14 commits into
mainfrom
obj/table-geometry
Oct 28, 2026
Merged

DrunkOnJava merged 14 commits into
mainfrom
obj/table-geometry

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

Stacked on #313, which is stacked on #303 (it targets main, so the diff includes both until they land). Decode TABLEGEOMETRY (§20.4.103): the laid-out geometry of a table, BL row, column and cell counts then per cell a flag, two sizes, a content count and per content two 3BD distances, four BD and a last unknown. It had no decoder, so all 14 corpus records were skipped.

Spec reference

§20.4.103 TABLEGEOMETRY (tracking #151). The field list closes as printed. The last value is typed BD in the spec and BL in the DXF (group 95); both are the same two bits at 0, which every record holds, so it is read as BL. The cells' unknown handle is in the handle stream and is not read.

Test plan

  • cargo fmt --all -- --check and cargo clippy --all-targets --all-features -- -D warnings pass on this branch. cargo test, cargo doc and the 1.85 MSRV check run once on a merge of this lane's open branches instead of per branch (the machine is at memory pressure red); the result goes in a comment.

  • Shown on real files, no new unit tests: cargo run --release --example probe_tablegeometry -- <corpus> over the 52 pinned drawings. It closes on the boundary and compares every decoded value with AutoCAD's DXF export, walking the groups in the order the spec prints the fields.

    Release Records Close Values compared with the DXF Differ
    R14 2 2 no twin (boundary only)
    R2000 to R2018 (6 releases) 12 12 3462 (577 each) 0

    The first table's objects have the same handles in the DWG and the DXF. The second table's were created while saving and have other handles in the DXF, so a DWG record that finds no DXF record of its handle is paired with the next unpaired DXF record of the type, in file order (Pairing::HandleThenOrder in examples/support/twin.rs).

  • Corpus baseline regenerated: decoded +14, skipped -14, errored unchanged (7 rows).

  • Tests touched: none. examples/probe_tablegeometry.rs and the harness addition are examples, not tests.

  • The DXF oracle does not score TABLEGEOMETRY yet.

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. The ODA's public Open Design Specification for .dwg files PDF (v5.4.1, sha256 973628f3…f504b) is explicitly allowed (see CLEANROOM.md).
  • No GPL-licensed DWG implementation source (LibreDWG, etc.) was consulted or imported.

My contribution is based on:

  • The ODA's freely-redistributable Open Design Specification for .dwg files (v5.4.1);
  • The corpus bytes and AutoCAD's own DXF exports of the pinned drawings (the oracle);
  • No reading of comments or code in any other project.

Developer Certificate of Origin

By submitting this PR, I certify that the contribution complies with the Developer Certificate of Origin 1.1.

§20.4.101 prints TABLESTYLE; the notes that declined it said §20.4 had no
entry. Its until-R21 layout closes on its data-stream boundary on all 32
records of R14 to R2007 in the public corpus, and against AutoCAD's DXF
export all 1896 values of the 24 R2000 to R2007 records equal it.

Two readings come from the bits, not the spec's table: the data type, unit
type and format string are R2007+ together, and every colour is the 44-bit
TC on R2000 and R14 too. R2010 and later use §20.4.101.2's layout and stay
Unhandled.
@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-28T00:55:23.125215Z 97d51a4 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.

….4.101.2 and §20.4.102 (#151)

Both objects are sequences of cell styles (§20.4.101.4, with the content
format of §20.4.101.3 inside), read by one shared reader. All 20 TABLESTYLE
records of R2010 to R2018 and all 32 CELLSTYLEMAP records of R14 to R2007
close on their data-stream boundary.

Against AutoCAD's DXF export every value of the 24 CELLSTYLEMAP records with
a twin equals it (7080) and so does every value of the cell styles of the 20
R2010+ TABLESTYLE records, compared with the drawing's one CELLSTYLEMAP
object (5328); none differ. The spec's order of the repeated cell styles is
title, header, data, not data, title, header, and each is led by a BL equal to
its id; both are read from the bits.
The laid-out geometry of a table is a row, column and cell count, then per
cell a flag, two sizes, a content count and per content two distances and
five more numbers. It had no decoder, so all 14 records of the corpus (two
tables on each of R14 to R2018) were skipped; all 14 close on their
data-stream boundary.

Against AutoCAD's DXF export (R2000 to R2018) all 3462 values of the 12
records with a twin equal it. The second table's objects have other handles
in the DXF and are paired in file order.
Resolved against main's squash of #303 (the TABLESTYLE R14 to R2007 commit this
stack carried): its decoder, probe and section stay main's, and this branch's
R2010 TABLESTYLE, CELLSTYLEMAP and cell-style reader sit beside them.

- src and examples: both sides kept; dispatch and the objects table list the
  modern TABLESTYLE and CELLSTYLEMAP arms next to main's.
- ARCHITECTURE.md: main's sections plus this branch's R2010 section as 7au;
  the duplicate until-R2007 section is main's 7ad.
- README.md: main's. spec-coverage: this branch's newer TABLESTYLE and
  CELLSTYLEMAP rows, regenerated.
- tools/corpus/baseline.tsv: regenerated by measurement; against main's it is
  decoded +52, skipped -52 and nothing else.
Bring the #313 head, which already carries main, into this branch. The one
section this branch adds to ARCHITECTURE.md moves to 7av after #313's 7au, and
the spec-coverage page is regenerated. tools/corpus/baseline.tsv is main's; the
Corpus job measures the count change and the baseline is regenerated from its
artifact.
DrunkOnJava added a commit that referenced this pull request Oct 27, 2026
Bring the #316 head, which carries #313 and main, into this branch. The section
this branch adds to ARCHITECTURE.md moves to 7aw after #316's 7av, and the
spec-coverage page is regenerated. tools/corpus/baseline.tsv is main's; the
Corpus job measures the count change and the baseline is regenerated from its
artifact.
DrunkOnJava added a commit that referenced this pull request Oct 27, 2026
Bring the #317 head, which carries #316, #313 and main, into this branch. The
section this branch adds to ARCHITECTURE.md moves to 7ax after #317's 7aw, and
the spec-coverage page is regenerated. tools/corpus/baseline.tsv is main's; the
Corpus job measures the count change and the baseline is regenerated from its
artifact.

@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: 9dd3a503a8

ℹ️ 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
…tack (#151)

Regenerated with measure.py baseline from the corpus-measurement artifact of the
Corpus (public DWG) job on 9dd3a50. Against main: decoded +66, skipped -66,
errored and every other column unchanged (+52 from the TABLESTYLE R2010 and
CELLSTYLEMAP lane below, +14 TABLEGEOMETRY).
DrunkOnJava added a commit that referenced this pull request Oct 27, 2026
…seline

Brings in #316's regenerated baseline, then regenerates tools/corpus/baseline.tsv
with measure.py baseline from the corpus-measurement artifact of the Corpus
(public DWG) job on ee818e8. Against main: decoded +80, skipped -80, every other
column unchanged (+52 TABLESTYLE R2010 and CELLSTYLEMAP, +14 TABLEGEOMETRY,
+14 TABLECONTENT).
@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
Merged three-way against 6d9c59f, the #313 head this branch carried, so #313's
parts are main's squash (5545572) and this branch's TABLEGEOMETRY decoder, probe,
dispatch arm and spec-coverage row stay. Its ARCHITECTURE section is renumbered
7bd after main's 7bc. tools/corpus/baseline.tsv, tools/oracle/baseline.tsv,
README.md and STATUS.md are main's; the train regenerates them from CI.
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 28, 2026 01:02
@DrunkOnJava
DrunkOnJava merged commit ad5a042 into main Oct 28, 2026
26 checks passed
@DrunkOnJava
DrunkOnJava deleted the obj/table-geometry branch October 28, 2026 01:10
DrunkOnJava added a commit that referenced this pull request Oct 28, 2026
Merged three-way against 1f190eb, the #316 head this branch carried (the train's
later #316 commits were never merged here), so #313 and #316 are main's squashes
and this branch's TABLECONTENT decoder, probe, cell style walk, dispatch arm and
spec-coverage rows for §20.4.97 to §20.4.100 stay; §20.4.101 is main's row. Its
ARCHITECTURE section is renumbered 7be after main's 7bd. tools/corpus/baseline.tsv,
tools/oracle/baseline.tsv, README.md and STATUS.md are main's; the train
regenerates them from CI.
DrunkOnJava added a commit that referenced this pull request Oct 28, 2026
Merged three-way against 1e08844, the #317 head this branch carried, onto #317's
refreshed head (which carries main, with #313 and #316 landed). This branch's
ACAD_TABLE decoder, probe, dispatch arms and spec-coverage row stay; its
ARCHITECTURE section is renumbered 7bf after #317's 7be. tools/corpus/baseline.tsv,
tools/oracle/baseline.tsv, README.md and STATUS.md are main's; the train
regenerates them from CI.
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