Skip to content

feat(dxf): score SPATIAL_FILTER in the value oracle (§20.4.94) - #352

Open
DrunkOnJava wants to merge 2 commits into
mainfrom
feat/dxf-oracle-spatial-filter
Open

DrunkOnJava wants to merge 2 commits into
mainfrom
feat/dxf-oracle-spatial-filter

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

The value oracle scores SPATIAL_FILTER (§20.4.94, decoded by #308) against AutoCAD's DXF export, under AcDbSpatialFilter:

  • 70 (the point count) and 10/20 per boundary point;
  • 210/220/230 and 11/21/31;
  • 71, 72 and 73;
  • then, as groups 40 in stream order, the front clip distance (when on) and the two twelve-value matrices.

The export writes the back clip distance as 41 where the spec gives 40, as the decoder's probe measures. The section map files the class under §20.4.94.

Stacked on #351: its §20.4.93 row and baseline rows sit next to this PR's, so this branch carries #351's commit below its own. Review only the top commit. Queue it after #351.

Measured (49 drawing pairs)

Section Records Equal Different Not decoded
§20.4.94 SPATIAL_FILTER 6 (R2000-R2018) 228 0 12

tools/oracle/baseline.tsv gains the 216 new rows (ratchet against main's: no count fell). The probe reports 234 compared values. The difference is its two group-count checks (40 and 41) per record, which the oracle counts as the values themselves.

Test plan

  • cargo fmt --all -- --check, cargo clippy --all-targets --all-features -- -D warnings, python3 tools/ci/spec_coverage.py --check
  • Oracle over the 102 pinned files with --baseline tools/oracle/baseline.tsv (main's): exit 0; the regenerated TSV is committed
  • cargo run --release --example spec_examples: OK: 425 checks

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.

Based on ODA spec v5.4.1 §20.4.94 and AutoCAD's DXF exports read as data.

Developer Certificate of Origin

By submitting this PR, I certify that the contribution complies with the Developer Certificate of Origin 1.1.

Refs #99, #102, #149.

The SORTENTSTABLE decoder (#307) reads §20.4.93's BL entry count and
that many sort handles, handle code 0 in the data stream. The DXF writes
each entry as 331 (the entity, a handle of the handle stream the decoder
does not read) then 5 (the sort handle), after the record's own 5. The
oracle compares the entry count with the number of those 5 groups and
each sort handle with the next one, all entries under one field, and
files the class under §20.4.93.

On the 49 drawing pairs: 18 records, R2000 to R2018 (three per
release), all 66 values equal the export, the 66 the decoder's probe
reports. tools/oracle/baseline.tsv gains the 12 new rows, and the
§20.4.93 row of docs/spec-coverage.md says what the oracle measured. That
row's probe sentence said the export equals "the 24 R2000 to R2018
records"; the probe compares 18, and the other 6 R2018 records are
export_sample.dwg's, which has no DXF twin.

Refs #99, #102, #149
The SPATIAL_FILTER decoder (#308) is now compared with AutoCAD's export
under AcDbSpatialFilter: 70 (the point count), 10/20 per boundary point,
210/220/230, 11/21/31, 71, 72 and 73, then as groups 40 in stream order
the front clip distance (when on) and the two twelve-value matrices; the
export writes the back clip distance as 41 where the spec gives 40, as
the decoder's probe measures. The boundary points count under one field,
and the section map files the class under §20.4.94.

On the 49 drawing pairs: 6 records, all 228 decoded values equal the
export. tools/oracle/baseline.tsv gains the 216 new rows, and the
§20.4.94 row of docs/spec-coverage.md says what the oracle measured.

Refs #99, #102, #149
@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-26T22:42:50.002027Z 5730290 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.

This branch has not been deployed

No deployments
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.

1 participant