Repository navigation
feat(entities): decode SHAPE from §20.4.37 (#140) - #310
Conversation
The dispatcher kept SHAPE unhandled because a 160-bit budget seemed to have nothing to spend it on. §20.4.37 spends it: a 3BD insertion point, five BD, a BS shape number and a 3BD extrusion, with no release-dependent branch. All 7 SHAPE records of the corpus close on their data-stream boundary from R14 to R2018, and so does the spec's own R14 example (§20.4.37.1). Against AutoCAD's DXF export (R2000 to R2018) the insertion point and scale of the 6 records with a twin equal it; the groups AutoCAD omits at their defaults are not compared. The label test that asserted SHAPE has no field list now lists it.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 508b7c78af
ℹ️ 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".
…ares, so the copies merge in any order
Resolved by keeping both sides: the SHAPE section joins ARCHITECTURE.md after main's sections as 7au; examples/support/twin.rs is main's (this branch's copy differed only in a private Twin::parse); the spec-coverage SHAPE row is this branch's and VIEWPORT ENTITY's is main's newer closes row, with the page regenerated. tools/corpus/baseline.tsv is main's; the Corpus job measures the count change and the baseline is regenerated from its artifact.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c649351c1
ℹ️ 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".
…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.
# Conflicts: # ARCHITECTURE.md # docs/data/spec-coverage.tsv # docs/spec-coverage.md
Summary
Decode SHAPE (type 0x21, §20.4.37):
3BDinsertion point, fiveBD(scale, rotation, width factor, oblique, thickness),BSshape number and3BDextrusion. The dispatcher had kept it unhandled on the note that a 160-bit budget had nothing to spend it on; the spec's field list spends it exactly.Spec reference
§20.4.37 SHAPE (tracking #140). The list closes as printed, with no release-dependent branch. The spec's own R14 example (§20.4.37.1) now closes on its boundary too:
spec_examples --updatemoved that row fromunhandledtocloses(tests/fixtures/spec-examples/r14-objects.tsv,docs/data/spec-coverage.tsv,docs/spec-coverage.md).Test plan
cargo fmt --all -- --checkandcargo clippy --all-targets --all-features -- -D warningspass on this branch.cargo test,cargo docand 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_shape -- <corpus>over the 52 pinned drawings. It closes on the boundary and compares the decoded values with AutoCAD's DXF export by handle.AutoCAD omits a group at its default, so the rotation, width factor, oblique angle, thickness and extrusion are absent from all 6 twins (42 values counted as omitted, not compared): for those the evidence is the boundary alone. The shape number has no DXF group (the DXF writes the shape's name).
Corpus baseline regenerated: decoded +7, skipped -7, errored unchanged (7 rows).
Tests touched: one existing test adapted.
entities::dispatch::tests::fixed_entity_label_covers_every_body_armassertedfixed_entity_label(OBJECT_TYPE_SHAPE).is_none()("SHAPE has a code but no field list"); that is disproven, so SHAPE moves into the list of codes the test requires a label for. No test added.examples/probe_shape.rsand the shared harnessexamples/support/twin.rsare new examples.The DXF oracle does not score SHAPE 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:
973628f3…f504b) is explicitly allowed (seeCLEANROOM.md).My contribution is based on:
Developer Certificate of Origin
By submitting this PR, I certify that the contribution complies with the Developer Certificate of Origin 1.1.