[Panelize][Added] Rail widener for pick-and-place sensor detection - #954
[Panelize][Added] Rail widener for pick-and-place sensor detection#954Reid-n0rc wants to merge 4 commits into
Conversation
Adds framing.widenercorners/widenerwidth/widenerlength/widenergap options to add solid corner patches to the panel rail, giving pick-and-place photoelectric sensors a bigger flat target without growing the panel's outer outline. Implemented as a KiKit FramingPlugin (kibot/panelize_plugins/ rail_widener.py) that delegates to KiKit's own framing builder for the base rail/frame, then adds a gap-clipped patch per requested corner plus an exact tangent-arc fillet matching framing.fillet at the new step corner. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
widenercorners/widenerwidth/widenerlength/widenergap were added to out_panelize.py but the generated RST docs hadn't been refreshed yet.
|
Hi @Reid-n0rc !
|
buildDummyFramingSubstrates() returned the board substrates unchanged instead of KiKit's own offset dummy rail boundary, so fixed/spacing tab building had no target to grow tabs towards and silently produced zero tabs (and thus zero mouse bites) whenever a *+widener framing type was selected. Separately, the frame/tightframe corner-separation cuts KiKit builds before the widener runs are sized to the plain rail width, so mouse bites along them stopped well short of the widened corner patch. Extend whichever cut touches each widened corner to match the patch's actual extent. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Hi @Reid-n0rc ! Please address these items. Also: if the plug-in was created using Claude assistance please mention it.
|
…ression test Addresses review feedback on the rail widener (INTI-CMNB#954): - Docs now state widenercorners overwrites type/code/arg, and config() errors out if the user also sets code/arg explicitly instead of silently overwriting them. - Keep PanelDemo_4x4.kibot.yaml unmodified so the base panelize example doesn't depend on the widener; the demo now lives in its own tests/yaml_samples/panelize_widener_1.kibot.yaml. - Add test_panelize_widener_1, using the simple simple_2layer board instead of light_control to keep the reference cheap to maintain. - While wiring up that test, found widenercorners/widenerwidth/ widenerlength/widenergap were leaking into the JSON preset handed to the kikit CLI (which doesn't know those keys) and made the plugin path fail; they're now excluded once folded into arg. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Thanks for the review, @set-soft! Addressed in 371b69c:
While wiring up that test I actually caught a real bug: Also, yes — Claude assistance was used throughout this PR (implementation and this round of fixes), noted via |
Closes #953
Summary
Adds a "rail widener" to the
panelizeoutput: a solid patch of extra rail/frame material at chosen outer panel corners (tl/tr/bl/br), so pick-and-place photoelectric sensors get a bigger flat target without growing the panel's outer outline or ever overlapping a board.framing.widenercorners/widenerwidth/widenerlength/widenergapoptions, valid forframing.typerailstb/railslr/frame/tightframe.FramingPlugin(kibot/panelize_plugins/rail_widener.py) that delegates to KiKit's own framing builder for the requested basetype, then unions in the corner patch(es).widenergap, defaulting to the frame'shspace/vspace) so it can never touch/overlap a board, with an extra allowance for KiKit's own reverse-tab-fillet pass so the gap that survives matches what was requested.framing.fillet), computed directly from the corner/step geometry so it only affects that one point.PanelDemo_4x4.kibot.yamlto demonstrate widening the top corners.PanelizeFramingdocs for the new options.Test plan
railstbframing) throughkibotand inspected the generated panel/preview: widened patches appear at the requested corners, never overlap the boards, and don't grow the panel outline.widenercornerson all four corners at once, and with a widenerwidth/lengthdeep enough that it would otherwise overlap a board, confirming the clip.tests/test_plot/— happy to add one if you can point me at the preferred board sample/pattern for panelize tests (I noticedtests/board_samples/*/light_control.kicad_pcbis used for other panelize tests).