diff --git a/linedraw.py b/linedraw.py index 1b3d269..3c4c2db 100644 --- a/linedraw.py +++ b/linedraw.py @@ -38,7 +38,7 @@ F_SobelX = { (1,0): -2, (-1,1): 1, (0,1): 0, - (1,1): -1} + (1,1): -1} F_SobelY = { (-1,-1): 1, @@ -283,6 +283,7 @@ def sketch(path, export_path=None, resolution=1024, hatch_size=16, contour_simpl export_path = path.replace("received", "converted") export_path = os.path.splitext(export_path)[0] + os.mkdir(os.path.split(path)[0], exist_ok=True) with open(export_path + ".svg", "w") as file: file.write(makePathSvg(lines)) with open(export_path + ".ngc", "w") as file: @@ -339,7 +340,7 @@ def makeGcode(lines, paper_size="letter"): scale = min(d_x, d_y) print("generating gcode file...") - out = "$X\n$32=1\nM03\nF600\nG17 G21 G90 G54\nG01\n\n" + out = "$X\n$32=1\nM03\nF800\nG17 G21 G90 G54\nG01\n\n" for line in lines: start = line.pop(0) out += "S1000\n"