add #86
This commit is contained in:
parent
68e1dd9ac4
commit
6f1d0d2003
@ -101,9 +101,11 @@ class ChainPaths(inkex.EffectExtension):
|
|||||||
p2 = seg2[0]
|
p2 = seg2[0]
|
||||||
# fuse p1 and p2 to create one new point:
|
# fuse p1 and p2 to create one new point:
|
||||||
# first handle from p1, point coordinates averaged, second handle from p2
|
# first handle from p1, point coordinates averaged, second handle from p2
|
||||||
seg.append([ [ p1[0][0] , p1[0][1] ],
|
seg.append([
|
||||||
[ (p1[1][0] + p2[1][0]) * .5, (p1[1][1] + p2[1][1]) * .5 ],
|
[ p1[0][0] , p1[0][1] ],
|
||||||
[ p2[2][0] , p2[2][1] ] ])
|
[(p1[1][0] + p2[1][0]) * .5, (p1[1][1] + p2[1][1]) * .5],
|
||||||
|
[ p2[2][0] , p2[2][1] ]
|
||||||
|
])
|
||||||
seg.extend(seg2[1:])
|
seg.extend(seg2[1:])
|
||||||
else:
|
else:
|
||||||
seg = seg1[:]
|
seg = seg1[:]
|
||||||
@ -157,6 +159,11 @@ class ChainPaths(inkex.EffectExtension):
|
|||||||
if node.tag != inkex.addNS('path', 'svg'):
|
if node.tag != inkex.addNS('path', 'svg'):
|
||||||
inkex.errormsg("Object id {} is not a path. Try\n - Path->Object to Path\n - Object->Ungroup".format(node.get('id')))
|
inkex.errormsg("Object id {} is not a path. Try\n - Path->Object to Path\n - Object->Ungroup".format(node.get('id')))
|
||||||
return
|
return
|
||||||
|
#check if node has a transform. If yes, print a warning
|
||||||
|
if node.get('transform') is not None:
|
||||||
|
inkex.utils.debug("Warning: node {} has transform {}. Use 'Apply Transforms' extension before to handle this.".format(node.get('id'), node.get('transform')))
|
||||||
|
return
|
||||||
|
|
||||||
if so.debug: inkex.utils.debug("id={}, tag=".format(idnode.get('id'), node.tag))
|
if so.debug: inkex.utils.debug("id={}, tag=".format(idnode.get('id'), node.tag))
|
||||||
path_d = CubicSuperPath(Path(node.get('d')))
|
path_d = CubicSuperPath(Path(node.get('d')))
|
||||||
sub_idx = -1
|
sub_idx = -1
|
||||||
|
Loading…
Reference in New Issue
Block a user