fix typo error and cleaning

This commit is contained in:
Kamil Sopko 2016-04-18 20:36:41 +02:00
parent cd57af18bc
commit be76b464ad
2 changed files with 4 additions and 3 deletions

View File

@ -93,9 +93,10 @@ def path2shapely(path, res=1.0):
if steps == 0:
steps = 1
frac = 1.0 / steps
# print length, steps, frac
for i in range(steps):
frac = 1.0 / steps
point = component.point(i * frac)
x, y = point.real, point.imag
if len(points) == 0 or points[-1] != (x, y):
@ -450,7 +451,7 @@ def parse_svg_transform(trstr):
r'(?:' + comma_or_space_re_str + \
r'(' + number_re_str + r')' + \
comma_or_space_re_str + \
r'(' + number_re_str + r'))?\)'
r'(' + number_re_str + r'))?\s*\)'
matrix_re_str = r'matrix\s*\(\s*' + \
r'(' + number_re_str + r')' + comma_or_space_re_str + \
r'(' + number_re_str + r')' + comma_or_space_re_str + \

View File

@ -66,7 +66,7 @@ class TclCommandImportSvg(TclCommand.TclCommandSignaled):
obj_type = 'geometry'
if obj_type != "geometry" and obj_type != "gerber":
self.raise_tcl_error("Option type can gebe 'geopmetry' or 'gerber' only, got '%s'." % obj_type)
self.raise_tcl_error("Option type can be 'geopmetry' or 'gerber' only, got '%s'." % obj_type)
with self.app.proc_container.new("Import SVG"):