Repository navigation
feat(dxf): score VIEWPORT in the value oracle (§20.4.38) - #390
Merged
Merged
Conversation
The VIEWPORT decoder (#71) is now compared with AutoCAD's export field by field, under AcDbViewport: the centre, width and height (10, 40, 41), the R2000+ view block (view target 17, direction 16, twist 51 and snap angle 50 as degrees, view height 45, lens length 42, clip distances 43 and 44, view centre, snap base, snap and grid spacing 12 to 15, circle zoom 72, the R2007+ grid major 61, status flags 90, style sheet 1, render mode 281, UCS icon and per-viewport flags 74 and 71, UCS origin and axes 110 to 112, elevation 146, ortho type 79, the R2004+ shade plot mode 170) and the R2007+ lighting block (292, 282, 141, 142). The ambient light colour is a CMC: its method byte says whether the word is an ACI index (group 63) or a true colour (group 421); the DWG holds a true colour, 0xC2333333, and the export's 63 (250) is the index AutoCAD derives from it, which stays not-decoded. The count of frozen layers is the handle stream's; the export lists the layers as handles. On the 49 drawing pairs: 36 records, R2000 to R2018 (6 per release), 1686 values equal the export, the 1686 the decoder's probe reports, and none differ. 36 decoded values have no DXF group (the frozen-layer count). tools/oracle/baseline.tsv gains the 287 new rows, and the §20.4.38 row of docs/spec-coverage.md says what the oracle measured. The oracle's section map files VIEWPORT under §20.4.38. Refs #99, #102, #146
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. |
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 value oracle scores VIEWPORT (§20.4.38, decoded by #71) against AutoCAD's DXF export under AcDbViewport: 36 records, R2000 to R2018 (6 per release).
Scored: the centre, width and height (10, 40, 41); the R2000+ view block (view target 17, direction 16, twist 51 and snap angle 50 as degrees, view height 45, lens length 42, clip distances 43 and 44, view centre, snap base, snap and grid spacing 12 to 15, circle zoom 72, status flags 90, style sheet 1, render mode 281, the UCS icon and per-viewport flags 74 and 71, UCS origin and axes 110 to 112, elevation 146, ortho type 79); the R2007+ grid major 61 and lighting block (292, 282, 141, 142); and the R2004+ shade plot mode 170.
The ambient light colour is a CMC. Its method byte says whether the word is an ACI index (compared with 63) or a true colour (compared with 421). The DWG holds the true colour 0xC2333333; the export's 63 (250) is the index AutoCAD derives from it and the DWG does not store, so it stays not-decoded, as for a true-colour LAYER (#245). The count of frozen layers belongs to the handle stream; the export lists the layers as 331 handles, so the count is DWG-only.
Spec reference
Spec §20.4.38 VIEWPORT ENTITY. Before and after, on the 49 drawing pairs:
No field comes out different. The 1686 equal values are the 1686 the decoder's probe reports on the same 36 records. The not-decoded groups are the viewport status and id (68, 69), the visual style handle (348), the ambient colour's derived index and the handles and extended data every entity carries.
tools/oracle/baseline.tsvgains the 287 new rows; no existing row changes (the ratchet against main's baseline passes). The §20.4.38 row ofdocs/spec-coverage.mdsays what the oracle measured; its state stayscloses.Test plan
cargo fmt --all -- --check,cargo clippy --all-targets --all-features -- -D warnings,cargo test --release --all-features,RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features,python3 tools/ci/spec_coverage.py --checkSource-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).dwg-rsis Apache-2.0 and must remain compatible.My contribution is based on:
CLEANROOM.md.No such reading was needed: the mapping is the spec's DXF column and the DXF Reference's AcDbViewport groups, read from AutoCAD's own exports as data.
See
CLEANROOM.mdfor the full allowed/forbidden source list and the honest scope of what "clean-room" means for this project.Developer Certificate of Origin
By submitting this PR, I certify that the contribution complies with the
Developer Certificate of Origin 1.1.
Specifically, I affirm that the contribution is my own work (or rightfully
licensed to me) and that it can be distributed under the project's Apache-2.0
license.
I will sign off commits with
git commit -swhen asked, which adds aSigned-off-bytrailer to the commit message asserting the DCO.Refs #99, #102, #146.