summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xshare/extensions/dxf_outlines.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/share/extensions/dxf_outlines.py b/share/extensions/dxf_outlines.py
index a45100cf5..b7ae0ef14 100755
--- a/share/extensions/dxf_outlines.py
+++ b/share/extensions/dxf_outlines.py
@@ -207,28 +207,28 @@ class MyEffect(inkex.Effect):
return
p = cubicsuperpath.parsePath(d)
elif node.tag == inkex.addNS('rect','svg'):
- x = float(node.get('x'))
- y = float(node.get('y'))
+ x = float(node.get('x', 0))
+ y = float(node.get('y', 0))
width = float(node.get('width'))
height = float(node.get('height'))
d = "m %s,%s %s,%s %s,%s %s,%s z" % (x, y, width, 0, 0, height, -width, 0)
p = cubicsuperpath.parsePath(d)
elif node.tag == inkex.addNS('line','svg'):
- x1 = float(node.get('x1'))
- x2 = float(node.get('x2'))
- y1 = float(node.get('y1'))
- y2 = float(node.get('y2'))
+ x1 = float(node.get('x1', 0))
+ x2 = float(node.get('x2', 0))
+ y1 = float(node.get('y1', 0))
+ y2 = float(node.get('y2', 0))
d = "M %s,%s L %s,%s" % (x1, y1, x2, y2)
p = cubicsuperpath.parsePath(d)
elif node.tag == inkex.addNS('circle','svg'):
- cx = float(node.get('cx'))
- cy = float(node.get('cy'))
+ cx = float(node.get('cx', 0))
+ cy = float(node.get('cy', 0))
r = float(node.get('r'))
d = "m %s,%s a %s,%s 0 0 1 %s,%s %s,%s 0 0 1 %s,%s z" % (cx + r, cy, r, r, -2*r, 0, r, r, 2*r, 0)
p = cubicsuperpath.parsePath(d)
elif node.tag == inkex.addNS('ellipse','svg'):
- cx = float(node.get('cx'))
- cy = float(node.get('cy'))
+ cx = float(node.get('cx', 0))
+ cy = float(node.get('cy', 0))
rx = float(node.get('rx'))
ry = float(node.get('ry'))
d = "m %s,%s a %s,%s 0 0 1 %s,%s %s,%s 0 0 1 %s,%s z" % (cx + rx, cy, rx, ry, -2*rx, 0, rx, ry, 2*rx, 0)