Skip to content

Commit d8e4a70

Browse files
committed
foo
1 parent 3a7e320 commit d8e4a70

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

gcodeplot.inx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<item value="cut">cutting</item>
1212
<item value="custom">custom</item>
1313
</param>
14-
<param name="tolerance" type="float" min="0.0001" max="10.0" precision="2" _gui-text="Precision (mm):" _gui-description="Set rendering precision (Default: 0.05)">0.05</param>
14+
<param name="tolerance" type="float" min="0.0001" max="10.0" precision="3" _gui-text="Precision (mm):" _gui-description="Set rendering precision (Default: 0.05)">0.05</param>
1515
<param name="min-x" type="float" min="-1000000" max="1000000" precision="1" _gui-text="Left x-coordinate (mm):" _gui-description="x-coordinate of the print area's left edge (Default: 0)">0</param>
1616
<param name="min-y" type="float" min="-1000000" max="1000000" precision="1" _gui-text="Lower y-coordinate (mm):" _gui-description="y-coordinate of the print area's lower edge (Default: 0)">0</param>
1717
<param name="max-x" type="float" min="-1000000" max="1000000" precision="1" _gui-text="Right x-coordinate (mm):" _gui-description="x-coordinate of the print area's right edge (Default: 200)">200</param>
@@ -22,6 +22,7 @@
2222
<param name="pen-up-speed" type="float" min="-1000000" max="1000000" precision="1" _gui-text="Movement speed (mm/s):" _gui-description="Speed moving with pen up (Default: 40)">40</param>
2323
<param name="pen-down-speed" type="float" min="-1000000" max="1000000" precision="1" _gui-text="Draw speed (mm/s):" _gui-description="Speed moving with pen down (Default: 35)">35</param>
2424
<param name="z-speed" type="float" min="-1000000" max="1000000" precision="1" _gui-text="Z-speed (mm/s):" _gui-description="Speed moving pen up/down (Default: 5)">5</param>
25+
<param name="send" type="string" _gui-text="Serial port to send gcode to (blank not to send)" _gui-description="If you enter the name of your serial port here (e.g., COM4), then you can directly send the file to your device."></param>
2526
</page>
2627
<page name="fitting" _gui-text="Fitting and Extracting">
2728
<param name="scale" type="enum" _gui-text="Scaling mode:" _gui-description="Method for scaling to print area (Default: none; should be 'none' if tool-offset option is set in cutter tab)">

gcodeplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ def help(error=False):
731731
elif opt in ('-t', '--tolerance'):
732732
tolerance = float(arg)
733733
elif opt in ('-s', '--send'):
734-
sendPort = arg
734+
sendPort = None if len(arg.strip()) == 0 else arg
735735
elif opt == '--no-send':
736736
sendPort = None
737737
elif opt in ('-S', '--send-speed'):

gcodeplotutils/sendgcode.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
from __future__ import print_function
2-
import serial
32
import time
43
import os
54
import re
65
import sys
6+
try:
7+
import serial
8+
except ImportError, e:
9+
sys.stderr.write("""pyserial is not installed.
10+
You can download the pyserial .whl file from: http://pypi.python.org/pypi/pyserial
11+
Then rename it to .zip on Windows, and if you're using gcodeplot as an Inkscape extension,
12+
put the "serial" subfolder from the zip in c:\Program Files\Inkscape\python\Lib\ or
13+
c:\Program Files (x86)\Inkscape\python\Lib\
14+
""")
15+
sys.exit(1)
716

817
class FakeSerial(object):
918
def __init__(self, name):

svgpath/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,6 @@ def scale(width, height, viewBox, z):
534534
return ( paths, applyMatrix(matrix, complex(viewBox[0], viewBox[1])),
535535
applyMatrix(matrix, complex(viewBox[2], viewBox[3])) )
536536

537-
def getPathsFromSVGFile(filename,yGrowsUp=True):
537+
def getPathsFromSVGFile(filename,yGrowsUp=Truez):
538538
return getPathsFromSVG(ET.parse(filename).getroot(),yGrowsUp=yGrowsUp)
539539

0 commit comments

Comments
 (0)