From d2d8f0c046496badf89e03d9d1140580201945f5 Mon Sep 17 00:00:00 2001 From: Mario Voigt Date: Tue, 26 Oct 2021 19:22:41 +0200 Subject: [PATCH] filter for pointy paths in create links --- .../fablabchemnitz/create_links/create_links.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/extensions/fablabchemnitz/create_links/create_links.py b/extensions/fablabchemnitz/create_links/create_links.py index 7661b4e6..490f44d3 100644 --- a/extensions/fablabchemnitz/create_links/create_links.py +++ b/extensions/fablabchemnitz/create_links/create_links.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# coding=utf-8 # # Copyright (C) 2005,2007 Aaron Spike, aaron@ekips.org # Copyright (C) 2009 Alvin Penner, penner@vaxxine.com @@ -28,7 +27,7 @@ Extension for InkScape 1.X Author: Mario Voigt / FabLab Chemnitz Mail: mario.voigt@stadtfabrikanten.org Date: 09.04.2021 -Last patch: 14.04.2021 +Last patch: 26.10.2021 License: GNU GPL v3 """ @@ -288,11 +287,16 @@ class LinksCreator(inkex.EffectExtension): else: new[-1].append(sub[i]) i += 1 - + + #filter pointy subpaths + final = [] + for sub in new: + if len(sub) > 1: + final.append(sub) + style.pop('stroke-dasharray') element.pop('sodipodi:type') - csp = CubicSuperPath(new) - element.path = CubicSuperPath(new) + element.path = CubicSuperPath(final) element.style = style # break apart the combined path to have multiple elements