Creating a new workspace plane January 13, 2024 06:44PM |
Registered: 1 year ago Posts: 14 |
Re: Creating a new workspace plane January 14, 2024 12:50AM |
Admin Registered: 13 years ago Posts: 7,147 |
Re: Creating a new workspace plane January 14, 2024 02:06AM |
Registered: 1 year ago Posts: 14 |
Re: Creating a new workspace plane January 15, 2024 09:50AM |
Registered: 1 year ago Posts: 14 |
inline void report_workspace_plane() { SERIAL_ECHO_START(); SERIAL_ECHOPGM("Workspace Plane "); SERIAL_ECHOF( gcode.workspace_plane == GcodeSuite:: PLANE_UY ? F("UY\n") //add : gcode.workspace_plane == GcodeSuite:: PLANE_YZ ? F("YZ\n") : gcode.workspace_plane == GcodeSuite:: PLANE_ZX ? F("ZX\n") : F("XY\n") ); } ... /** * G17: Select Plane XY * G18: Select Plane ZX * G19: Select Plane YZ */ void GcodeSuite::G17() { set_workspace_plane(PLANE_XY); } void GcodeSuite::G18() { set_workspace_plane(PLANE_ZX); } void GcodeSuite::G19() { set_workspace_plane(PLANE_YZ); } void GcodeSuite::G1700() { set_workspace_plane(PLANE_UY); } //add #endif // CNC_WORKSPACE_PLANES
#if ENABLED(CNC_WORKSPACE_PLANES) case 17: G17(); break; // G17: Select Plane XY case 1700: G1700(); break; // G1700: Select Plane UY //add case 18: G18(); break; // G18: Select Plane ZX case 19: G19(); break; // G19: Select Plane YZ #endif
#if ENABLED(CNC_WORKSPACE_PLANES) static void G17(); static void G1700(); //add static void G18(); static void G19(); #endif
... #if ENABLED(CNC_WORKSPACE_PLANES) AxisEnum axis_p, axis_q, axis_l; switch (gcode.workspace_plane) { default: case GcodeSuite:: PLANE_XY: axis_p = X_AXIS; axis_q = Y_AXIS; axis_l = Z_AXIS; break; case GcodeSuite:: PLANE_YZ: axis_p = Y_AXIS; axis_q = Z_AXIS; axis_l = X_AXIS; break; case GcodeSuite:: PLANE_ZX: axis_p = Z_AXIS; axis_q = X_AXIS; axis_l = Y_AXIS; break; case GcodeSuite:: PLANE_UY: axis_p = I_AXIS; axis_q = Y_AXIS; axis_l = Z_AXIS; break; //add } #else ... #if ENABLED(CNC_WORKSPACE_PLANES) char achar, bchar; switch (workspace_plane) { default: case GcodeSuite:: PLANE_XY: achar = 'I'; bchar = 'J'; break; case GcodeSuite:: PLANE_YZ: achar = 'J'; bchar = 'K'; break; case GcodeSuite:: PLANE_ZX: achar = 'K'; bchar = 'I'; break; case GcodeSuite:: PLANE_UY: achar = 'i'; bchar = 'J'; break; //add } #else
G28 G1 Y0 X50 Z50 U50 G91 G1700 G2 I10 J10 P3