Repository navigation
fix(tables): read the pre-R2007 VIEW record as §20.4.60 gives it - #263
Merged
Merged
Conversation
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. |
DrunkOnJava
force-pushed
the
fix/view-pre2007
branch
from
October 26, 2026 10:56
4323498 to
dbcf1e8
Compare
The pre-R2007 VIEW decoder read the view centre as two BDs, the view
mode as a BS and stopped after the associated-UCS bit. §20.4.60 gives a
2RD centre ("not bit-pair coded"), a 4-bit view mode (the encoding
VPORT uses), an RC render mode from R2000, the paper-space bit, and
from R2000 the associated-UCS bit followed, when set, by the UCS origin,
axes, elevation and orthographic type. The three ACadSharp VIEW records
of the R14, R2000 and R2004 saves errored on a reserved BD code; with
the spec's list all three close on their boundary (ACadSharp errors
308 -> 305, decoded 6438 -> 6441; nextgis unchanged, it has no VIEW).
The view mode stays the stored four bits, as on R2007+; surfacing it as
group 71 for VIEW and VPORT alike follows #238. The pre-R2007 synthetic
test writes the spec's layout.
Refs #256
sample_AC1014, sample_AC1015 and sample_AC1018 each decode one more record (their VIEW) and error one fewer; measure.py check passes.
DrunkOnJava
force-pushed
the
fix/view-pre2007
branch
from
October 26, 2026 11:15
dbcf1e8 to
66f520d
Compare
DrunkOnJava
enabled auto-merge (squash)
October 26, 2026 11:18
2 of 3 tasks
DrunkOnJava
added a commit
that referenced
this pull request
Oct 26, 2026
Three more types are compared field by field with AutoCAD's export: MLEADERSTYLE (§20.4.87) and VIEW (§20.4.60) against their spec's DXF column, and VISUALSTYLE, which v5.4.1 does not prescribe, against the DXF Reference's group for each named property. On the 49 drawing pairs: MLEADERSTYLE's 49 records R2000-R2018 agree on every decoded value (1914 equal, 36 by the DXF default). VISUALSTYLE's 1,008 records agree on 58,104 values and disagree on 264, all filed on #250: format_version on R2013 and R2018 (DWG 2, export 3) and Realistic's face lighting quality on R2000-R2007 (DWG 2, export 3). VIEW's 6 records agree on 118 values; the R2013 and R2018 Xdep bit disagrees (#256). Before #251 and #253 these scorers found 1,440 VISUALSTYLE values and MLEADERSTYLE's two swapped flags wrong. tools/oracle/baseline.tsv gains the 789 new rows; VIEW and MLEADERSTYLE in docs/spec-coverage.md say what was measured, and VIEW no longer lists the pre-R2007 errors #263 fixed. CLEANROOM records the scorers' sources. Refs #99, #102, #250, #256
DrunkOnJava
added a commit
that referenced
this pull request
Oct 26, 2026
Three more types are compared field by field with AutoCAD's export: MLEADERSTYLE (§20.4.87) and VIEW (§20.4.60) against their spec's DXF column, and VISUALSTYLE, which v5.4.1 does not prescribe, against the DXF Reference's group for each named property. On the 49 drawing pairs: MLEADERSTYLE's 49 records R2000-R2018 agree on every decoded value (1914 equal, 36 by the DXF default). VISUALSTYLE's 1,008 records agree on 58,104 values and disagree on 264, all filed on #250: format_version on R2013 and R2018 (DWG 2, export 3) and Realistic's face lighting quality on R2000-R2007 (DWG 2, export 3). VIEW's 6 records agree on 118 values; the R2013 and R2018 Xdep bit disagrees (#256). Before #251 and #253 these scorers found 1,440 VISUALSTYLE values and MLEADERSTYLE's two swapped flags wrong. tools/oracle/baseline.tsv gains the 789 new rows; VIEW and MLEADERSTYLE in docs/spec-coverage.md say what was measured, and VIEW no longer lists the pre-R2007 errors #263 fixed. CLEANROOM records the scorers' sources. Refs #99, #102, #250, #256
10 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Oct 26, 2026
DrunkOnJava
added a commit
that referenced
this pull request
Oct 26, 2026
DrunkOnJava
added a commit
that referenced
this pull request
Oct 26, 2026
Three more types are compared field by field with AutoCAD's export: MLEADERSTYLE (§20.4.87) and VIEW (§20.4.60) against their spec's DXF column, and VISUALSTYLE, which v5.4.1 does not prescribe, against the DXF Reference's group for each named property. On the 49 drawing pairs: MLEADERSTYLE's 49 records R2000-R2018 agree on every decoded value (1914 equal, 36 by the DXF default). VISUALSTYLE's 1,008 records agree on 58,104 values and disagree on 264, all filed on #250: format_version on R2013 and R2018 (DWG 2, export 3) and Realistic's face lighting quality on R2000-R2007 (DWG 2, export 3). VIEW's 6 records agree on 118 values; the R2013 and R2018 Xdep bit disagrees (#256). Before #251 and #253 these scorers found 1,440 VISUALSTYLE values and MLEADERSTYLE's two swapped flags wrong. tools/oracle/baseline.tsv gains the 789 new rows; VIEW and MLEADERSTYLE in docs/spec-coverage.md say what was measured, and VIEW no longer lists the pre-R2007 errors #263 fixed. CLEANROOM records the scorers' sources. Refs #99, #102, #250, #256
DrunkOnJava
added a commit
that referenced
this pull request
Oct 26, 2026
…he crate (#107) (#280) * test(fixtures): run the specification's own worked examples through the crate (#107) examples/spec_examples.rs runs every worked example and printed table of ODA spec v5.4.1 through the crate's public code: the §2 bit streams, the §2.14 CRC tables, §3.2.6, §4.1, §4.7, §5.10.1, the §9 R14 header dump and the 78 §20.4 R13/R14 object dumps. The fixtures quote the PDF verbatim with page numbers; tools/spec/extract_examples.py regenerates and audits them. CI's Test job runs it, and r14-objects.tsv's expect column fails the run when any outcome moves. Five spec errata are recorded in ARCHITECTURE.md §7k; the crate disagreements are tracked in #71, #226, #227, #256, #272, #273 and #274. * test(fixtures): spec_examples --update records moved outcomes and their coverage notes (#107) * test(fixtures): record §20.4.60 VIEW closing after #263 (#107)
DrunkOnJava
added a commit
that referenced
this pull request
Oct 26, 2026
Three more types are compared field by field with AutoCAD's export: MLEADERSTYLE (§20.4.87) and VIEW (§20.4.60) against their spec's DXF column, and VISUALSTYLE, which v5.4.1 does not prescribe, against the DXF Reference's group for each named property. On the 49 drawing pairs: MLEADERSTYLE's 49 records R2000-R2018 agree on every decoded value (1914 equal, 36 by the DXF default). VISUALSTYLE's 1,008 records agree on 58,104 values and disagree on 264, all filed on issue 250: format_version on R2013 and R2018 (DWG 2, export 3) and Realistic's face lighting quality on R2000-R2007 (DWG 2, export 3). VIEW's 6 records agree on every decoded value (120 equal), the R2013 and R2018 Xdep bit included since #293. Before #251 and #253 these scorers found 1,440 VISUALSTYLE values and MLEADERSTYLE's two swapped flags wrong. tools/oracle/baseline.tsv gains the 789 new rows; VIEW and MLEADERSTYLE in docs/spec-coverage.md say what was measured, and VIEW no longer lists the pre-R2007 errors #263 fixed. CLEANROOM records the scorers' sources. Refs #99, #102, #250, #256
DrunkOnJava
added a commit
that referenced
this pull request
Oct 26, 2026
…le (#279) Three more types are compared field by field with AutoCAD's export: MLEADERSTYLE (§20.4.87) and VIEW (§20.4.60) against their spec's DXF column, and VISUALSTYLE, which v5.4.1 does not prescribe, against the DXF Reference's group for each named property. On the 49 drawing pairs: MLEADERSTYLE's 49 records R2000-R2018 agree on every decoded value (1914 equal, 36 by the DXF default). VISUALSTYLE's 1,008 records agree on 58,104 values and disagree on 264, all filed on issue 250: format_version on R2013 and R2018 (DWG 2, export 3) and Realistic's face lighting quality on R2000-R2007 (DWG 2, export 3). VIEW's 6 records agree on every decoded value (120 equal), the R2013 and R2018 Xdep bit included since #293. Before #251 and #253 these scorers found 1,440 VISUALSTYLE values and MLEADERSTYLE's two swapped flags wrong. tools/oracle/baseline.tsv gains the 789 new rows; VIEW and MLEADERSTYLE in docs/spec-coverage.md say what was measured, and VIEW no longer lists the pre-R2007 errors #263 fixed. CLEANROOM records the scorers' sources. Refs #99, #102, #250, #256
DrunkOnJava
added a commit
that referenced
this pull request
Oct 26, 2026
§20.4.60 stores VIEW's view mode as four bits, "0: 71's bit 0 (1), 1: 71's bit 1 (2), 2: 71's bit 2 (4), 3: OPPOSITE of 71's bit 4 (16)", and notes that bit 3 (8) of group 71 "can not be specified". Both VIEW paths surfaced the raw bits; they now surface the group-71 value through the conversion VPORT uses (§20.4.64, #238), with no UCSFOLLOW bit. The DXF value oracle compares ViewEntry::view_mode with group 71 directly now, instead of converting the stored bits in its scorer: equal on all 6 VIEW records, R2000 to R2018. Its baseline row is renamed from "view_mode (stored bits, as group 71)" to "view_mode". The two VIEW round-trip tests write the bits 0001, whose group-71 value is 0. Closes #256 (with #263, #279 and #293, every decoded VIEW value now equals the export).
DrunkOnJava
added a commit
that referenced
this pull request
Oct 26, 2026
§20.4.60 stores VIEW's view mode as four bits, "0: 71's bit 0 (1), 1: 71's bit 1 (2), 2: 71's bit 2 (4), 3: OPPOSITE of 71's bit 4 (16)", and notes that bit 3 (8) of group 71 "can not be specified". Both VIEW paths surfaced the raw bits; they now surface the group-71 value through the conversion VPORT uses (§20.4.64, #238), with no UCSFOLLOW bit. The DXF value oracle compares ViewEntry::view_mode with group 71 directly now, instead of converting the stored bits in its scorer: equal on all 6 VIEW records, R2000 to R2018. Its baseline row is renamed from "view_mode (stored bits, as group 71)" to "view_mode". The two VIEW round-trip tests write the bits 0001, whose group-71 value is 0. Closes #256 (with #263, #279 and #293, every decoded VIEW value now equals the export).
DrunkOnJava
added a commit
that referenced
this pull request
Oct 28, 2026
…d say what measured them (#140, #147, #148, #133, #127) (#398) Seven rows leave partial for closes because no record of any kind errors on the 52 drawings of run 40532346172 and the errors their notes still quote were fixed: TEXT, ATTRIB, ATTDEF (#258), MTEXT (#261), VIEW (#263, #284), DIMSTYLE (#293) and HATCH (#264, the R14 records routed). §22 AcDb:Template goes from missing to partial: dxf_header reads $MEASUREMENT from it (#320). §9 stays closes, now tracked by #127 (R13) and carrying the per-release evidence behind closing #128, #129 and #130. The page's Last measured line and the paragraph that said closes came from a local 19-file corpus are updated.
DrunkOnJava
added a commit
that referenced
this pull request
Oct 28, 2026
…ain run (#195) (#401) * docs(spec-coverage): move the rows the 2026-10-27 main run proves, and say what measured them (#140, #147, #148, #133, #127) Seven rows leave partial for closes because no record of any kind errors on the 52 drawings of run 40532346172 and the errors their notes still quote were fixed: TEXT, ATTRIB, ATTDEF (#258), MTEXT (#261), VIEW (#263, #284), DIMSTYLE (#293) and HATCH (#264, the R14 records routed). §22 AcDb:Template goes from missing to partial: dxf_header reads $MEASUREMENT from it (#320). §9 stays closes, now tracked by #127 (R13) and carrying the per-release evidence behind closing #128, #129 and #130. The page's Last measured line and the paragraph that said closes came from a local 19-file corpus are updated. * docs(criteria): re-measure the 1.0 requirements from the 2026-10-27 main run (#195) Header, R2, R3, R4, R8, X1 and S3 now carry what run 40542129639 (main 61255e9) and docs/data/spec-coverage.tsv say: 52 drawings with 0 errored records and 533 skipped, 53 sections scored by the DXF oracle with 22 values disagreeing, 90 closes, 13 partial, 6 decoder and 29 missing rows, a wasm32 compile of the library in the Clippy job. X1 (DXF) moves from not measured to failed: the HEADER, TABLES, ENTITIES and BLOCKS probes pair the written records with AutoCAD's export and find 0 groups disagreeing, and 342 entity records of 18 kinds and the OBJECTS section are not written. No other status changes. * docs(criteria): R3 counts the rows #398 moves: 97 closes, 7 partial, 6 decoder, 28 missing (#195) The counts are those of docs/data/spec-coverage.tsv with #398, whose moves run 40532346172 proves.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The pre-R2007 VIEW record is read as §20.4.60 gives it. The ACadSharp R14, R2000 and R2004 VIEW records, which errored, now close on their boundary, and every field the decoder surfaces equals AutoCAD's export.
Spec reference
§20.4.60 VIEW:
BD 40,BD 41,2RD 10(view centre, "not bit-pair coded"),3BD 12,3BD 11,BD 50,BD 42,BD 43,BD 44, the 4-bit view mode (71), R2000+RC 281render mode, the paper-spaceB(70 bit 1), and R2000+ the associated-UCSB(72) followed, when set, by3BDorigin,3BDx and y directions,BD 146elevation andBS 79orthographic type. The pre-R2007 decoder read the centre as twoBDs, the view mode as aBSand no UCS block; the R2007+ split-stream decoder already followed the spec.The view mode stays the four stored bits, as on R2007+; surfacing it as group 71 for VIEW and VPORT alike follows #238. The pre-R2007 synthetic test is rewritten to the spec's layout (its assertions are unchanged); no test added.
Test plan
cargo fmt --all -- --check,cargo clippy --all-targets --all-features -- -D warnings,RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-featurescargo test --release --all-featureswith../../samplespresent: all passtools/corpus/fetch.pytree): ACadSharp errors 308 → 305 and decoded 6438 → 6441 (the three VIEW records); nextgis unchanged (no VIEW there):tools/corpus/baseline.tsvregenerated withmeasure.py baselineon the ci(corpus): measure the reader on public drawings fetched by pinned hash #225 fetch tree (the three files gain one decoded and lose one errored record each);measure.py checkpasses locallyR2000 and R2004 were
decode errorbefore. The one remaining difference, Xdep on the R2013 and R2018 VIEW, is the entry-header question of #235 (VIEW's single record on each of those releases carries the clear bit first, as R2007 and R2010 do, unlike every other table type there); it is noted on #256 and not changed here.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:
CLEANROOM.md).Based on ODA spec v5.4.1 §20.4.60 and AutoCAD's own DXF exports of the ACadSharp
samples/drawings, read as data.Developer Certificate of Origin
By submitting this PR, I certify that the contribution complies with the Developer Certificate of Origin 1.1.
Refs #256