Skip to content

Commit

Permalink
fix tool thickness not being taken into account for 3axis probe diame…
Browse files Browse the repository at this point in the history
…ter routine
  • Loading branch information
sophiabeluli committed Oct 1, 2024
1 parent 2b17e74 commit c6d7ba6
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/app/lib/Probing.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,9 +549,10 @@ export const get3AxisAutoDiameterRoutine = ({ axes, direction, toolDiameter }) =

const [xOff, yOff] = determineAutoPlateOffsetValues(direction, toolDiameter);

// const toolRadius = (diameter / 2);
// const toolCompensatedThickness = ((-1 * toolRadius));
// console.log(toolCompensatedThickness);
const toolRadius = (diameter / 2);
const toolCompensatedThickness = ((-1 * toolRadius));

const compensatedValue = 22.5 - toolCompensatedThickness;

if (axes.z && axes.y && axes.z) {
code.push(
Expand All @@ -570,14 +571,14 @@ export const get3AxisAutoDiameterRoutine = ({ axes, direction, toolDiameter }) =
'G21 G91 G0 X-2',
'G38.2 X5 F75',
'G4 P0.15',
`G10 L20 ${p} X19.325`,
`G10 L20 ${p} X${compensatedValue}`,
'G21 G90 G0 X0',
'G21 G91 G0 Y13',
'G38.2 Y20 F250',
'G21 G91 G0 Y-2',
'G38.2 Y5 F75',
'G4 P0.15',
`G10 L20 ${p} Y19.325`,
`G10 L20 ${p} Y${compensatedValue}`,
'G21 G90 G0 X0 Y0',
'G4 P0.15',
`G10 L20 ${p} X[X_OFF] Y[Y_OFF]`,
Expand All @@ -597,14 +598,14 @@ export const get3AxisAutoDiameterRoutine = ({ axes, direction, toolDiameter }) =
'G21 G91 G0 X-2',
'G38.2 X5 F75',
'G4 P0.15',
`G10 L20 ${p} X19.325`,
`G10 L20 ${p} X${compensatedValue}`,
'G21 G90 G0 X0',
'G21 G91 G0 Y13',
'G38.2 Y20 F250',
'G21 G91 G0 Y-2',
'G38.2 Y5 F75',
'G4 P0.15',
`G10 L20 ${p} Y19.325`,
`G10 L20 ${p} Y${compensatedValue}`,
'G21 G90 G0 X0 Y0',
'G4 P0.15',
`G10 L20 ${p} X[X_OFF] Y[Y_OFF]`,
Expand Down Expand Up @@ -635,7 +636,7 @@ export const get3AxisAutoDiameterRoutine = ({ axes, direction, toolDiameter }) =
'G21 G91 G0 Y-2',
'G38.2 Y5 F75',
'G4 P0.15',
`G10 L20 ${p} Y19.325`,
`G10 L20 ${p} Y${compensatedValue}`,
'G21 G90 G0 Y0',
'G4 P0.15',
`G10 L20 ${p} Y[Y_OFF]`,
Expand All @@ -652,7 +653,7 @@ export const get3AxisAutoDiameterRoutine = ({ axes, direction, toolDiameter }) =
'G21 G91 G0 X-2',
'G38.2 X5 F75',
'G4 P0.15',
`G10 L20 ${p} X19.325`,
`G10 L20 ${p} X${compensatedValue}`,
'G21 G90 G0 X0',
'G4 P0.15',
`G10 L20 ${p} X[X_OFF]`,
Expand Down

0 comments on commit c6d7ba6

Please sign in to comment.