gcode_arcs: No need to import gcode module to access Coord()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
0c5c87d7c0
commit
ba365aff96
|
@ -7,7 +7,7 @@
|
||||||
#
|
#
|
||||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||||
import math
|
import math
|
||||||
from gcode import Coord
|
|
||||||
# Coordinates created by this are converted into G1 commands.
|
# Coordinates created by this are converted into G1 commands.
|
||||||
#
|
#
|
||||||
# supports XY, XZ & YZ planes with remaining axis as helical
|
# supports XY, XZ & YZ planes with remaining axis as helical
|
||||||
|
@ -39,6 +39,8 @@ class ArcSupport:
|
||||||
self.gcode.register_command("G18", self.cmd_G18)
|
self.gcode.register_command("G18", self.cmd_G18)
|
||||||
self.gcode.register_command("G19", self.cmd_G19)
|
self.gcode.register_command("G19", self.cmd_G19)
|
||||||
|
|
||||||
|
self.Coord = self.gcode.Coord
|
||||||
|
|
||||||
# backwards compatibility, prior implementation only supported XY
|
# backwards compatibility, prior implementation only supported XY
|
||||||
self.plane = ARC_PLANE_X_Y
|
self.plane = ARC_PLANE_X_Y
|
||||||
|
|
||||||
|
@ -64,7 +66,7 @@ class ArcSupport:
|
||||||
currentPos = gcodestatus['gcode_position']
|
currentPos = gcodestatus['gcode_position']
|
||||||
|
|
||||||
# Parse parameters
|
# Parse parameters
|
||||||
asTarget = Coord(x=gcmd.get_float("X", currentPos[0]),
|
asTarget = self.Coord(x=gcmd.get_float("X", currentPos[0]),
|
||||||
y=gcmd.get_float("Y", currentPos[1]),
|
y=gcmd.get_float("Y", currentPos[1]),
|
||||||
z=gcmd.get_float("Z", currentPos[2]),
|
z=gcmd.get_float("Z", currentPos[2]),
|
||||||
e=None)
|
e=None)
|
||||||
|
@ -170,7 +172,7 @@ class ArcSupport:
|
||||||
c[alpha_axis] = center_P + r_P
|
c[alpha_axis] = center_P + r_P
|
||||||
c[beta_axis] = center_Q + r_Q
|
c[beta_axis] = center_Q + r_Q
|
||||||
c[helical_axis] = currentPos[helical_axis] + dist_Helical
|
c[helical_axis] = currentPos[helical_axis] + dist_Helical
|
||||||
coords.append(Coord(*c))
|
coords.append(self.Coord(*c))
|
||||||
|
|
||||||
coords.append(targetPos)
|
coords.append(targetPos)
|
||||||
return coords
|
return coords
|
||||||
|
|
Loading…
Reference in New Issue