Fix living hinge
This commit is contained in:
parent
ea7fd539be
commit
b22f862b94
@ -78,16 +78,13 @@ class HingeCuts(inkex.Effect):
|
|||||||
# inkex.utils.debug("id:" + id)
|
# inkex.utils.debug("id:" + id)
|
||||||
# for key in node.attrib.keys():
|
# for key in node.attrib.keys():
|
||||||
# inkex.utils.debug(key + ": " + node.get(key))
|
# inkex.utils.debug(key + ": " + node.get(key))
|
||||||
x = float(node.get("x"))
|
bbox = node.bounding_box()
|
||||||
dx = float(node.get("width"))
|
|
||||||
y = float(node.get("y"))
|
|
||||||
dy = float(node.get("height"))
|
|
||||||
|
|
||||||
# calculate the cut lines for the hinge
|
# calculate the cut lines for the hinge
|
||||||
if (dir=="y"):
|
if (dir=="y"):
|
||||||
lines, l_actual, d_actual, dd_actual = self.calcYCutLines(x, y, dx, dy, l, d, dd)
|
lines, l_actual, d_actual, dd_actual = self.calcYCutLines(bbox.left, bbox.top, bbox.width, bbox.height, l, d, dd)
|
||||||
else:
|
else:
|
||||||
lines, l_actual, d_actual, dd_actual = self.calcXCutLines(x, y, dx, dy, l, d, dd)
|
lines, l_actual, d_actual, dd_actual = self.calcXCutLines(bbox.left, bbox.top, bbox.width, bbox.height, l, d, dd)
|
||||||
|
|
||||||
s = ''
|
s = ''
|
||||||
for line in lines:
|
for line in lines:
|
||||||
|
Reference in New Issue
Block a user