Skip to content

fix(entities): POLYLINE (MESH) reads §20.4.34's curve type and its fields in the spec's order (#273) - #288

Merged
DrunkOnJava merged 2 commits into
mainfrom
fix/273-polyline-mesh
Oct 26, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
fix/273-polyline-mesh

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

POLYLINE (MESH) reads §20.4.34's six BS in the spec's order (flags, curve type, M and N vertex counts, M and N densities) plus the R2004+ owned-object count. It read five BS, without the curve type and with the densities before the counts, and took no Version. Closes #273.

Spec reference

ODA spec v5.4.1 §20.4.34 POLYLINE (MESH) (30), p130: Flags BS 70, Curve type BS 75, M vert count BS 71, N vert count BS 72, M density BS 73, N density BS 74, R2004+ Owned Object Count BL.

Evidence

  • The spec's own example, §20.4.34.1 (p130-131), now closes on its RL boundary: flags 17, curve type 0, a 6 × 7 grid, densities 0. Before: POLYLINE_MESH data fields ended at bit 107, data stream ends at 109 (delta -2), and its order would have read N = 0. cargo run --release --example spec_examples gives OK: 417 checks; --update moved the row from error #273 to closes.
  • No pinned corpus drawing holds a POLYLINE (MESH): all 52 rows of tools/corpus/baseline.tsv are unchanged. The module's docs now say the spec example is the list's only measurement.

The module's existing unit tests round-trip the decoder through a local writer helper; that helper now writes §20.4.34's order and the calls pass a Version. No test is 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.34 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:10:29.256497Z 97c9828 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 59154b4 into main Oct 26, 2026
25 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/273-polyline-mesh branch October 26, 2026 12:19
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.

POLYLINE (MESH) reads five BS without §20.4.34's curve type, in a different order

1 participant