Browse Source

CNC workspace planes and 'P' argument for G2/G3

Scott Lahteine 7 years ago
parent
commit
80a232419d
27 changed files with 370 additions and 137 deletions
  1. 2
    2
      .travis.yml
  2. 10
    4
      Marlin/Configuration_adv.h
  3. 120
    39
      Marlin/Marlin_main.cpp
  4. 8
    0
      Marlin/enum.h
  5. 10
    4
      Marlin/example_configurations/Cartesio/Configuration_adv.h
  6. 10
    4
      Marlin/example_configurations/Felix/Configuration_adv.h
  7. 10
    4
      Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h
  8. 10
    4
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  9. 10
    4
      Marlin/example_configurations/Hephestos_2/Configuration_adv.h
  10. 10
    4
      Marlin/example_configurations/K8200/Configuration_adv.h
  11. 10
    4
      Marlin/example_configurations/K8400/Configuration_adv.h
  12. 10
    4
      Marlin/example_configurations/M150/Configuration_adv.h
  13. 10
    4
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  14. 10
    4
      Marlin/example_configurations/SCARA/Configuration_adv.h
  15. 10
    4
      Marlin/example_configurations/TAZ4/Configuration_adv.h
  16. 10
    4
      Marlin/example_configurations/TinyBoy2/Configuration_adv.h
  17. 10
    4
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  18. 10
    4
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h
  19. 10
    4
      Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h
  20. 10
    4
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  21. 10
    4
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  22. 10
    4
      Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h
  23. 10
    4
      Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h
  24. 10
    4
      Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h
  25. 10
    4
      Marlin/example_configurations/makibox/Configuration_adv.h
  26. 10
    4
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  27. 10
    4
      Marlin/example_configurations/wt150/Configuration_adv.h

+ 2
- 2
.travis.yml View File

@@ -72,14 +72,14 @@ script:
72 72
   - build_marlin
73 73
   #
74 74
   # Test 2 extruders (one MAX6675) and heated bed on basic RAMPS 1.4
75
-  #  plus a "Fix Mounted" Probe with Safe Homing
75
+  #  plus a "Fix Mounted" Probe with Safe Homing and some arc options
76 76
   #
77 77
   - opt_set MOTHERBOARD BOARD_RAMPS_14_EEB
78 78
   - opt_set EXTRUDERS 2
79 79
   - opt_set TEMP_SENSOR_0 -2
80 80
   - opt_set TEMP_SENSOR_1 1
81 81
   - opt_set TEMP_SENSOR_BED 1
82
-  - opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING
82
+  - opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES
83 83
   - build_marlin
84 84
   #
85 85
   # ...with AUTO_BED_LEVELING_LINEAR, Z_MIN_PROBE_REPEATABILITY_TEST, and DEBUG_LEVELING_FEATURE

+ 10
- 4
Marlin/Configuration_adv.h View File

@@ -678,10 +678,16 @@
678 678
 
679 679
 // @section extras
680 680
 
681
-// Arc interpretation settings:
682
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
683
-#define MM_PER_ARC_SEGMENT 1
684
-#define N_ARC_CORRECTION 25
681
+//
682
+// G2/G3 Arc Support
683
+//
684
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
685
+#if ENABLED(ARC_SUPPORT)
686
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
687
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
688
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
689
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
690
+#endif
685 691
 
686 692
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
687 693
 //#define BEZIER_CURVE_SUPPORT

+ 120
- 39
Marlin/Marlin_main.cpp View File

@@ -54,6 +54,9 @@
54 54
  * G10  - Retract filament according to settings of M207
55 55
  * G11  - Retract recover filament according to settings of M208
56 56
  * G12  - Clean tool
57
+ * G17  - Select Plane XY (Requires CNC_WORKSPACE_PLANES)
58
+ * G18  - Select Plane ZX (Requires CNC_WORKSPACE_PLANES)
59
+ * G19  - Select Plane YZ (Requires CNC_WORKSPACE_PLANES)
57 60
  * G20  - Set input units to inches
58 61
  * G21  - Set input units to millimeters
59 62
  * G26  - Mesh Validation Pattern (Requires UBL_G26_MESH_VALIDATION)
@@ -688,6 +691,10 @@ static bool send_ok[BUFSIZE];
688 691
   millis_t lastUpdateMillis;
689 692
 #endif
690 693
 
694
+#if ENABLED(CNC_WORKSPACE_PLANES)
695
+  static WorkspacePlane workspace_plane = PLANE_XY;
696
+#endif
697
+
691 698
 FORCE_INLINE float pgm_read_any(const float *p) { return pgm_read_float_near(p); }
692 699
 FORCE_INLINE signed char pgm_read_any(const signed char *p) { return pgm_read_byte_near(p); }
693 700
 
@@ -3264,6 +3271,9 @@ inline void gcode_G0_G1(
3264 3271
  *    X or Y must differ from the current XY.
3265 3272
  *    Mixing R with I or J will throw an error.
3266 3273
  *
3274
+ *  - P specifies the number of full circles to do
3275
+ *    before the specified arc move.
3276
+ *
3267 3277
  *  Examples:
3268 3278
  *
3269 3279
  *    G2 I10           ; CW circle centered at X+10
@@ -3288,27 +3298,39 @@ inline void gcode_G0_G1(
3288 3298
       float arc_offset[2] = { 0.0, 0.0 };
3289 3299
       if (parser.seen('R')) {
3290 3300
         const float r = parser.value_linear_units(),
3291
-                    x1 = current_position[X_AXIS], y1 = current_position[Y_AXIS],
3292
-                    x2 = destination[X_AXIS], y2 = destination[Y_AXIS];
3293
-        if (r && (x2 != x1 || y2 != y1)) {
3301
+                    p1 = current_position[X_AXIS], q1 = current_position[Y_AXIS],
3302
+                    p2 = destination[X_AXIS], q2 = destination[Y_AXIS];
3303
+        if (r && (p2 != p1 || q2 != q1)) {
3294 3304
           const float e = clockwise ^ (r < 0) ? -1 : 1,           // clockwise -1/1, counterclockwise 1/-1
3295
-                      dx = x2 - x1, dy = y2 - y1,                 // X and Y differences
3305
+                      dx = p2 - p1, dy = q2 - q1,                 // X and Y differences
3296 3306
                       d = HYPOT(dx, dy),                          // Linear distance between the points
3297 3307
                       h = SQRT(sq(r) - sq(d * 0.5)),              // Distance to the arc pivot-point
3298
-                      mx = (x1 + x2) * 0.5, my = (y1 + y2) * 0.5, // Point between the two points
3308
+                      mx = (p1 + p2) * 0.5, my = (q1 + q2) * 0.5, // Point between the two points
3299 3309
                       sx = -dy / d, sy = dx / d,                  // Slope of the perpendicular bisector
3300 3310
                       cx = mx + e * h * sx, cy = my + e * h * sy; // Pivot-point of the arc
3301
-          arc_offset[X_AXIS] = cx - x1;
3302
-          arc_offset[Y_AXIS] = cy - y1;
3311
+          arc_offset[0] = cx - p1;
3312
+          arc_offset[1] = cy - q1;
3303 3313
         }
3304 3314
       }
3305 3315
       else {
3306
-        if (parser.seen('I')) arc_offset[X_AXIS] = parser.value_linear_units();
3307
-        if (parser.seen('J')) arc_offset[Y_AXIS] = parser.value_linear_units();
3316
+        if (parser.seen('I')) arc_offset[0] = parser.value_linear_units();
3317
+        if (parser.seen('J')) arc_offset[1] = parser.value_linear_units();
3308 3318
       }
3309 3319
 
3310 3320
       if (arc_offset[0] || arc_offset[1]) {
3311
-        // Send an arc to the planner
3321
+
3322
+        #if ENABLED(ARC_P_CIRCLES)
3323
+          // P indicates number of circles to do
3324
+          int8_t circles_to_do = parser.seen('P') ? parser.value_byte() : 0;
3325
+          if (!WITHIN(circles_to_do, 0, 100)) {
3326
+            SERIAL_ERROR_START();
3327
+            SERIAL_ERRORLNPGM(MSG_ERR_ARC_ARGS);
3328
+          }
3329
+          while (circles_to_do--)
3330
+            plan_arc(current_position, arc_offset, clockwise);
3331
+        #endif
3332
+
3333
+        // Send the arc to the planner
3312 3334
         plan_arc(destination, arc_offset, clockwise);
3313 3335
         refresh_cmd_timeout();
3314 3336
       }
@@ -3408,6 +3430,25 @@ inline void gcode_G4() {
3408 3430
   }
3409 3431
 #endif
3410 3432
 
3433
+#if ENABLED(CNC_WORKSPACE_PLANES)
3434
+
3435
+  void report_workspace_plane() {
3436
+    SERIAL_ECHO_START();
3437
+    SERIAL_ECHOPGM("Workspace Plane ");
3438
+    serialprintPGM(workspace_plane == PLANE_YZ ? PSTR("YZ\n") : workspace_plane == PLANE_ZX ? PSTR("ZX\n") : PSTR("XY\n"));
3439
+  }
3440
+
3441
+  /**
3442
+   * G17: Select Plane XY
3443
+   * G18: Select Plane ZX
3444
+   * G19: Select Plane YZ
3445
+   */
3446
+  inline void gcode_G17() { workspace_plane = PLANE_XY; }
3447
+  inline void gcode_G18() { workspace_plane = PLANE_ZX; }
3448
+  inline void gcode_G19() { workspace_plane = PLANE_YZ; }
3449
+
3450
+#endif // CNC_WORKSPACE_PLANES
3451
+
3411 3452
 #if ENABLED(INCH_MODE_SUPPORT)
3412 3453
   /**
3413 3454
    * G20: Set input mode to inches
@@ -3722,6 +3763,10 @@ inline void gcode_G28(const bool always_home_all) {
3722 3763
     set_bed_leveling_enabled(false);
3723 3764
   #endif
3724 3765
 
3766
+  #if ENABLED(CNC_WORKSPACE_PLANES)
3767
+    workspace_plane = PLANE_XY;
3768
+  #endif
3769
+
3725 3770
   // Always home with tool 0 active
3726 3771
   #if HOTENDS > 1
3727 3772
     const uint8_t old_tool_index = active_extruder;
@@ -10311,6 +10356,18 @@ void process_next_command() {
10311 10356
           break;
10312 10357
       #endif // NOZZLE_CLEAN_FEATURE
10313 10358
 
10359
+      #if ENABLED(CNC_WORKSPACE_PLANES)
10360
+        case 17: // G17: Select Plane XY
10361
+          gcode_G17();
10362
+          break;
10363
+        case 18: // G18: Select Plane ZX
10364
+          gcode_G18();
10365
+          break;
10366
+        case 19: // G19: Select Plane YZ
10367
+          gcode_G19();
10368
+          break;
10369
+      #endif // CNC_WORKSPACE_PLANES
10370
+
10314 10371
       #if ENABLED(INCH_MODE_SUPPORT)
10315 10372
         case 20: //G20: Inch Mode
10316 10373
           gcode_G20();
@@ -11922,6 +11979,12 @@ void prepare_move_to_destination() {
11922 11979
 }
11923 11980
 
11924 11981
 #if ENABLED(ARC_SUPPORT)
11982
+
11983
+  #if N_ARC_CORRECTION < 1
11984
+    #undef N_ARC_CORRECTION
11985
+    #define N_ARC_CORRECTION 1
11986
+  #endif
11987
+
11925 11988
   /**
11926 11989
    * Plan an arc in 2 dimensions
11927 11990
    *
@@ -11936,26 +11999,36 @@ void prepare_move_to_destination() {
11936 11999
     float *offset,       // Center of rotation relative to current_position
11937 12000
     uint8_t clockwise    // Clockwise?
11938 12001
   ) {
12002
+    #if ENABLED(CNC_WORKSPACE_PLANES)
12003
+      AxisEnum p_axis, q_axis, l_axis;
12004
+      switch (workspace_plane) {
12005
+        case PLANE_XY: p_axis = X_AXIS; q_axis = Y_AXIS; l_axis = Z_AXIS; break;
12006
+        case PLANE_ZX: p_axis = Z_AXIS; q_axis = X_AXIS; l_axis = Y_AXIS; break;
12007
+        case PLANE_YZ: p_axis = Y_AXIS; q_axis = Z_AXIS; l_axis = X_AXIS; break;
12008
+      }
12009
+    #else
12010
+      constexpr AxisEnum p_axis = X_AXIS, q_axis = Y_AXIS, l_axis = Z_AXIS;
12011
+    #endif
11939 12012
 
11940
-    float r_X = -offset[X_AXIS],  // Radius vector from center to current location
11941
-          r_Y = -offset[Y_AXIS];
12013
+    // Radius vector from center to current location
12014
+    float r_P = -offset[0], r_Q = -offset[1];
11942 12015
 
11943
-    const float radius = HYPOT(r_X, r_Y),
11944
-                center_X = current_position[X_AXIS] - r_X,
11945
-                center_Y = current_position[Y_AXIS] - r_Y,
11946
-                rt_X = logical[X_AXIS] - center_X,
11947
-                rt_Y = logical[Y_AXIS] - center_Y,
11948
-                linear_travel = logical[Z_AXIS] - current_position[Z_AXIS],
12016
+    const float radius = HYPOT(r_P, r_Q),
12017
+                center_P = current_position[p_axis] - r_P,
12018
+                center_Q = current_position[q_axis] - r_Q,
12019
+                rt_X = logical[p_axis] - center_P,
12020
+                rt_Y = logical[q_axis] - center_Q,
12021
+                linear_travel = logical[l_axis] - current_position[l_axis],
11949 12022
                 extruder_travel = logical[E_AXIS] - current_position[E_AXIS];
11950 12023
 
11951 12024
     // CCW angle of rotation between position and target from the circle center. Only one atan2() trig computation required.
11952
-    float angular_travel = ATAN2(r_X * rt_Y - r_Y * rt_X, r_X * rt_X + r_Y * rt_Y);
12025
+    float angular_travel = ATAN2(r_P * rt_Y - r_Q * rt_X, r_P * rt_X + r_Q * rt_Y);
11953 12026
     if (angular_travel < 0) angular_travel += RADIANS(360);
11954 12027
     if (clockwise) angular_travel -= RADIANS(360);
11955 12028
 
11956
-    // Make a circle if the angular rotation is 0
11957
-    if (angular_travel == 0 && current_position[X_AXIS] == logical[X_AXIS] && current_position[Y_AXIS] == logical[Y_AXIS])
11958
-      angular_travel += RADIANS(360);
12029
+    // Make a circle if the angular rotation is 0 and the target is current position
12030
+    if (angular_travel == 0 && current_position[p_axis] == logical[p_axis] && current_position[q_axis] == logical[q_axis])
12031
+      angular_travel = RADIANS(360);
11959 12032
 
11960 12033
     const float mm_of_travel = HYPOT(angular_travel * radius, FABS(linear_travel));
11961 12034
     if (mm_of_travel < 0.001) return;
@@ -11998,7 +12071,7 @@ void prepare_move_to_destination() {
11998 12071
                 cos_T = 1 - 0.5 * sq(theta_per_segment); // Small angle approximation
11999 12072
 
12000 12073
     // Initialize the linear axis
12001
-    arc_target[Z_AXIS] = current_position[Z_AXIS];
12074
+    arc_target[l_axis] = current_position[l_axis];
12002 12075
 
12003 12076
     // Initialize the extruder axis
12004 12077
     arc_target[E_AXIS] = current_position[E_AXIS];
@@ -12007,7 +12080,10 @@ void prepare_move_to_destination() {
12007 12080
 
12008 12081
     millis_t next_idle_ms = millis() + 200UL;
12009 12082
 
12010
-    int8_t count = 0;
12083
+    #if N_ARC_CORRECTION > 1
12084
+      int8_t count = N_ARC_CORRECTION;
12085
+    #endif
12086
+
12011 12087
     for (uint16_t i = 1; i < segments; i++) { // Iterate (segments-1) times
12012 12088
 
12013 12089
       thermalManager.manage_heater();
@@ -12016,28 +12092,33 @@ void prepare_move_to_destination() {
12016 12092
         idle();
12017 12093
       }
12018 12094
 
12019
-      if (++count < N_ARC_CORRECTION) {
12020
-        // Apply vector rotation matrix to previous r_X / 1
12021
-        const float r_new_Y = r_X * sin_T + r_Y * cos_T;
12022
-        r_X = r_X * cos_T - r_Y * sin_T;
12023
-        r_Y = r_new_Y;
12024
-      }
12025
-      else {
12095
+      #if N_ARC_CORRECTION > 1
12096
+        if (--count) {
12097
+          // Apply vector rotation matrix to previous r_P / 1
12098
+          const float r_new_Y = r_P * sin_T + r_Q * cos_T;
12099
+          r_P = r_P * cos_T - r_Q * sin_T;
12100
+          r_Q = r_new_Y;
12101
+        }
12102
+        else
12103
+      #endif
12104
+      {
12105
+        #if N_ARC_CORRECTION > 1
12106
+          count = N_ARC_CORRECTION;
12107
+        #endif
12108
+
12026 12109
         // Arc correction to radius vector. Computed only every N_ARC_CORRECTION increments.
12027 12110
         // Compute exact location by applying transformation matrix from initial radius vector(=-offset).
12028 12111
         // To reduce stuttering, the sin and cos could be computed at different times.
12029 12112
         // For now, compute both at the same time.
12030
-        const float cos_Ti = cos(i * theta_per_segment),
12031
-                    sin_Ti = sin(i * theta_per_segment);
12032
-        r_X = -offset[X_AXIS] * cos_Ti + offset[Y_AXIS] * sin_Ti;
12033
-        r_Y = -offset[X_AXIS] * sin_Ti - offset[Y_AXIS] * cos_Ti;
12034
-        count = 0;
12113
+        const float cos_Ti = cos(i * theta_per_segment), sin_Ti = sin(i * theta_per_segment);
12114
+        r_P = -offset[0] * cos_Ti + offset[1] * sin_Ti;
12115
+        r_Q = -offset[0] * sin_Ti - offset[1] * cos_Ti;
12035 12116
       }
12036 12117
 
12037 12118
       // Update arc_target location
12038
-      arc_target[X_AXIS] = center_X + r_X;
12039
-      arc_target[Y_AXIS] = center_Y + r_Y;
12040
-      arc_target[Z_AXIS] += linear_per_segment;
12119
+      arc_target[p_axis] = center_P + r_P;
12120
+      arc_target[q_axis] = center_Q + r_Q;
12121
+      arc_target[l_axis] += linear_per_segment;
12041 12122
       arc_target[E_AXIS] += extruder_per_segment;
12042 12123
 
12043 12124
       clamp_to_software_endstops(arc_target);

+ 8
- 0
Marlin/enum.h View File

@@ -178,4 +178,12 @@ enum LCDViewAction {
178 178
   };
179 179
 #endif
180 180
 
181
+/**
182
+ * Workspace planes only apply to G2/G3 moves
183
+ * (and "canned cycles" - not a current feature)
184
+ */
185
+#if ENABLED(CNC_WORKSPACE_PLANES)
186
+  enum WorkspacePlane { PLANE_XY, PLANE_ZX, PLANE_YZ };
187
+#endif
188
+
181 189
 #endif // __ENUM_H__

+ 10
- 4
Marlin/example_configurations/Cartesio/Configuration_adv.h View File

@@ -671,10 +671,16 @@
671 671
 
672 672
 // @section extras
673 673
 
674
-// Arc interpretation settings:
675
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
676
-#define MM_PER_ARC_SEGMENT 1
677
-#define N_ARC_CORRECTION 25
674
+//
675
+// G2/G3 Arc Support
676
+//
677
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
678
+#if ENABLED(ARC_SUPPORT)
679
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
680
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
681
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
682
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
683
+#endif
678 684
 
679 685
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
680 686
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/Felix/Configuration_adv.h View File

@@ -671,10 +671,16 @@
671 671
 
672 672
 // @section extras
673 673
 
674
-// Arc interpretation settings:
675
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
676
-#define MM_PER_ARC_SEGMENT 1
677
-#define N_ARC_CORRECTION 25
674
+//
675
+// G2/G3 Arc Support
676
+//
677
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
678
+#if ENABLED(ARC_SUPPORT)
679
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
680
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
681
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
682
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
683
+#endif
678 684
 
679 685
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
680 686
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h View File

@@ -678,10 +678,16 @@
678 678
 
679 679
 // @section extras
680 680
 
681
-// Arc interpretation settings:
682
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
683
-#define MM_PER_ARC_SEGMENT 1
684
-#define N_ARC_CORRECTION 25
681
+//
682
+// G2/G3 Arc Support
683
+//
684
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
685
+#if ENABLED(ARC_SUPPORT)
686
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
687
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
688
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
689
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
690
+#endif
685 691
 
686 692
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
687 693
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

@@ -671,10 +671,16 @@
671 671
 
672 672
 // @section extras
673 673
 
674
-// Arc interpretation settings:
675
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
676
-#define MM_PER_ARC_SEGMENT 1
677
-#define N_ARC_CORRECTION 25
674
+//
675
+// G2/G3 Arc Support
676
+//
677
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
678
+#if ENABLED(ARC_SUPPORT)
679
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
680
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
681
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
682
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
683
+#endif
678 684
 
679 685
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
680 686
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/Hephestos_2/Configuration_adv.h View File

@@ -654,10 +654,16 @@
654 654
 
655 655
 // @section extras
656 656
 
657
-// Arc interpretation settings:
658
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
659
-#define MM_PER_ARC_SEGMENT 1
660
-#define N_ARC_CORRECTION 25
657
+//
658
+// G2/G3 Arc Support
659
+//
660
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
661
+#if ENABLED(ARC_SUPPORT)
662
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
663
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
664
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
665
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
666
+#endif
661 667
 
662 668
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
663 669
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/K8200/Configuration_adv.h View File

@@ -684,10 +684,16 @@
684 684
 
685 685
 // @section extras
686 686
 
687
-// Arc interpretation settings:
688
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
689
-#define MM_PER_ARC_SEGMENT 1
690
-#define N_ARC_CORRECTION 25
687
+//
688
+// G2/G3 Arc Support
689
+//
690
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
691
+#if ENABLED(ARC_SUPPORT)
692
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
693
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
694
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
695
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
696
+#endif
691 697
 
692 698
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
693 699
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/K8400/Configuration_adv.h View File

@@ -671,10 +671,16 @@
671 671
 
672 672
 // @section extras
673 673
 
674
-// Arc interpretation settings:
675
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
676
-#define MM_PER_ARC_SEGMENT 1
677
-#define N_ARC_CORRECTION 25
674
+//
675
+// G2/G3 Arc Support
676
+//
677
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
678
+#if ENABLED(ARC_SUPPORT)
679
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
680
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
681
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
682
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
683
+#endif
678 684
 
679 685
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
680 686
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/M150/Configuration_adv.h View File

@@ -678,10 +678,16 @@
678 678
 
679 679
 // @section extras
680 680
 
681
-// Arc interpretation settings:
682
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
683
-#define MM_PER_ARC_SEGMENT 1
684
-#define N_ARC_CORRECTION 25
681
+//
682
+// G2/G3 Arc Support
683
+//
684
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
685
+#if ENABLED(ARC_SUPPORT)
686
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
687
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
688
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
689
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
690
+#endif
685 691
 
686 692
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
687 693
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/RigidBot/Configuration_adv.h View File

@@ -671,10 +671,16 @@
671 671
 
672 672
 // @section extras
673 673
 
674
-// Arc interpretation settings:
675
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
676
-#define MM_PER_ARC_SEGMENT 1
677
-#define N_ARC_CORRECTION 25
674
+//
675
+// G2/G3 Arc Support
676
+//
677
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
678
+#if ENABLED(ARC_SUPPORT)
679
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
680
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
681
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
682
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
683
+#endif
678 684
 
679 685
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
680 686
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/SCARA/Configuration_adv.h View File

@@ -671,10 +671,16 @@
671 671
 
672 672
 // @section extras
673 673
 
674
-// Arc interpretation settings:
675
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
676
-#define MM_PER_ARC_SEGMENT 1
677
-#define N_ARC_CORRECTION 25
674
+//
675
+// G2/G3 Arc Support
676
+//
677
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
678
+#if ENABLED(ARC_SUPPORT)
679
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
680
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
681
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
682
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
683
+#endif
678 684
 
679 685
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
680 686
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/TAZ4/Configuration_adv.h View File

@@ -671,10 +671,16 @@
671 671
 
672 672
 // @section extras
673 673
 
674
-// Arc interpretation settings:
675
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
676
-#define MM_PER_ARC_SEGMENT 1
677
-#define N_ARC_CORRECTION 25
674
+//
675
+// G2/G3 Arc Support
676
+//
677
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
678
+#if ENABLED(ARC_SUPPORT)
679
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
680
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
681
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
682
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
683
+#endif
678 684
 
679 685
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
680 686
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/TinyBoy2/Configuration_adv.h View File

@@ -674,10 +674,16 @@
674 674
 
675 675
 // @section extras
676 676
 
677
-// Arc interpretation settings:
678
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
679
-#define MM_PER_ARC_SEGMENT 1
680
-#define N_ARC_CORRECTION 25
677
+//
678
+// G2/G3 Arc Support
679
+//
680
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
681
+#if ENABLED(ARC_SUPPORT)
682
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
683
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
684
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
685
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
686
+#endif
681 687
 
682 688
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
683 689
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

@@ -671,10 +671,16 @@
671 671
 
672 672
 // @section extras
673 673
 
674
-// Arc interpretation settings:
675
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
676
-#define MM_PER_ARC_SEGMENT 1
677
-#define N_ARC_CORRECTION 25
674
+//
675
+// G2/G3 Arc Support
676
+//
677
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
678
+#if ENABLED(ARC_SUPPORT)
679
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
680
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
681
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
682
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
683
+#endif
678 684
 
679 685
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
680 686
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h View File

@@ -676,10 +676,16 @@
676 676
 
677 677
 // @section extras
678 678
 
679
-// Arc interpretation settings:
680
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
681
-#define MM_PER_ARC_SEGMENT 1
682
-#define N_ARC_CORRECTION 25
679
+//
680
+// G2/G3 Arc Support
681
+//
682
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
683
+#if ENABLED(ARC_SUPPORT)
684
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
685
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
686
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
687
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
688
+#endif
683 689
 
684 690
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
685 691
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h View File

@@ -676,10 +676,16 @@
676 676
 
677 677
 // @section extras
678 678
 
679
-// Arc interpretation settings:
680
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
681
-#define MM_PER_ARC_SEGMENT 1
682
-#define N_ARC_CORRECTION 25
679
+//
680
+// G2/G3 Arc Support
681
+//
682
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
683
+#if ENABLED(ARC_SUPPORT)
684
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
685
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
686
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
687
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
688
+#endif
683 689
 
684 690
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
685 691
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

@@ -673,10 +673,16 @@
673 673
 
674 674
 // @section extras
675 675
 
676
-// Arc interpretation settings:
677
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
678
-#define MM_PER_ARC_SEGMENT 1
679
-#define N_ARC_CORRECTION 25
676
+//
677
+// G2/G3 Arc Support
678
+//
679
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
680
+#if ENABLED(ARC_SUPPORT)
681
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
682
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
683
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
684
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
685
+#endif
680 686
 
681 687
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
682 688
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

@@ -673,10 +673,16 @@
673 673
 
674 674
 // @section extras
675 675
 
676
-// Arc interpretation settings:
677
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
678
-#define MM_PER_ARC_SEGMENT 1
679
-#define N_ARC_CORRECTION 25
676
+//
677
+// G2/G3 Arc Support
678
+//
679
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
680
+#if ENABLED(ARC_SUPPORT)
681
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
682
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
683
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
684
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
685
+#endif
680 686
 
681 687
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
682 688
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h View File

@@ -678,10 +678,16 @@
678 678
 
679 679
 // @section extras
680 680
 
681
-// Arc interpretation settings:
682
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
683
-#define MM_PER_ARC_SEGMENT 1
684
-#define N_ARC_CORRECTION 25
681
+//
682
+// G2/G3 Arc Support
683
+//
684
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
685
+#if ENABLED(ARC_SUPPORT)
686
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
687
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
688
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
689
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
690
+#endif
685 691
 
686 692
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
687 693
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h View File

@@ -673,10 +673,16 @@
673 673
 
674 674
 // @section extras
675 675
 
676
-// Arc interpretation settings:
677
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
678
-#define MM_PER_ARC_SEGMENT 1
679
-#define N_ARC_CORRECTION 25
676
+//
677
+// G2/G3 Arc Support
678
+//
679
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
680
+#if ENABLED(ARC_SUPPORT)
681
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
682
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
683
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
684
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
685
+#endif
680 686
 
681 687
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
682 688
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h View File

@@ -678,10 +678,16 @@
678 678
 
679 679
 // @section extras
680 680
 
681
-// Arc interpretation settings:
682
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
683
-#define MM_PER_ARC_SEGMENT 1
684
-#define N_ARC_CORRECTION 25
681
+//
682
+// G2/G3 Arc Support
683
+//
684
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
685
+#if ENABLED(ARC_SUPPORT)
686
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
687
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
688
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
689
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
690
+#endif
685 691
 
686 692
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
687 693
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/makibox/Configuration_adv.h View File

@@ -671,10 +671,16 @@
671 671
 
672 672
 // @section extras
673 673
 
674
-// Arc interpretation settings:
675
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
676
-#define MM_PER_ARC_SEGMENT 1
677
-#define N_ARC_CORRECTION 25
674
+//
675
+// G2/G3 Arc Support
676
+//
677
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
678
+#if ENABLED(ARC_SUPPORT)
679
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
680
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
681
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
682
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
683
+#endif
678 684
 
679 685
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
680 686
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

@@ -671,10 +671,16 @@
671 671
 
672 672
 // @section extras
673 673
 
674
-// Arc interpretation settings:
675
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
676
-#define MM_PER_ARC_SEGMENT 1
677
-#define N_ARC_CORRECTION 25
674
+//
675
+// G2/G3 Arc Support
676
+//
677
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
678
+#if ENABLED(ARC_SUPPORT)
679
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
680
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
681
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
682
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
683
+#endif
678 684
 
679 685
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
680 686
 //#define BEZIER_CURVE_SUPPORT

+ 10
- 4
Marlin/example_configurations/wt150/Configuration_adv.h View File

@@ -674,10 +674,16 @@
674 674
 
675 675
 // @section extras
676 676
 
677
-// Arc interpretation settings:
678
-#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
679
-#define MM_PER_ARC_SEGMENT 1
680
-#define N_ARC_CORRECTION 25
677
+//
678
+// G2/G3 Arc Support
679
+//
680
+#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes
681
+#if ENABLED(ARC_SUPPORT)
682
+  #define MM_PER_ARC_SEGMENT  1   // Length of each arc segment
683
+  #define N_ARC_CORRECTION   25   // Number of intertpolated segments between corrections
684
+  //#define ARC_P_CIRCLES         // Enable the 'P' parameter to specify complete circles
685
+  //#define CNC_WORKSPACE_PLANES  // Allow G2/G3 to operate in XY, ZX, or YZ planes
686
+#endif
681 687
 
682 688
 // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
683 689
 //#define BEZIER_CURVE_SUPPORT

Loading…
Cancel
Save