From f8513e5e01c37a887373499ad924d0a66659a2ce Mon Sep 17 00:00:00 2001 From: Mario Voigt Date: Sat, 16 Oct 2021 16:33:34 +0200 Subject: [PATCH] avoid pointy paths in create links --- extensions/fablabchemnitz/create_links/create_links.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/fablabchemnitz/create_links/create_links.py b/extensions/fablabchemnitz/create_links/create_links.py index d13a388e..351942f5 100644 --- a/extensions/fablabchemnitz/create_links/create_links.py +++ b/extensions/fablabchemnitz/create_links/create_links.py @@ -280,12 +280,15 @@ class LinksCreator(inkex.EffectExtension): length = length - dash idash = (idash + 1) % len(dashes) 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: new.append([sub[i]]) else: new[-1].append(sub[i]) i += 1 + if new[-1][0] == new[-1][0]: #avoid pointy paths + new.remove(new[-1]) + style.pop('stroke-dasharray') element.pop('sodipodi:type') csp = CubicSuperPath(new)