From 1ce07959f3a9f2185ac6541ab467ce6d2e8c5bf1 Mon Sep 17 00:00:00 2001 From: Mario Voigt Date: Thu, 20 Aug 2020 13:12:34 +0200 Subject: [PATCH] Several cleanings --- extensions/fablabchemnitz_affine_spirals.py | 4 +- .../fablabchemnitz_anotherperspective.py | 4 +- extensions/fablabchemnitz_apollonian.inx | 8 ---- extensions/fablabchemnitz_apollonian.py | 5 +- .../fablabchemnitz_attributes_cleaner.inx | 4 +- .../fablabchemnitz_attributes_editor.inx | 4 +- .../fablabchemnitz_attributes_editor.py | 5 +- .../fablabchemnitz_attributes_import.inx | 4 +- extensions/fablabchemnitz_bouwkamp_code.py | 9 +--- extensions/fablabchemnitz_boxmaker.inx | 2 +- extensions/fablabchemnitz_boxmaker.py | 21 ++++---- extensions/fablabchemnitz_can_generator.py | 10 +--- extensions/fablabchemnitz_chain_paths.py | 9 ++-- extensions/fablabchemnitz_dots2pathpoints.py | 5 +- .../fablabchemnitz_endurance_line_shading.py | 3 +- .../fablabchemnitz_exponential_distort.py | 8 ++-- extensions/fablabchemnitz_fibonaccipattern.py | 6 +-- .../fablabchemnitz_gridstrip_creator.py | 48 +------------------ extensions/fablabchemnitz_inkcut.py | 2 +- extensions/fablabchemnitz_inkcut_cut.py | 4 +- extensions/fablabchemnitz_inkcut_open.py | 2 +- .../fablabchemnitz_isometric_projection.py | 5 +- extensions/fablabchemnitz_jpegexport.py | 3 +- extensions/fablabchemnitz_living_hinge2.py | 22 ++++----- extensions/fablabchemnitz_lyz_export.py | 26 ++++------ extensions/fablabchemnitz_lyz_inkex.py | 10 ++-- extensions/fablabchemnitz_next_gen.py | 4 +- extensions/fablabchemnitz_paste_length.py | 4 +- extensions/fablabchemnitz_paths2openscad.py | 5 +- extensions/fablabchemnitz_realscale.py | 8 ++-- extensions/fablabchemnitz_split_bezier.py | 2 +- extensions/fablabchemnitz_tangent.py | 7 +-- extensions/fablabchemnitz_tool_covers.py | 43 +++++++---------- extensions/fablabchemnitz_travel.py | 6 +-- extensions/fablabchemnitz_zoetrope.py | 10 +--- 35 files changed, 104 insertions(+), 218 deletions(-) diff --git a/extensions/fablabchemnitz_affine_spirals.py b/extensions/fablabchemnitz_affine_spirals.py index 762fe2ca..b46530bb 100644 --- a/extensions/fablabchemnitz_affine_spirals.py +++ b/extensions/fablabchemnitz_affine_spirals.py @@ -4,7 +4,6 @@ import inkex from lxml import etree from math import cos, sin, pi, exp __version__ = '0.1' -inkex.localization.localize def line(npts=40, x0=0, y0=0, delta=.5, sgn=1): #returns a list of points on a line (y = +/- x + c) starting at x0,y0 @@ -96,5 +95,4 @@ class AffineTorus(inkex.Effect): # choose a better name curve_attribs = { 'style': styles[0], 'd': payload} etree.SubElement(topgroup, inkex.addNS('path','svg'), curve_attribs) -if __name__ == '__main__': - AffineTorus().run() \ No newline at end of file +AffineTorus().run() \ No newline at end of file diff --git a/extensions/fablabchemnitz_anotherperspective.py b/extensions/fablabchemnitz_anotherperspective.py index 7ab04925..792ad2fa 100644 --- a/extensions/fablabchemnitz_anotherperspective.py +++ b/extensions/fablabchemnitz_anotherperspective.py @@ -257,14 +257,14 @@ class AnotherPerspective(inkex.Effect): def effect(self): if len(self.options.ids) < 2: - inkex.errormsg(_("This extension requires two selected paths.")) + inkex.errormsg("This extension requires two selected paths.") exit() obj = self.svg.selected[self.options.ids[0]] envelope = self.svg.selected[self.options.ids[1]] if obj.get(inkex.addNS('type','sodipodi')): - inkex.errormsg(_("The first selected object is of type '%s'.\nTry using the procedure Path->Object to Path." % obj.get(inkex.addNS('type','sodipodi')))) + inkex.errormsg("The first selected object is of type '%s'.\nTry using the procedure Path->Object to Path." % obj.get(inkex.addNS('type','sodipodi'))) exit() if obj.tag == inkex.addNS('path','svg') or obj.tag == inkex.addNS('g','svg'): diff --git a/extensions/fablabchemnitz_apollonian.inx b/extensions/fablabchemnitz_apollonian.inx index 57cab1f7..de7c1fb4 100644 --- a/extensions/fablabchemnitz_apollonian.inx +++ b/extensions/fablabchemnitz_apollonian.inx @@ -5,15 +5,12 @@ 3 - ------------------------------ 2.0 3.0 3.0 - ------------------------------ true - Make an apollonian gasket: @@ -25,11 +22,6 @@ for details of construction. - - - No help needed. - - all diff --git a/extensions/fablabchemnitz_apollonian.py b/extensions/fablabchemnitz_apollonian.py index e7bc1200..ebdb80b1 100644 --- a/extensions/fablabchemnitz_apollonian.py +++ b/extensions/fablabchemnitz_apollonian.py @@ -6,8 +6,6 @@ from lxml import etree __version__ = '0.0' -inkex.localization.localize() - def cplxs2pts(zs): tt = [] for z in zs: @@ -94,5 +92,4 @@ class Gasket(inkex.Effect): # choose a better name cx, cy, r = scale_factor*cx , scale_factor*cy, scale_factor*r draw_SVG_circle(topgroup,r,cx,cy,'apo') -if __name__ == '__main__': - Gasket().run() \ No newline at end of file +Gasket().run() \ No newline at end of file diff --git a/extensions/fablabchemnitz_attributes_cleaner.inx b/extensions/fablabchemnitz_attributes_cleaner.inx index a6ec1ace..7b07d00a 100644 --- a/extensions/fablabchemnitz_attributes_cleaner.inx +++ b/extensions/fablabchemnitz_attributes_cleaner.inx @@ -9,7 +9,9 @@ all - + + +