Skip to content

Commit

Permalink
✨ POLAR kinematics
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jan 11, 2023
1 parent c784ea7 commit 3d8d9e6
Show file tree
Hide file tree
Showing 334 changed files with 19,810 additions and 2,160 deletions.
66 changes: 60 additions & 6 deletions config/default/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@
#endif

// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
#define DELTA_PRINTABLE_RADIUS 140.0 // (mm)
#define PRINTABLE_RADIUS 140.0 // (mm)

// Maximum reachable area
#define DELTA_MAX_RADIUS 140.0 // (mm)
Expand Down Expand Up @@ -971,7 +971,7 @@
#if ENABLED(MORGAN_SCARA)

//#define DEBUG_SCARA_KINEMATICS
#define SCARA_FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
// Radius around the center where the arm cannot reach
#define MIDDLE_DEAD_ZONE_R 0 // (mm)
Expand Down Expand Up @@ -1006,7 +1006,7 @@
#define TPARA_OFFSET_Y 0 // (mm)
#define TPARA_OFFSET_Z 0 // (mm)

#define SCARA_FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
// Radius around the center where the arm cannot reach
#define MIDDLE_DEAD_ZONE_R 0 // (mm)
Expand All @@ -1016,6 +1016,60 @@
#define PSI_HOMING_OFFSET 0
#endif

// @section polar

/**
* POLAR Kinematics
* developed by Kadir ilkimen for PolarBear CNC and babyBear
* https:/kadirilkimen/Polar-Bear-Cnc-Machine
* https:/kadirilkimen/babyBear-3D-printer
*
* A polar machine can have different configurations.
* This kinematics is only compatible with the following configuration:
* X : Independent linear
* Y or B : Polar
* Z : Independent linear
*
* For example, PolarBear has CoreXZ plus Polar Y or B.
*
* Motion problem for Polar axis near center / origin:
*
* 3D printing:
* Movements very close to the center of the polar axis take more time than others.
* This brief delay results in more material deposition due to the pressure in the nozzle.
*
* Current Kinematics and feedrate scaling deals with this by making the movement as fast
* as possible. It works for slow movements but doesn't work well with fast ones. A more
* complicated extrusion compensation must be implemented.
*
* Ideally, it should estimate that a long rotation near the center is ahead and will cause
* unwanted deposition. Therefore it can compensate the extrusion beforehand.
*
* Laser cutting:
* Same thing would be a problem for laser engraving too. As it spends time rotating at the
* center point, more likely it will burn more material than it should. Therefore similar
* compensation would be implemented for laser-cutting operations.
*
* Milling:
* This shouldn't be a problem for cutting/milling operations.
*/
//#define POLAR
#if ENABLED(POLAR)
#define DEFAULT_SEGMENTS_PER_SECOND 180 // If movement is choppy try lowering this value

#define PRINTABLE_RADIUS 82.0f // (mm) Maximum travel of X axis

// Movements fall inside POLAR_FAST_RADIUS are assigned the highest possible feedrate
// to compensate unwanted deposition related to the near-origin motion problem.
#define POLAR_FAST_RADIUS 3.0f // (mm)

// Radius which is unreachable by the tool.
// Needed if the tool is not perfectly aligned to the center of the polar axis.
#define POLAR_CENTER_OFFSET 0.0f // (mm)

#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
#endif

// @section machine

// Articulated robot (arm). Joints are directly mapped to axes with no kinematics.
Expand Down Expand Up @@ -1428,13 +1482,13 @@
// 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
// if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.

#define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, DELTA_PRINTABLE_RADIUS, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, PRINTABLE_RADIUS, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_FEEDRATE

#define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, DELTA_PRINTABLE_RADIUS, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, PRINTABLE_RADIUS, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_FEEDRATE)/10

#define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (DELTA_PRINTABLE_RADIUS) * 0.75, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (PRINTABLE_RADIUS) * 0.75, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_FEEDRATE

#define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
Expand Down
65 changes: 59 additions & 6 deletions config/examples/3DFabXYZ/Migbot/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@
#endif

// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
#define DELTA_PRINTABLE_RADIUS 140.0 // (mm)
#define PRINTABLE_RADIUS 140.0 // (mm)

// Maximum reachable area
#define DELTA_MAX_RADIUS 140.0 // (mm)
Expand Down Expand Up @@ -973,7 +973,7 @@
#if ENABLED(MORGAN_SCARA)

//#define DEBUG_SCARA_KINEMATICS
#define SCARA_FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
// Radius around the center where the arm cannot reach
#define MIDDLE_DEAD_ZONE_R 0 // (mm)
Expand Down Expand Up @@ -1008,7 +1008,7 @@
#define TPARA_OFFSET_Y 0 // (mm)
#define TPARA_OFFSET_Z 0 // (mm)

#define SCARA_FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
// Radius around the center where the arm cannot reach
#define MIDDLE_DEAD_ZONE_R 0 // (mm)
Expand All @@ -1018,6 +1018,59 @@
#define PSI_HOMING_OFFSET 0
#endif

// @section polar

/**
* POLAR Kinematics
* developed by Kadir ilkimen for PolarBear CNC and babyBear
* https:/kadirilkimen/Polar-Bear-Cnc-Machine
* https:/kadirilkimen/babyBear-3D-printer
*
* A polar machine can have different configurations.
* This kinematics is only compatible with the following configuration:
* X : Independent linear
* Y or B : Polar
* Z : Independent linear
*
* For example, PolarBear has CoreXZ plus Polar Y or B.
*
* Motion problem for Polar axis near center / origin:
*
* 3D printing:
* Movements very close to the center of the polar axis take more time than others.
* This brief delay results in more material deposition due to the pressure in the nozzle.
*
* Current Kinematics and feedrate scaling deals with this by making the movement as fast
* as possible. It works for slow movements but doesn't work well with fast ones. A more
* complicated extrusion compensation must be implemented.
*
* Ideally, it should estimate that a long rotation near the center is ahead and will cause
* unwanted deposition. Therefore it can compensate the extrusion beforehand.
*
* Laser cutting:
* Same thing would be a problem for laser engraving too. As it spends time rotating at the
* center point, more likely it will burn more material than it should. Therefore similar
* compensation would be implemented for laser-cutting operations.
*
* Milling:
* This shouldn't be a problem for cutting/milling operations.
*/
//#define POLAR
#if ENABLED(POLAR)
#define DEFAULT_SEGMENTS_PER_SECOND 180 // If movement is choppy try lowering this value
#define PRINTABLE_RADIUS 82.0f // (mm) Maximum travel of X axis

// Movements fall inside POLAR_FAST_RADIUS are assigned the highest possible feedrate
// to compensate unwanted deposition related to the near-origin motion problem.
#define POLAR_FAST_RADIUS 3.0f // (mm)

// Radius which is unreachable by the tool.
// Needed if the tool is not perfectly aligned to the center of the polar axis.
#define POLAR_CENTER_OFFSET 0.0f // (mm)

#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
#endif

// @section machine

// Articulated robot (arm). Joints are directly mapped to axes with no kinematics.
Expand Down Expand Up @@ -1430,13 +1483,13 @@
// 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
// if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.

#define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, DELTA_PRINTABLE_RADIUS, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, PRINTABLE_RADIUS, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_FEEDRATE

#define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, DELTA_PRINTABLE_RADIUS, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, PRINTABLE_RADIUS, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_FEEDRATE)/10

#define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (DELTA_PRINTABLE_RADIUS) * 0.75, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (PRINTABLE_RADIUS) * 0.75, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_FEEDRATE

#define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
Expand Down
65 changes: 59 additions & 6 deletions config/examples/ADIMLab/Gantry v1/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@
#endif

// Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
#define DELTA_PRINTABLE_RADIUS 140.0 // (mm)
#define PRINTABLE_RADIUS 140.0 // (mm)

// Maximum reachable area
#define DELTA_MAX_RADIUS 140.0 // (mm)
Expand Down Expand Up @@ -971,7 +971,7 @@
#if ENABLED(MORGAN_SCARA)

//#define DEBUG_SCARA_KINEMATICS
#define SCARA_FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
// Radius around the center where the arm cannot reach
#define MIDDLE_DEAD_ZONE_R 0 // (mm)
Expand Down Expand Up @@ -1006,7 +1006,7 @@
#define TPARA_OFFSET_Y 0 // (mm)
#define TPARA_OFFSET_Z 0 // (mm)

#define SCARA_FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
// Radius around the center where the arm cannot reach
#define MIDDLE_DEAD_ZONE_R 0 // (mm)
Expand All @@ -1016,6 +1016,59 @@
#define PSI_HOMING_OFFSET 0
#endif

// @section polar

/**
* POLAR Kinematics
* developed by Kadir ilkimen for PolarBear CNC and babyBear
* https:/kadirilkimen/Polar-Bear-Cnc-Machine
* https:/kadirilkimen/babyBear-3D-printer
*
* A polar machine can have different configurations.
* This kinematics is only compatible with the following configuration:
* X : Independent linear
* Y or B : Polar
* Z : Independent linear
*
* For example, PolarBear has CoreXZ plus Polar Y or B.
*
* Motion problem for Polar axis near center / origin:
*
* 3D printing:
* Movements very close to the center of the polar axis take more time than others.
* This brief delay results in more material deposition due to the pressure in the nozzle.
*
* Current Kinematics and feedrate scaling deals with this by making the movement as fast
* as possible. It works for slow movements but doesn't work well with fast ones. A more
* complicated extrusion compensation must be implemented.
*
* Ideally, it should estimate that a long rotation near the center is ahead and will cause
* unwanted deposition. Therefore it can compensate the extrusion beforehand.
*
* Laser cutting:
* Same thing would be a problem for laser engraving too. As it spends time rotating at the
* center point, more likely it will burn more material than it should. Therefore similar
* compensation would be implemented for laser-cutting operations.
*
* Milling:
* This shouldn't be a problem for cutting/milling operations.
*/
//#define POLAR
#if ENABLED(POLAR)
#define DEFAULT_SEGMENTS_PER_SECOND 180 // If movement is choppy try lowering this value
#define PRINTABLE_RADIUS 82.0f // (mm) Maximum travel of X axis

// Movements fall inside POLAR_FAST_RADIUS are assigned the highest possible feedrate
// to compensate unwanted deposition related to the near-origin motion problem.
#define POLAR_FAST_RADIUS 3.0f // (mm)

// Radius which is unreachable by the tool.
// Needed if the tool is not perfectly aligned to the center of the polar axis.
#define POLAR_CENTER_OFFSET 0.0f // (mm)

#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
#endif

// @section machine

// Articulated robot (arm). Joints are directly mapped to axes with no kinematics.
Expand Down Expand Up @@ -1428,13 +1481,13 @@
// 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
// if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.

#define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, DELTA_PRINTABLE_RADIUS, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 30.0, PRINTABLE_RADIUS, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_PROBE_FEEDRATE

#define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, DELTA_PRINTABLE_RADIUS, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 0.0, PRINTABLE_RADIUS, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_FEEDRATE)/10

#define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (DELTA_PRINTABLE_RADIUS) * 0.75, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 0.0, (PRINTABLE_RADIUS) * 0.75, 100.0 }
#define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE XY_PROBE_FEEDRATE

#define Z_PROBE_ALLEN_KEY_STOW_1 { -64.0, 56.0, 23.0 } // Move the probe into position
Expand Down
Loading

0 comments on commit 3d8d9e6

Please sign in to comment.