Skip to content

fix(tables): a UCS record ends after its Y axis on R13/R14 (§20.4.62, #274) - #289

Merged
DrunkOnJava merged 2 commits into
mainfrom
fix/274-ucs-r14
Oct 26, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
fix/274-ucs-r14

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

On R13/R14 a UCS record ends after its Y axis, as §20.4.62 gives it: elevation and the orthographic fields are R2000+ only. The decoder read them on R14 and failed on the record's handle bytes (UCS ortho_view_type 29456 outside 0..=6). Closes #274.

Spec reference

ODA spec v5.4.1 §20.4.62 UCS (63), p170-171: common Entry name TV, 64-flag B, xrefindex+1 BS, Xdep B, Origin 3BD, X-direction 3BD, Y-direction 3BD; R2000+ only Elevation BD 146, OrthographicViewType BS 79, OrthographicType BS 71.

Evidence

  • The spec's own example, §20.4.62.1 (p171-172, an R13/R14 record), now closes on the RL boundary of its common object data. cargo run --release --example spec_examples gives OK: 417 checks; --update moved its row from error #274 to closes.
  • R13/R14 records report elevation 0, ortho view type 0 and a null base-UCS handle, documented on the module.
  • No pinned corpus drawing holds a UCS record: all 52 rows of tools/corpus/baseline.tsv are unchanged.

Left alone here, because nothing measures it: on R2000/R2004 the decoder reads the base-UCS handle inline and skips OrthographicType, both against §20.4.62's text. That is #285 (blocked:sample). No test is changed or added.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --release --all-features
  • cargo run --release --example spec_examples (OK, 417 checks)
  • Corpus ratchet: 52 / 52 baseline rows 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:

  • No Autodesk DWG SDK source (RealDWG, ObjectARX, ObjectDBX) or NDA-protected Autodesk documentation was consulted or imported.
  • No Open Design Alliance Teigha / Drawings SDK source was consulted or imported. The ODA's public Open Design Specification for .dwg files PDF is explicitly allowed (see CLEANROOM.md).
  • No GPL-licensed DWG implementation source (LibreDWG, etc.) was consulted or imported. This matters because dwg-rs is Apache-2.0 and must remain compatible.

My contribution is based on the ODA's freely-redistributable Open Design Specification for .dwg files (v5.4.1), §20.4.62 and its example. No other source was read.

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T12:12:37.314395Z 23d5681 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 26, 2026 12:13
@DrunkOnJava
DrunkOnJava merged commit dcc29d7 into main Oct 26, 2026
25 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/274-ucs-r14 branch October 26, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UCS reads its R2000+ elevation and ortho fields on R13/R14 (§20.4.62)

1 participant