Skip to content

feat: implement G32/G33 routed circle canned cycles#305

Open
rampageservices wants to merge 1 commit intogerbv:developfrom
SourceParts:feat/excellon-g32-g33-routed-circle
Open

feat: implement G32/G33 routed circle canned cycles#305
rampageservices wants to merge 1 commit intogerbv:developfrom
SourceParts:feat/excellon-g32-g33-routed-circle

Conversation

@rampageservices
Copy link
Copy Markdown
Contributor

Summary

  • Implement G32 (CW routed circle) and G33 (CCW routed circle) Excellon canned cycle commands
  • Add drill_add_circle_segment() that creates full 360° arc nets with cirseg data, reusing gerbv's existing arc rendering infrastructure
  • Add stats counters, UI display, and regression test with golden image

Closes partially: #297 (G32/G33 items)

Details

G32/G33 route a full circle where the current tool position is on the circle and the X/Y parameters specify the center. Radius is implicit from distance(tool_position, center).

The implementation:

  1. Saves the current position (point on circle)
  2. Parses the center coordinates
  3. Creates an arc net with start == stop, angle2 = angle1 ± 360°
  4. Restores the tool position (full circle returns to start)

Test plan

  • cmake --build build — clean build, zero warnings
  • ./build/src/gerbv test/inputs/test-drill-routed-circle.exc — visual: two circles side by side
  • ctest — all drill tests pass (new + existing)
  • Visual inspection in gerbv GUI

Add support for Excellon G32 (CW routed circle) and G33 (CCW routed
circle) canned cycle commands. The tool position is on the circle and
the X/Y parameters specify the center. Radius is implicit from the
distance between the two points.

- Add drill_add_circle_segment() for creating full 360-degree arc nets
- Parse center coordinates after G32/G33 and dispatch to circle handler
- Add G32/G33 stats counters to gerbv_drill_stats_t
- Display G32/G33 in the drill statistics UI
- Add regression test with CW and CCW circles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants