From 8a5a5e07e56caaa5356c14118d10738168cacf6c Mon Sep 17 00:00:00 2001 From: Mario Voigt Date: Sat, 1 Aug 2020 00:53:58 +0200 Subject: [PATCH] Fix glitch in polyhedra --- extensions/fablabchemnitz_polyhedra.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/extensions/fablabchemnitz_polyhedra.py b/extensions/fablabchemnitz_polyhedra.py index fa120e2e..3dd3da93 100644 --- a/extensions/fablabchemnitz_polyhedra.py +++ b/extensions/fablabchemnitz_polyhedra.py @@ -215,14 +215,14 @@ class Polyhedra(inkex.Effect): gear_attribs = {'style':str(inkex.Style(perfStyle)), 'd':path} gear = etree.SubElement(tab_group, inkex.addNS('path','svg'), gear_attribs ) - gsub_attribs = {inkex.addNS('label','inkscape'):'Polygon ' + str( poly ) + 'inside' } - gsub = etree.SubElement(g, 'g', gsub_attribs) + gsub_attribs = {inkex.addNS('label','inkscape'):'Polygon ' + str( poly ) + 'inside' } + gsub = etree.SubElement(g, 'g', gsub_attribs) - for edge in iEI: - points = [(eC[edge[0]-1][0] * scale, eC[edge[0]-1][1] * scale), (eC[edge[1]-1][0] * scale, eC[edge[1]-1][1] * scale)] - path = points_to_svgd( points ) - perf_attribs = {'style':str(inkex.Style(perfStyle)), 'd':path} - gear = etree.SubElement(gsub, inkex.addNS('path','svg'), perf_attribs ) + for edge in iEI: + points = [(eC[edge[0]-1][0] * scale, eC[edge[0]-1][1] * scale), (eC[edge[1]-1][0] * scale, eC[edge[1]-1][1] * scale)] + path = points_to_svgd( points ) + perf_attribs = {'style':str(inkex.Style(perfStyle)), 'd':path} + gear = etree.SubElement(gsub, inkex.addNS('path','svg'), perf_attribs ) if __name__ == '__main__': Polyhedra().run() \ No newline at end of file