Skip to content

Render one pitch gap without 1× prefix - #2173

Merged
pzfreo merged 7 commits into
mainfrom
fix/single-pitch-label
Oct 3, 2026
Merged

pzfreo merged 7 commits into
mainfrom
fix/single-pitch-label

Conversation

@pzfreo

@pzfreo pzfreo commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

A two-member pattern has one pitch gap. Render its approved pitch as 650, not 1× 650. Multi-gap spans keep their multiplier (3× 25). The shared renderer covers hole, slot and pocket patterns; the independent pocket-pattern drawing evaluator now expects the same honest presentation while checking the confirmed measurement identity.

Evidence

  • The same AP242 CTC01 fixture in both modes now labels its four single-gap pitches 90, 320, 350, and 650. A generated preview PDF was rendered and inspected.
  • 66 focused hole, slot, pocket and CTC01 tests passed. Restoring the old 1× formatter deliberately failed test_grid_pattern_renders_both_pitch_dims; the fix was restored byte-for-byte afterward.
  • scripts/pr-check --static passed on the final change.
  • On the automatic CTC01 PMI build, the before/after lint totals stayed at 5 errors, 5 warnings and 12 infos; PMI stayed at 21 rendered and 6 dropped. This formatting fix does not claim to resolve that sheet's existing incompleteness.

Architecture

The approved pitch value and measurement identity still come from the ADR 1/4 compiled plan. Only the render text for a single gap changes. ADR 2 placement uses the same endpoints and shorter measured label. ADR 3 recognition is unchanged. ADR 5's independent drawing evaluator still checks the visible label against the confirmed claim. No ADR boundary changes.

The separate CTC01 repeated nominal diameter and distinct member-specific PMI presentation is tracked in #2172; this PR does not suppress either claim.

Follow-up at 785968c

The stacked #2174 full matrix found two additional consumers of the intentional one-gap text change. The grid-plate exact golden now records 20 and its actual label bounds. The independent hole-pattern drawing evaluator now accepts a bare value for one interval and still requires the correct explicit multiplier for longer spans. Its mutation test proves that changing the real one-gap 20 to 9× 20 loses drawing credit; a wrong nominal also loses credit.

The evaluator and golden updates passed 15 focused hole-pattern tests, all 23 refactor-golden cases, the exact grid-plate golden, ruff, mypy, and the source-complexity guard locally. A fresh independent review checked the final parent diff and its merge into #2174, found no concrete defect, and verified ADR 1–5 fit. The current exact-head CI is the merge gate.

@pzfreo
pzfreo merged commit 09bafdf into main Oct 3, 2026
19 checks passed
@pzfreo
pzfreo deleted the fix/single-pitch-label branch October 3, 2026 22:44
pzfreo added a commit that referenced this pull request Oct 4, 2026
pzfreo added a commit that referenced this pull request Oct 4, 2026
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