feat: implement Excellon G87 routed slot canned cycle#300
feat: implement Excellon G87 routed slot canned cycle#300rampageservices wants to merge 1 commit intogerbv:developfrom
Conversation
G87 is a routed slot canned cycle that some CAD tools emit instead of G85. Unlike G85 which modifies an existing drill flash into a drilled slot, G87 creates a new routed line segment from the current position to the parsed end coordinate, using drill_add_route_segment(). - Parse G87 and dispatch in the G-code switch (drill.c) - Add G87 stats counter to gerbv_drill_stats_t (gerbv.h) - Accumulate G87 stats across layers (drill_stats.c) - Display G87 in the drill analysis stats UI (callbacks.c) - Add test file with horizontal and vertical routed slots
|
Upstream dependencies:
|
Test file format inconsistency — first coordinate pair is silently discardedThe G85 (drilled slot) test file uses the pattern: The PR description states G87 "works like G85 (slot from current XY to end XY)". Consistent with that, the correct G87 test file format would be: But the test file uses: Inside Result: the slot runs from For a horizontal slot from (10mm, 10mm) to (20mm, 10mm), the test file should either:
|
Summary
drill_add_route_segment()instead of modifying an existing drill flashChanges
src/drill.c— Parsecase 87:indrill_parse_G_code()stats; addcase DRILL_G_ROUTSLOT:handler that reads end-point coordinates and callsdrill_add_route_segment()src/gerbv.h— Addint G87counter togerbv_drill_stats_tsrc/drill_stats.c— Accumulate G87 stats across layerssrc/callbacks.c— Display G87 row in drill analysis stats UItest/inputs/test-drill-routed-slot.exc— Test file with horizontal and vertical G87 routed slots using two tool sizestest/golden/test-drill-routed-slot.png— Golden reference imageTest plan
cmake --build buildcompiles cleanly with no warningscd build && ctest— newtest-drill-routed-slotpasses, no existing test regressions./build/src/gerbv test/inputs/test-drill-routed-slot.excrenders two routed slots (one horizontal, one vertical)