CNC Course (10) Mastering Arcs with the R-Value Method

🎥 Video


📝 Overview

CNC Course (10) picks up right where Part 1 left off — with the answer to the quiz question posed at the end of the previous lesson — then goes deeper into the R (radius) method for programming arcs with G2 and G3. While Part 1 focused on the I and J center-offset method, this lesson makes the case for when R is the simpler, faster choice. The R method lets you define an arc with just a radius value instead of calculating the distance from the start point to the arc center, making it ideal for straightforward arcs that don’t exceed 180°. The video works through practical examples, explains the critical difference between positive and negative R values, and clearly defines the one situation where R fails entirely: full 360° circles.


🧠 Part 1 Quiz Answer

At the end of CNC Course (9), viewers were asked: “If you want to cut a counterclockwise arc from (0,0) to (10,0) with a center at (5,0), what command do you use?”

The answer: G3 X10 Y0 I5 J0 F400

Why: G3 = counterclockwise. The end point is X10 Y0. The center is 5 units in the positive X direction from the start, so I=5, J=0. Feedrate is F400. This is also a perfect semicircle with radius 5.

; Part 1 Quiz Answer
G0 X0 Y0          ; Rapid to start position
G3 X10 Y0 I5 J0 F400  ; CCW semicircle, center at (5,0), radius 5

📌 What You’ll Learn

  • Why the R method is simpler than I/J for many arcs
  • The exact syntax for G2 and G3 with R
  • How positive R selects the minor arc (≤ 180°)
  • How negative R selects the major arc (> 180°)
  • Why R cannot be used to program a full 360° circle
  • How to choose between R and I/J for any given arc
  • Real worked examples using both positive and negative R values
  • How GRBL handles R-method arcs and what to watch for

📂 Tools & Software Used

  • 3018-style CNC router (or any GRBL-based machine)
  • Candle (GRBL Control) — free CNC sender software: github.com/Denvi/Candle
  • GRBL firmware v1.1+
  • Text editor (Notepad, VS Code, or similar)
  • NCViewer.com — free online G-code simulator for verifying arc paths: ncviewer.com

📘 Step-by-Step Breakdown

Step 1 — Recall the Syntax: G2/G3 with R

Using R instead of I and J means you only provide the radius — no vector math required. The controller figures out the arc geometry from the start point, end point, and radius value.

Syntax:

G2 X[end_x] Y[end_y] R[radius] F[feedrate]  ; Clockwise arc
G3 X[end_x] Y[end_y] R[radius] F[feedrate]  ; Counter-clockwise arc

Key rule: For any given start point, end point, and radius, there are always TWO possible arcs — the short way around (minor arc, ≤180°) and the long way around (major arc, >180°). The sign of R tells the controller which one to cut.

Step 2 — Positive R = Minor Arc (the Short Way)

A positive R value always programs the minor arc — the arc that sweeps less than or equal to 180°. This is the most common use case and works reliably on virtually all GRBL controllers.

Example — CW minor arc from (0,0) to (10,0), radius 5 (a semicircle):

G0 X0 Y0
G2 X10 Y0 R5 F400    ; CW minor arc (semicircle), radius 5

Example — CCW minor arc (quarter circle) from (0,0) to (5,5), radius ~7.07:

G0 X0 Y0
G3 X5 Y5 R7.071 F400  ; CCW quarter arc, radius 7.071

Step 3 — Negative R = Major Arc (the Long Way)

A negative R value tells the controller to take the long route — the major arc that sweeps more than 180°. This is less commonly needed but useful for cutting large curved profiles without re-positioning the tool.

Example — CW major arc from (0,0) to (10,0), same endpoints as Step 2 but taking the long route around:

G0 X0 Y0
G2 X10 Y0 R-5 F400   ; CW MAJOR arc, sweeps >180°, same radius

The radius magnitude is the same (5mm) — only the sign changes, selecting the other possible arc between those two points.

Step 4 — Why R Fails for Full Circles

When the start point and end point are identical (as required for a full 360° circle), the R method is mathematically ambiguous — the controller cannot determine a unique arc. This will cause an error on GRBL.

This WILL NOT work:

G0 X0 Y0
G2 X0 Y0 R10 F400   ; ERROR — start = end, R is ambiguous

For full circles, always use the I/J method from CNC Course (9):

G0 X-10 Y0          ; Start at the left edge of the circle
G2 X-10 Y0 I10 J0 F400  ; Full CW circle, center is 10 units to the right

Step 5 — I/J vs R: When to Use Each

SituationBest MethodWhy
Simple arcs ≤ 180°RFaster to write; no vector math
Major arcs > 180°R (negative) or I/JBoth work; I/J more reliable
Full 360° circlesI/J onlyR is undefined for start = end
Reading CAM outputI/JCAM tools almost always output I/J
Maximum controller compatibilityI/JUniversally supported

