-
-
Notifications
You must be signed in to change notification settings - Fork 54
Excellon parser: missing G-code and M-code support #297
Copy link
Copy link
Open
Description
Summary
The Excellon drill parser (src/drill.c) defines many G-codes and M-codes in its enums (drill_g_code_t, drill_m_code_t) but only handles a subset. Commands that are parsed but not handled fall through to "unsupported" error messages, and commands not even parsed are silently ignored or reported as unknown.
This issue tracks the gap between what the parser defines and what it actually handles, prioritized by real-world impact.
G-codes
Handled
| Code | Name | Notes |
|---|---|---|
| G00 | Rout mode / rapid positioning | Route mode state |
| G01 | Linear routing move | Route mode state (added in #283) |
| G02 | Circular CW arc routing | Merged in #298 (I/J offsets), pending #345 (A radius) |
| G03 | Circular CCW arc routing | Merged in #298 (I/J offsets), pending #345 (A radius) |
| G05 | Drill mode | Default mode |
| G32 | Routed circle CW canned cycle | Pending #305 |
| G33 | Routed circle CCW canned cycle | Pending #305 |
| G85 | Canned slot (drilled) | Parses end coords |
| G87 | Routed slot canned cycle | Pending #300 |
| G90 | Absolute mode | Coordinate mode |
| G91 | Incremental mode | Coordinate mode |
| G93 | Zero set | Origin offset |
Handled (ignored — machine-only, no visual effect)
| Code | Name | Notes |
|---|---|---|
| G07 | Override tool feed/speed | Pending #306 |
| G34-G39 | Vision system commands | Pending #306 |
| G40-G42 | Cutter compensation | Pending #306 |
| G45-G48 | Vision offset relative | Pending #306 |
| G81-G84 | Package canned cycles (DIP, etc.) | Pending #306 |
M-codes
Handled
| Code | Name | Notes |
|---|---|---|
| M00 | End of program | |
| M01 | Pattern end | Pending #304 (currently stats-only) |
| M02 | Repeat pattern offset | Pending #304 |
| M14 | Z-axis route position (depth ctrl) | |
| M15 | Z-axis route position (tool down) | |
| M16 | Retract with clamping (tool up) | |
| M17 | Retract without clamping (tool up) | |
| M18 | Tool tip check | |
| M25 | Pattern start | Pending #304 (currently stats-only) |
| M30 | End + rewind | |
| M45 | Long message | |
| M47 | Message | |
| M48 | Header start | |
| M70 | Swap axis | Pending #301 |
| M71 | Metric | |
| M72 | Imperial | |
| M80 | Mirror X | Pending #301 |
| M90 | Mirror Y | Pending #301 |
| M95 | Header end | |
| M97/M98 | Canned text X/Y |
Handled (ignored — machine-only, no visual effect)
| Code | Name | Notes |
|---|---|---|
| M06 | Optional stop | Pending #306 |
| M08 | Step and repeat end | Pending #306 |
| M09 | Stop for inspection | Pending #306 |
| M50-M52 | Visual step and repeat | Pending #306 |
| M60-M61 | Reference scaling | Pending #306 |
| M62-M63 | Peck drilling | Pending #306 |
Defined but NOT handled
| Code | Name | Impact |
|---|---|---|
| M99 | User defined pattern | Low |
Progress
- G02/G03 arc routing (I/J offsets) — Merged in fix: support Excellon G02/G03 arc routing with I/J center offsets #298. CW/CCW arc commands with I/J center offsets, reusing the Gerber
calc_cirseg_mqalgorithm. - G02/G03 arc routing (A radius) — PR fix: support A (radius) parameter for Excellon G02/G03 arcs #345 (open). Adds
Aradius parameter support as an alternative to I/J offsets, converting radius to center offsets via chord geometry. - G87 routed slot canned cycle — PR feat: implement Excellon G87 routed slot canned cycle #300 (open). Creates routed line segments via
drill_add_route_segment()instead of modifying drill flashes like G85. - M70/M80/M90 axis transforms — PR feat: implement Excellon M70/M80/M90 axis transform commands #301 (open). Swap axis and mirror commands affect coordinate interpretation for bottom-side drill files.
- M25/M01/M02 pattern repeat — PR feat: implement Excellon M25/M01/M02 pattern repeat #304 (open). M25 begins pattern recording, M01 ends it, M02 replays buffered drills and route segments at X/Y offset.
- G32/G33 routed circle — PR feat: implement G32/G33 routed circle canned cycles #305 (open). Full 360° CW/CCW circle canned cycles using
drill_add_circle_segment()with cirseg arc data. - Machine-only codes acknowledged — PR Acknowledge machine-only Excellon G/M-codes #306 (open). 17 G-codes and 10 M-codes logged at NOTE level with grouped stats counters.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels