- fixed the SVG parser so the SVG files with no information regarding the 'height' can be opened in FlatCAM; fixed issue #433
This commit is contained in:
parent
249ece72e9
commit
2fb786f498
|
@ -7,6 +7,10 @@ CHANGELOG for FlatCAM beta
|
||||||
|
|
||||||
=================================================
|
=================================================
|
||||||
|
|
||||||
|
30.06.2020
|
||||||
|
|
||||||
|
- fixed the SVG parser so the SVG files with no information regarding the 'height' can be opened in FlatCAM; fixed issue #433
|
||||||
|
|
||||||
29.06.2020
|
29.06.2020
|
||||||
|
|
||||||
- fixed the DXF parser to work with the latest version of ezdxf module (issues for the ellipse entity and modified attribute name for the knots_values to knots)
|
- fixed the DXF parser to work with the latest version of ezdxf module (issues for the ellipse entity and modified attribute name for the knots_values to knots)
|
||||||
|
|
|
@ -48,9 +48,12 @@ def svgparselength(lengthstr):
|
||||||
r'(?:' + integer_re_str + r'(?:[Ee]' + integer_re_str + r')?)'
|
r'(?:' + integer_re_str + r'(?:[Ee]' + integer_re_str + r')?)'
|
||||||
length_re_str = r'(' + number_re_str + r')(em|ex|px|in|cm|mm|pt|pc|%)?'
|
length_re_str = r'(' + number_re_str + r')(em|ex|px|in|cm|mm|pt|pc|%)?'
|
||||||
|
|
||||||
match = re.search(length_re_str, lengthstr)
|
if lengthstr:
|
||||||
if match:
|
match = re.search(length_re_str, lengthstr)
|
||||||
return float(match.group(1)), match.group(2)
|
if match:
|
||||||
|
return float(match.group(1)), match.group(2)
|
||||||
|
else:
|
||||||
|
return 0, 0
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue