mtl / svg2mod

Convert Inkscape SVG drawings to KiCad footprint modules
Creative Commons Zero v1.0 Universal
236 stars 56 forks source link

Small issue with 'px' #1

Closed anfractuosity closed 8 years ago

anfractuosity commented 8 years ago

File "./svg2mod.py", line 1432, in main() File "./svg2mod.py", line 98, in main exported.write() File "./svg2mod.py", line 728, in write self._write_modules() File "./svg2mod.py", line 1262, in _write_modules self._write_module( front = True ) File "./svg2mod.py", line 659, in _write_module self._write_items( group.items, layer, not front ) File "./svg2mod.py", line 602, in _write_items fill, stroke, stroke_width = self._get_fill_stroke( item ) File "./svg2mod.py", line 492, in _get_fill_stroke stroke_width = float( value ) * 25.4 / 90.0 ValueError: invalid literal for float(): 1px

I fixed by just doing:

value = value.replace("px","")

This is an awesome script btw :)

mtl commented 8 years ago

Thanks! Change incorporated in commit be33b8db420b9bd26abf356fe938a360df12c139 (merged to master).