Repository navigation
feat(dxf): score SPLINE in the value oracle (§20.4.40) - #394
Merged
Merged
Conversation
The SPLINE decoder is now compared with AutoCAD's export field by field, under AcDbSpline: the closed, periodic and rational bits of group 70, the degree (71), the knot, control point and fit point counts (72, 73, 74), the knot and control tolerances (42, 43), the knots (40), the weights of a rational spline (41) and the control points (10); and for the fit form the fit tolerance (44), the tangents (12, 13) and the fit points (11). The planar bit and the others in group 70, the normal (210) and the export's control form of a fit-form spline are not decoded. On the 49 drawing pairs: 12 records, R2000 to R2018 (2 per release), 292 values equal the export and 2 differ. The second spline of each release is stored as its control form up to R2010 and equals the export; from R2013 the DWG holds only its fit form (2 fit points) while the export writes the evaluated control form with 74 = 0, so the fit point count disagrees and the fit tolerance, tangents and points have no DXF group (#393). The decoder is not at fault: nothing in the export can verify the fit form. 46 decoded values have no DXF group. tools/oracle/baseline.tsv gains the 108 new rows, and the §20.4.40 row of docs/spec-coverage.md says what the oracle measured. The oracle's section map files SPLINE under §20.4.40. Refs #99, #102, #143, #393
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 SPLINE (§20.4.40) against AutoCAD's DXF export under AcDbSpline: 12 records, R2000 to R2018 (2 per release).
Scored: the closed, periodic and rational bits of group 70, the degree (71), the knot, control point and fit point counts (72, 73, 74), the knot and control tolerances (42, 43), the knots (40), the weights of a rational spline (41) and the control points (10); and, for the fit form, the fit tolerance (44), the tangents (12, 13) and the fit points (11). Knots, weights and points are scored under one field name each. The planar bit and the other bits of group 70, and the normal (210), are not decoded.
Spec reference
Spec §20.4.40 SPLINE. Before and after, on the 49 drawing pairs:
The two different values are one finding, filed as #393. The second spline of each release (handle 0x434 on
sample_AC1027.dwgandsample_AC1032.dwg) is stored as its control form up to R2010 (8 knots, 4 control points) and equals the export. From R2013 the DWG holds only its fit form (2 fit points, scenario 2) while the export writes the evaluated control form with group 74 = 0, so the fit point count (74) disagrees (DWG 2, DXF 0) and the fit tolerance, tangents and fit points have no DXF group (DWG-only). The decoder is not at fault: it closes on the record's boundary, and a degree-3 spline through two fit points has four control points. Nothing in the export can verify the fit form, and the control form the export carries is not in the R2013+ record (listed as not decoded). The oracle leaves the count scoreddifferent.The 46 DWG-only values are those fit-form fields, the scenario, and the R2013+ flags and knot parameter, which have no DXF group. §20.4.40 stays
closes: the disagreement is a limit of the evidence, not a decode error.tools/oracle/baseline.tsvgains the 108 new rows; no existing row changes (the ratchet against main's baseline passes). The §20.4.40 row ofdocs/spec-coverage.mdsays what the oracle measured and names #393.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 AcDbSpline 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, #143, #393.