avoid pointy paths in create links

This commit is contained in:
Mario Voigt 2021-10-16 16:33:34 +02:00
parent e8bbf0c997
commit f8513e5e01

View File

@ -280,12 +280,15 @@ class LinksCreator(inkex.EffectExtension):
length = length - dash length = length - dash
idash = (idash + 1) % len(dashes) idash = (idash + 1) % len(dashes)
dash = dashes[idash] dash = dashes[idash]
if sub[-1] != sub[i]: #avoid pointy paths if sub[-1] != sub[i] and sub[i][0] != sub[i][1]: #avoid pointy paths
if idash % 2: if idash % 2:
new.append([sub[i]]) new.append([sub[i]])
else: else:
new[-1].append(sub[i]) new[-1].append(sub[i])
i += 1 i += 1
if new[-1][0] == new[-1][0]: #avoid pointy paths
new.remove(new[-1])
style.pop('stroke-dasharray') style.pop('stroke-dasharray')
element.pop('sodipodi:type') element.pop('sodipodi:type')
csp = CubicSuperPath(new) csp = CubicSuperPath(new)