Skip to content

Fix Subaru DSD435 asymmetric cut count (4 top / 5 bottom) - #1

Closed
ellygaytor wants to merge 1 commit into
mainfrom
claude/brave-clarke-hruuv8
Closed

Fix Subaru DSD435 asymmetric cut count (4 top / 5 bottom)#1
ellygaytor wants to merge 1 commit into
mainfrom
claude/brave-clarke-hruuv8

Conversation

@ellygaytor

@ellygaytor ellygaytor commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Summary

The DSD: 435 spec (Subaru Forester / XV Crosstrek, TOY48P) lists the example bitting with 4 cuts on the top track (1 2 3 1) and 5 cuts on the bottom (3 2 1 3 2) — 9 cuts total, not 10. The current Subaru config declares "10 cuts/TOY48P", which forces the user to enter a phantom 5th cut on the top track that doesn't exist on a real key.

Changes

  • Subaru outline → "9 cuts/TOY48P", plus a new topCutCount: 4 field on the config so the renderer knows the top track is shorter than the bottom.
  • drawInternalCutPinsWithUnderline no longer assumes pins.length / 2 cuts per side. It now reads topCutCount from the key config (falling back to an even split for keys that don't set it) and evaluates the two milled tracks independently, so the top groove ends after cut 4 while the bottom continues to cut 5.

Test plan

  • Pick Subaru → 9 cuts/TOY48P → Decode and confirm 4 number cells appear on the top row, 5 on the bottom.
  • Step through every cut with SEL and confirm the underline cursor advances through all 9 positions (4 top, then 5 bottom).
  • Enter a bitting and confirm the rendered blade shows 4 cut features on the top milled track and 5 on the bottom.
  • Try Random mode and verify it generates 9 cuts in the 1–3 range.
  • Sanity-check another internal-cut key (none others currently use topCutCount) — the even-split fallback should keep their rendering unchanged.

Generated by Claude Code

DSD 435 is a 9-cut bitting (4 on the top track, 5 on the bottom),
not 10 cuts as the previous config assumed. Drop the phantom 5th
top cut and teach drawInternalCutPinsWithUnderline to handle a
keyConfig.topCutCount that differs from pins.length / 2, so the
rendered blade ends the top groove at the 4th cut while the bottom
groove continues to the 5th.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UwD1dmEjBVYQdvQW21wV4d
@ellygaytor ellygaytor closed this Jun 16, 2026
@ellygaytor
ellygaytor deleted the claude/brave-clarke-hruuv8 branch June 16, 2026 21:57
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.

2 participants