storborg / axibot

Headless control software for the AxiDraw pen plotter.
http://axibot.readthedocs.io/
GNU General Public License v2.0
31 stars 8 forks source link

Problem Polygon #39

Closed tkornack closed 7 years ago

tkornack commented 7 years ago

This polygon doesn't work for me:

<?xml version="1.0" encoding="UTF-8"?>
<svg width="62px" height="57px" viewBox="0 0 62 57" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch -->
    <title>Shape</title>
    <desc>Created with Sketch.</desc>
    <defs></defs>
    <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <g id="Twinleaf-Logo-Outline" transform="translate(-226.000000, -27.000000)" stroke="#000000">
            <g id="Group" transform="translate(13.000000, 27.000000)">
                <polygon id="Shape" points="241.589318 0.449723582 214.07791 55.8112177 243.210983 42.7635265 273.510516 54.7168952"></polygon>
            </g>
        </g>
    </g>
</svg>

The error is:

  File "/usr/local/lib/python3.6/site-packages/axibot-0.0.3.dev0-py3.6.egg/axibot/svg.py", line 145, in convert_to_path
    return points_to_path_string(node.get('points'), closed=True)
  File "/usr/local/lib/python3.6/site-packages/axibot-0.0.3.dev0-py3.6.egg/axibot/svg.py", line 109, in points_to_path_string
    xs, ys = point_string.split(',')
ValueError: not enough values to unpack (expected 2, got 1)
pwicks86 commented 7 years ago

Should be fixed by 9985a7969ce2450346d42e55c55989f6eec16809

tkornack commented 7 years ago

Works great! Thanks!