aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/gcode_arcs.py
diff options
context:
space:
mode:
authorachmed20 <achmed21@gmail.com>2019-09-18 17:57:16 +0200
committerKevinOConnor <kevin@koconnor.net>2019-09-18 11:57:16 -0400
commitfce98c5519019f3ea23d06cad04b55f3a4971d2c (patch)
treef7b7a2ef292328b9c3a1a30f99bc3346f873c90c /klippy/extras/gcode_arcs.py
parent8c69e1bcfe2aa7f17fb919bf0131ee81d85c3976 (diff)
downloadkutter-fce98c5519019f3ea23d06cad04b55f3a4971d2c.tar.gz
kutter-fce98c5519019f3ea23d06cad04b55f3a4971d2c.tar.xz
kutter-fce98c5519019f3ea23d06cad04b55f3a4971d2c.zip
gcode_arcs: use z-height defined in f2/3 code, if present
Signed-off-by: Aleksej Vasiljkovic <achmed21@gmail.com>
Diffstat (limited to 'klippy/extras/gcode_arcs.py')
-rw-r--r--klippy/extras/gcode_arcs.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/klippy/extras/gcode_arcs.py b/klippy/extras/gcode_arcs.py
index b0d6e795..e1ebeb12 100644
--- a/klippy/extras/gcode_arcs.py
+++ b/klippy/extras/gcode_arcs.py
@@ -19,8 +19,7 @@ import re
class ArcSupport:
def __init__(self, config):
self.printer = config.get_printer()
- self.mm_per_arc_segment = config.getfloat('resolution', 1)
- self.debug = True #will respond motion to terminal as G1 code
+ self.mm_per_arc_segment = config.getfloat('resolution', 1, above=0.0)
self.gcode = self.printer.lookup_object('gcode')
self.gcode.register_command("G2", self.cmd_G2, desc=self.cmd_G2_help)
@@ -81,8 +80,8 @@ class ArcSupport:
# build dict and call cmd_G1
for coord in coords:
g1_params = {'X': coord[0], 'Y': coord[1]}
- if asZ:
- g1_params['Z']= float(asZ)/len(coords)
+ if asZ!=None:
+ g1_params['Z']= float(asZ)
if asE>0:
g1_params['E']= float(asE)/len(coords)
if asF>0: