Only process points if there is an even number. Update web-based scour script to process options and rename to scra.py
This commit is contained in:
parent
b9a9020feb
commit
a4dbc37ba9
4 changed files with 438 additions and 46 deletions
6
scour.py
6
scour.py
|
|
@ -1325,7 +1325,11 @@ def parseListOfPoints(s):
|
|||
points = []
|
||||
while i < len(nums):
|
||||
x = SVGLength(nums[i])
|
||||
y = SVGLength(nums[i+1])
|
||||
# if we had an odd number of points, return empty
|
||||
if i == len(nums)-1: return []
|
||||
else: y = SVGLength(nums[i+1])
|
||||
|
||||
# if the coordinates were not unitless, return empty
|
||||
if x.units != Unit.NONE or y.units != Unit.NONE: return []
|
||||
points.append( (str(x.value),str(y.value)) )
|
||||
i += 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue