Commit a4cfe12
fix(schematic): an import steps over occupied slots, not over a count
The reserve for a pin that could not be measured was a bare count. It
said how many slots to step past, not which coordinates were occupied,
so a single-label import cleared the pin and a multi-label import walked
straight onto it. That is the same defect this PR's first round fixed for
the pins that could be measured, left in place for the pins that could
not.
Every pin that might occupy a slot on the edge now contributes its actual
slot, and the generator steps over any slot already taken. The rule is
unchanged: the stack continues after the furthest pin genuinely on the
edge, and gaps below it are still not filled.
A stranded pin also contributes the slot KiCad would clamp it onto. A pin
past the end of an edge does not stay there, and on an edge whose length
is an exact number of slots that corner is a slot an import would
otherwise take.
Edge capacity now carries the same slack as the slot arithmetic. A span
is a subtraction, so an edge that is an exact number of slots long rarely
divides to an integer: (50.0 + 5.08) - 50.0 is 5.079999999999998, and an
untoleranced floor() called that two-slot edge one. The undercount was
not cosmetic — it decided which pins counted as being on the edge, so it
stranded a valid last-slot pin and let an import write over it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent d82c2d8 commit a4cfe12
3 files changed
Lines changed: 315 additions & 25 deletions
0 commit comments