Repository navigation
feat(dxf): score LEADER in the value oracle (§20.4.47) - #402
Merged
Merged
Conversation
The LEADER decoder (#71) is now compared with AutoCAD's export field by field, under AcDbLeader: the annotation type (73), the hook line direction (74), the extrusion (210, the DXF default when omitted), the vertices (10) and, up to R2007, the text box height and width (40, 41). When the leader has a hook line (75 is 1) the export inserts the hook line's start before the last vertex and counts it in 76, as the decoder's probe measures: the oracle compares the count with the decoded vertices plus one and the inserted vertex stays not-decoded. The path type and arrowhead flag (72, 71), which the export omits, the horizontal direction and block offset (211, 212) and the spec's two groupless fields (the origin and the end point projection) are DWG-only; the dimension style and the annotation are handles. On the 49 drawing pairs: 6 records, R2000 to R2018 (1 per release), 78 values equal the export and 18 by its default; none differ. 60 decoded values have no DXF group. From R2010 the record holds no box height or width while the export still writes them: those two groups stay not-decoded. tools/oracle/baseline.tsv gains the new rows, and the §20.4.47 row of docs/spec-coverage.md says what the oracle measured. The oracle's section map files LEADER under §20.4.47. Refs #99, #102, #147
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. |
2 tasks done
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 LEADER (§20.4.47, decoded by #71) against AutoCAD's DXF export under AcDbLeader: 6 records, R2000 to R2018 (1 per release).
Scored: the annotation type (73), the hook line direction (74), the extrusion (210, the DXF default when omitted), the vertices (10) and, up to R2007, the text box height and width (40, 41). When the leader has a hook line (75 is 1) the export inserts the hook line's start before the last vertex and counts it in 76, as the decoder's probe measures; the oracle compares the count with the decoded vertices plus one and leaves the inserted vertex not-decoded. The path type and arrowhead flag (72, 71), which the export omits, the horizontal direction and block offset (211, 212) and the spec's two fields with no DXF group (the origin and the end point projection) are DWG-only; the dimension style and the annotation are handles.
Spec reference
Spec §20.4.47 LEADER. Before and after, on the 49 drawing pairs:
No field comes out different. The 18
defaultvalues are the extrusion, which the export omits. From R2010 the record holds no box height or width while the export still writes groups 40 and 41, so those stay not-decoded there (the decoder's docs record the departure). The other not-decoded groups are the hook line flag (75), the inserted hook line vertex, the dimension style name (3), the annotation handle (340), the owner and the layer.tools/oracle/baseline.tsvgains the 120 new rows; no existing row changes (the ratchet against main's baseline passes). The §20.4.47 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 AcDbLeader 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, #147.