Skip to content

Measure parallel-plane AP242 spans along their normals - #2186

Merged
pzfreo merged 1 commit into
mainfrom
fix/2184-plane-reference-span
Oct 4, 2026
Merged

pzfreo merged 1 commit into
mainfrom
fix/2184-plane-reference-span

Conversation

@pzfreo

@pzfreo pzfreo commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Change

Use the actual planar support normals to establish the measurement axis for an AP242 linear or thickness dimension between two parallel face groups that are each internally coplanar. The face centres may differ sideways when the projected witness coordinate is supported by both face groups. Only their separation along the proven principal normal is compared with the source nominal. A Y-axis dimension is restricted to side or plan when only one view has supported witnesses. Direct XCAF groups and exact Part21 support groups use the same rule. Other support types retain the existing station validation.

Closes #2184. Plane-to-axis support remains #2162.

Evidence

  • The new regression uses real OCC faces 10 mm apart along X with centres offset 20 mm in Y. It proves the old centre-delta rule rejects the relationship, while direct XCAF extraction and the Part21 support fallback now retain the X-axis 10 mm span without blockers. It also checks a rotated part frame, perpendicular planes, noncoplanar group members, unsupported projected witnesses, side-only and plan-only Y views through the IR, and a source nominal that disagrees with the measured span.
  • tests/test_issue_1209_linear_pmi_witnesses.py: 18 passed.
  • tests/test_pmi.py: 89 passed, 1 deselected.
  • tests/test_pmi_part21.py: 101 passed.
  • tests/test_nominal_step_pmi.py: 5 passed.
  • On corrected head: 52 focused regression, source-shape, and import-boundary tests passed; 195 broader PMI tests passed before the final coverage-only test addition, with one marked deselection. The final head passed the 52 focused and architecture/shape guard tests. Ruff, mypy, codespell, strict MkDocs build, and git diff --check passed. The one broad-run source-shape failure came from a complexity baseline tightened during that run; it passed after the baseline update.

The reporter's private AP242 file was unavailable, so that exact file was not replayed. The regression exercises both extraction paths with real planar topology. This PR addresses principal parallel planes; it does not implement the distinct plane-to-axis relationship in #2162.

Architectural fit

  • ADR 1: The correction stays in PMI extraction, before the shared IR waist. It adds no drawing path or inventory.
  • ADR 2: Authored stations still enter the existing placement solve; page, view, and corridor policy are unchanged.
  • ADR 3: Geometry recognition and its provider contract are untouched. The source support is read from the AP242 PMI relationship itself.
  • ADR 4: The authored nominal and source identity remain authoritative. No dimension or tolerance is invented from the part bbox.
  • ADR 5: A wrong nominal still produces a blocker. Nonproven or nonprincipal planar normals do not use this normal-distance rule and continue through the existing station validation.

An independent fresh-agent review found two witness/view cases; both were fixed and rereviewed with no remaining findings. The first final-head CI run reported 89% changed-line coverage; two additional Y-view outcome tests and an unreachable-branch cleanup raised final-head changed-line coverage to 93% (86 changed lines, 6 missing). The reviewer also checked that delta. No ADR invariant or boundary changes; no ADR text changed.

@pzfreo
pzfreo force-pushed the fix/2184-plane-reference-span branch 3 times, most recently from 4cea6d5 to 717ef23 Compare October 4, 2026 18:16
@pzfreo
pzfreo enabled auto-merge (squash) October 4, 2026 18:18
@pzfreo
pzfreo force-pushed the fix/2184-plane-reference-span branch from 717ef23 to 34a6c44 Compare October 4, 2026 18:52
@pzfreo
pzfreo merged commit 8b84412 into main Oct 4, 2026
19 checks passed
@pzfreo
pzfreo deleted the fix/2184-plane-reference-span branch October 4, 2026 19:56
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.

Authored AP242 linear dimension between parallel planes rejected: span measured between face centres, not along the normal

1 participant