Step 6 — Putting It Together: A Multi-Arc Program

Real CNC programs combine G0, G1, G2, and G3 moves. Here’s a complete example that cuts a rounded rectangular slot using both R-method arcs and linear moves:

; === Rounded Rectangle Slot, 30x10mm, R5 corners ===
G17 G21 G90       ; XY plane, metric, absolute
G0 Z5             ; Safe height
G0 X5 Y0          ; Rapid to start (bottom-left arc start)
G1 Z-2 F100       ; Plunge to depth

; Bottom edge
G1 X25 Y0 F400    ; Linear move across bottom

; Bottom-right corner (CW arc)
G2 X30 Y5 R5 F400

; Right edge
G1 X30 Y5

; Top-right corner (CW arc)
G2 X25 Y10 R5 F400

; Top edge (reverse direction)
G1 X5 Y10

; Top-left corner (CW arc)
G2 X0 Y5 R5 F400

; Left edge
G1 X0 Y5

; Bottom-left corner (CW arc)
G2 X5 Y0 R5 F400

G0 Z5             ; Retract
M5                ; Spindle off

⚙️ G-Code Quick Reference

G-Code / ParameterMeaningNotes
G2 R[n]Clockwise arc, radius nPositive R = minor arc
G3 R[n]Counter-clockwise arc, radius nPositive R = minor arc
G2 R[-n]Clockwise arc, major routeNegative R = major arc (>180°)
G3 R[-n]CCW arc, major routeNegative R = major arc (>180°)
G2 I[n] J[n]CW arc, center-offset methodUse for full circles
G3 I[n] J[n]CCW arc, center-offset methodUse for full circles
; === R Method Examples ===
G17 G21 G90           ; Setup

; Minor arc (positive R)
G0 X0 Y0
G1 Z-1 F100
G2 X10 Y0 R5 F400     ; CW semicircle

; Major arc (negative R)
G0 Z5
G0 X0 Y0
G1 Z-1 F100
G2 X10 Y0 R-5 F400    ; CW major arc (long route)

; Full circle — use I/J, NOT R
G0 Z5
G0 X-10 Y0
G1 Z-1 F100
G2 X-10 Y0 I10 J0 F400  ; Full circle, R method would fail here

G0 Z5
M5

⚠️ Safety Notes

  • Always test R-method arcs in NCViewer before running on the machine — the major arc path (negative R) often surprises beginners by cutting in a very different direction than expected.
  • Never assume a positive R always cuts the arc you visualized. Verify the direction (G2 vs G3) and arc size (minor vs major) together, not separately.
  • Do not use R for arcs where the start and end points are very close together but the radius is large — small rounding errors can cause the controller to select the wrong arc or throw an error.
  • Keep feedrates conservative (F200–F300) when testing new arc programs on a 3018 router.
  • Always retract to a safe Z height before rapid-moving to the next arc start point.

💡 Tips & Best Practices

  • When sketching an arc path on paper, mark the start point, end point, and center — then measure I and J from start to center. This makes it easy to switch from R to I/J if needed.
  • Use NCViewer.com to simulate every multi-arc program before cutting. The 3D view makes it immediately obvious if an arc is going the wrong way.
  • The R method shines for rounded rectangle corners, fillet arcs, and any simple curve where the arc is clearly less than 180°.
  • If you get a GRBL “Invalid arc” error, the most likely cause is that the radius is too small to reach the end point — double-check your geometry.
  • Think of positive R as “take the shortcut” and negative R as “take the scenic route” around the same two points.
  • In professional CNC programming, I/J is the industry standard. Learn R as a convenience shortcut, but build your foundational skills on I/J.

🔑 Key Takeaways

  • Positive R = minor arc (≤ 180°) — the short path between two points
  • Negative R = major arc (> 180°) — the long path between the same two points
  • R method cannot program full 360° circles — use I/J for that
  • The R method requires no vector math, making it faster to write for simple arcs
  • G2 vs G3 (direction) and R sign (arc size) are independent choices — get both right
  • When in doubt or working with full circles, the I/J method is always more reliable

🏁 Conclusion

With both I/J and R firmly in your G-code toolkit, you can now program virtually any 2D arc or circular path by hand. Part 1 gave you the precise, universally-compatible I/J center-offset method. Part 2 gives you the R shortcut for quick, clean arc programming when geometry is simple. Knowing when to reach for each one — and why R hits a hard wall with full circles — separates confident G-code programmers from beginners who rely entirely on CAM software. Practice the rounded rectangle example above in NCViewer, then try it on scrap material. CNC Course (11) is coming up next — stay tuned.


🔗 Related Lessons

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *