Skip to content

Commit e82ee29

Browse files
authored
Merge pull request #4051 from rodw-au/fix-4048
resolve #4048
2 parents 60597ee + d9739ce commit e82ee29

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

src/emc/rs274ngc/interp_convert.cc

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6515,28 +6515,6 @@ int Interp::tag_arc(block_pointer block, double x, double y, double z, double ce
65156515
// Normalise 0-360
65166516
while (heading < 0) heading += 360.0;
65176517
while (heading >= 360.0) heading -= 360.0;
6518-
6519-
double radius = hypot(dx, dy);
6520-
6521-
// We need to scale the radius if the gcode units are not the same as machine units
6522-
// If linearUnits > 0.5, it's 1.0 (Metric). If < 0.5, it's 0.03937 (Imperial).
6523-
int machineUnits = (emcStatus->motion.traj.linearUnits > 0.5) ? CANON_UNITS_MM : CANON_UNITS_INCHES;
6524-
6525-
// 3. Identify the active G-code unit type
6526-
int gcodeUnits = _setup.length_units;
6527-
6528-
// 4. If they don't match, scale the radius to Machine Units
6529-
if (gcodeUnits != machineUnits) {
6530-
// longhand below to avoid clang errors
6531-
if (gcodeUnits == CANON_UNITS_INCHES) {
6532-
// G-code is Inches, Machine is MM -> Scale UP to MM
6533-
radius = radius * 25.4;
6534-
} else {
6535-
// G-code is MM, Machine is Inches -> Scale DOWN to Inches
6536-
radius = radius / 25.4;
6537-
}
6538-
}
6539-
65406518
// Final Assignments
65416519
block->iscircle = (is_360 && !is_helix) ? 1 : 0;
65426520
block->arc_center_x = center_x;

0 commit comments

Comments
 (0)