Repository navigation
fix(entities): read the R13-R14 branches of INSERT, the dimensions and 3DFACE (#227) - #267
Merged
Merged
Conversation
…d 3DFACE (#227) §20.4.9, §20.4.22 and §20.4.32 each print an R13-R14 branch the decoders never read: INSERT's three BD scales instead of the R2000+ data flags, the common dimension data without the R2000+ attachment, line spacing and actual measurement, and 3DFACE's four 3BD corners with an unconditional invisible-edge BS. All 24 R14 records that errored on the public corpus (12 INSERT, 11 dimensions of all seven types, a 3DFACE) now close, and each equals the R2000 save of the same drawing handle by handle, apart from the four dimension fields R14 does not store and one 16-point x that the two saves store one ulp apart. ARCHITECTURE.md §7r records it; tools/corpus/baseline.tsv records sample_AC1014.dwg's new counts.
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 was referenced Oct 26, 2026
Merged
# Conflicts: # ARCHITECTURE.md # docs/data/spec-coverage.tsv # docs/spec-coverage.md # tools/corpus/baseline.tsv
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
Read the R13-R14 branches §20.4.9 (INSERT), §20.4.22 (common dimension data) and §20.4.32 (3DFACE) print. All 24 R14 records that errored on the public corpus now close: 12 INSERT, the 11 dimensions of all seven types, and the 3DFACE. Each equals the R2000 save of the same drawing handle by handle, apart from the four dimension fields R14 does not store and one last-digit difference in a stored double (below).
Closes #227.
Spec reference
BDx, y, z scalesBBdata flags withRD/DDscalesBS, line spacing styleBS, line spacing factorBDand actual measurementBDare R2000+3BDcorners and an unconditional invisible-edgeBSRDfirst corner and3DDcornersOn R13/R14 the four dimension fields are now left at 0, not given a default the record does not hold, and their struct docs say so.
three_d_face::decodegains theversionargument the branch needs.Records it was measured on
R14 has no DXF export in the corpus. AutoCAD keeps handles across a save-as, so
examples/probe_cross_release.rs(from #264, which merges first) compares each R14 record with the R2000 save of the same drawing:sample_AC1015.dwgNotes on the table:
--ignore=attachment,line_spacing_style,line_spacing_factor,actual_measurement, the four fields R14 does not store.0x516, in the last digit of its 16-point's x:528.6474703372945against528.6474703372946. Both are rawRDs read exactly, so the two saves store doubles one unit in the last place apart. That is what AutoCAD wrote, not a reading the bits leave open.Coverage,
../../samplesUnchanged, TOTAL 3911 / 525 / 9. The three nextgis R14 files of the 19 hold none of these types.
Public corpus:
tools/corpus/baseline.tsv(regenerated, committed)52-file total: 13781 / 1985 / 308 → 13805 / 1985 / 284 on its own.
measure.py checkpasses. The row is regenerated on top of earlier merges in the serial rebase.Class census and reference closure
Unchanged on all 19 files of
../../samplesand in the baseline's census and closure columns.Docs
docs/data/spec-coverage.tsv: §20.4.9, §20.4.22 to §20.4.29 and §20.4.32 →closeswith the measurement.docs/spec-coverage.mdis regenerated.insert.rsandthree_d_face.rsgain the R13-R14 branch.Test plan
cargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningsRUSTFLAGS="-D warnings" cargo test --release --all-features(real-file tests ran against../../samples)RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-featurestools/corpus/measure.py checkpasses against the committed baselinethree_d_face::tests::{roundtrip_triangle_face, roundtrip_quad_face_with_invisible_edges}now passVersion::R2000to the newdecode(c, version)signature. They build R2000-shape payloads, and their assertions are unchanged.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).My contribution is based on §20.4.9, §20.4.22 and §20.4.32 of the ODA's freely-redistributable Open Design Specification for .dwg files (v5.4.1) and on the corpus bytes. No third-party code or comments were read.
Developer Certificate of Origin
By submitting this PR, I certify that the contribution complies with the Developer Certificate of Origin 1.1.