refactored file structures to match extension ids, file names and class names

This commit is contained in:
Mario Voigt 2021-06-02 23:30:37 +02:00
parent d95e0ce262
commit e1daf4c934
2405 changed files with 1754 additions and 1775 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>About/Upgrade MightyScape</name> <name>About/Upgrade MightyScape</name>
<id>fablabchemnitz.de.upgrade_mightyscape</id> <id>fablabchemnitz.de.about_upgrade_mightyscape</id>
<param name="stash_untracked" type="bool" gui-hidden="true" gui-text="Stash untracked files and continue to upgrade">false</param> <param name="stash_untracked" type="bool" gui-hidden="true" gui-text="Stash untracked files and continue to upgrade">false</param>
<param name="tab" type="notebook"> <param name="tab" type="notebook">
<page name="tab_about" gui-text="About"> <page name="tab_about" gui-text="About">
@ -35,6 +35,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">upgrade_mightyscape.py</command> <command location="inx" interpreter="python">about_upgrade_mightyscape.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -16,7 +16,7 @@ import os
import warnings import warnings
from datetime import datetime from datetime import datetime
class Upgrade(inkex.EffectExtension): class AboutUpgradeMightyScape(inkex.EffectExtension):
def add_arguments(self, pars): def add_arguments(self, pars):
pars.add_argument("--tab") pars.add_argument("--tab")
@ -109,4 +109,4 @@ class Upgrade(inkex.EffectExtension):
exit(1) exit(1)
if __name__ == '__main__': if __name__ == '__main__':
Upgrade().run() AboutUpgradeMightyScape().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>AI compatible EPS output</name> <name>AI compatible EPS output</name>
<id>fablabchemnitz.de.ai_eps_output</id> <id>fablabchemnitz.de.ai_compatible_eps_output</id>
<output> <output>
<extension>.eps</extension> <extension>.eps</extension>
<mimetype>application/eps</mimetype> <mimetype>application/eps</mimetype>
@ -9,6 +9,6 @@
<filetypetooltip>Adobe Illustrator 7 compatible EPS</filetypetooltip> <filetypetooltip>Adobe Illustrator 7 compatible EPS</filetypetooltip>
</output> </output>
<script> <script>
<command location="inx" interpreter="python">ai_eps_output.py</command> <command location="inx" interpreter="python">ai_compatible_eps_output.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Another Perspective</name> <name>Another Perspective</name>
<id>fablabchemnitz.de.anotherperspective</id> <id>fablabchemnitz.de.another_perspective</id>
<effect> <effect>
<object-type>path</object-type> <object-type>path</object-type>
<effects-menu> <effects-menu>
@ -11,6 +11,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">anotherperspective.py</command> <command location="inx" interpreter="python">another_perspective.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Apollonian Gasket</name> <name>Apollonian Gasket</name>
<id>fablabchemnitz.de.apollonian</id> <id>fablabchemnitz.de.apollonian_gasket</id>
<param name="active_tab" type="notebook"> <param name="active_tab" type="notebook">
<page name="title" gui-text="Settings"> <page name="title" gui-text="Settings">
<param name="depth" type="int" min="2" max="7" gui-text="Depth">3</param> <param name="depth" type="int" min="2" max="7" gui-text="Depth">3</param>
@ -27,6 +27,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">apollonian.py</command> <command location="inx" interpreter="python">apollonian_gasket.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Apply Transformations</name> <name>Apply Transformations</name>
<id>fablabchemnitz.de.applytransform</id> <id>fablabchemnitz.de.apply_transformations</id>
<effect> <effect>
<object-type>all</object-type> <object-type>all</object-type>
<effects-menu> <effects-menu>
@ -11,6 +11,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">applytransform.py</command> <command location="inx" interpreter="python">apply_transformations.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -15,9 +15,7 @@ from inkex.styles import Style
NULL_TRANSFORM = Transform([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]]) NULL_TRANSFORM = Transform([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]])
class ApplyTransform(inkex.EffectExtension): class ApplyTransformations(inkex.EffectExtension):
def __init__(self):
super(ApplyTransform, self).__init__()
def effect(self): def effect(self):
if self.svg.selected: if self.svg.selected:
@ -64,7 +62,7 @@ class ApplyTransform(inkex.EffectExtension):
if 'transform' in element.attrib: if 'transform' in element.attrib:
del element.attrib['transform'] del element.attrib['transform']
element = ApplyTransform.objectToPath(element) element = ApplyTransformations.objectToPath(element)
if transf == NULL_TRANSFORM: if transf == NULL_TRANSFORM:
# Don't do anything if there is effectively no transform applied # Don't do anything if there is effectively no transform applied
@ -205,4 +203,4 @@ class ApplyTransform(inkex.EffectExtension):
self.recursiveFuseTransform(child, transf) self.recursiveFuseTransform(child, transf)
if __name__ == '__main__': if __name__ == '__main__':
ApplyTransform().run() ApplyTransformations().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>The Spiral Of Archimedes</name> <name>Archimedes Spiral</name>
<id>fablabchemnitz.de.archimedesspiral</id> <id>fablabchemnitz.de.archimedes_spiral</id>
<param name="tab" type="notebook"> <param name="tab" type="notebook">
<page name="tab_settings" gui-text="Settings"> <page name="tab_settings" gui-text="Settings">
<label appearance="header">R = r + aθ</label> <label appearance="header">R = r + aθ</label>
@ -16,7 +16,7 @@
<param name="turns" type="int" min="1" max="1000000" gui-text="Turns" gui-description="Works only if you set 'length (mm)' to 0.0">5</param> <param name="turns" type="int" min="1" max="1000000" gui-text="Turns" gui-description="Works only if you set 'length (mm)' to 0.0">5</param>
</page> </page>
<page name="tab_about" gui-text="About"> <page name="tab_about" gui-text="About">
<label appearance="header">The Spiral Of Archimedes</label> <label appearance="header">Archimedes Spiral</label>
<label>2020 - 2021 / written by Mario Voigt (Stadtfabrikanten e.V. / FabLab Chemnitz)</label> <label>2020 - 2021 / written by Mario Voigt (Stadtfabrikanten e.V. / FabLab Chemnitz)</label>
<spacer/> <spacer/>
<label appearance="header">Online Documentation</label> <label appearance="header">Online Documentation</label>
@ -50,6 +50,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">archimedesspiral.py</command> <command location="inx" interpreter="python">archimedes_spiral.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Barrel Distortion</name> <name>Barrel Distortion</name>
<id>fablabchemnitz.de.distorsion</id> <id>fablabchemnitz.de.barrel_distorsion</id>
<param name="lambda_coef" type="float" min="-1000.0" max="0.0" precision="2" gui-text="Lambda parameter">-1.0</param> <param name="lambda_coef" type="float" min="-1000.0" max="0.0" precision="2" gui-text="Lambda parameter">-1.0</param>
<effect> <effect>
<object-type>all</object-type> <object-type>all</object-type>
@ -12,6 +12,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">distortion.py</command> <command location="inx" interpreter="python">barrel_distorsion.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -4,7 +4,7 @@ import inkex
from inkex import bezier from inkex import bezier
from inkex.paths import Path, CubicSuperPath from inkex.paths import Path, CubicSuperPath
class DistortionExtension(inkex.EffectExtension): class BarrelDistorsion(inkex.EffectExtension):
def add_arguments(self, pars): def add_arguments(self, pars):
pars.add_argument("--lambda_coef", type=float, default=-5.0, help="command line help") pars.add_argument("--lambda_coef", type=float, default=-5.0, help="command line help")
@ -97,4 +97,4 @@ class DistortionExtension(inkex.EffectExtension):
if __name__ == '__main__': if __name__ == '__main__':
DistortionExtension().run() BarrelDistorsion().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Bezier Envelope</name> <name>Bezier Envelope</name>
<id>fablabchemnitz.de.envelope</id> <id>fablabchemnitz.de.bezier_envelope</id>
<effect> <effect>
<object-type>path</object-type> <object-type>path</object-type>
<effects-menu> <effects-menu>
@ -11,6 +11,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">bezierenvelope.py</command> <command location="inx" interpreter="python">bezier_envelope.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -7,7 +7,7 @@ import inkex
import random import random
from lxml import etree from lxml import etree
class blobsEffect(inkex.EffectExtension): class Blobs(inkex.EffectExtension):
""" """
Creates a random blob from a convex hull over n points. Creates a random blob from a convex hull over n points.
The expected degree of the polygon is sqrt(n). The corners The expected degree of the polygon is sqrt(n). The corners
@ -166,4 +166,4 @@ def findall(a, f):
return r return r
if __name__ == '__main__': if __name__ == '__main__':
blobsEffect().run() Blobs().run()

View File

@ -56,7 +56,7 @@ class bluePrintMakerData():
self.allowed_ids.append(current_id) self.allowed_ids.append(current_id)
self.allowed_nodes.append(node) self.allowed_nodes.append(node)
class bluePrintMaker(inkex.EffectExtension): class BluePrintMaker(inkex.EffectExtension):
def __init__(self): def __init__(self):
inkex.Effect.__init__(self) inkex.Effect.__init__(self)
@ -114,4 +114,4 @@ class bluePrintMaker(inkex.EffectExtension):
return None return None
if __name__ == '__main__': if __name__ == '__main__':
program=bluePrintMaker().run() BluePrintMaker().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Circular Ground from Template</name> <name>Circular Ground from Template</name>
<id>fablabchemnitz.de.lace_circular_ground</id> <id>fablabchemnitz.de.circular_ground_from_template</id>
<label appearance="header">Wrap lace pattern found in template file around a circle.</label> <label appearance="header">Wrap lace pattern found in template file around a circle.</label>
<label>Note: Drawing can become quite large when "Number of copies around circle" is small or "Diameter" of inside circle is large.</label> <label>Note: Drawing can become quite large when "Number of copies around circle" is small or "Diameter" of inside circle is large.</label>
<param name="file" type="path" gui-text="Template file name (full path):" mode="file" filetypes="txt">./templates/</param> <param name="file" type="path" gui-text="Template file name (full path):" mode="file" filetypes="txt">./templates/</param>
@ -49,6 +49,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">lace_circular_ground.py</command> <command location="inx" interpreter="python">circular_ground_from_template.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -70,7 +70,7 @@ class Vector:
self.theta = _theta self.theta = _theta
class CircularGround(inkex.EffectExtension): class CircularGroundFromTemplate(inkex.EffectExtension):
def unitToUu(self,param): def unitToUu(self,param):
""" Convert units. """ Convert units.
@ -431,4 +431,4 @@ class CircularGround(inkex.EffectExtension):
self.draw(points,line=lambda a: self.line(a)) self.draw(points,line=lambda a: self.line(a))
if __name__ == '__main__': if __name__ == '__main__':
CircularGround().run() CircularGroundFromTemplate().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Ground from Template</name> <name>Ground From Template</name>
<id>fablabchemnitz.de.lace_ground</id> <id>fablabchemnitz.de.ground_from_template</id>
<label appearance="header">Fill a rectangular patch with a lace ground pattern from selected template file.</label> <label appearance="header">Fill a rectangular patch with a lace ground pattern from selected template file.</label>
<param name="file" type="path" gui-text="Template file name (full path):" mode="file" filetypes="txt">./templates/</param> <param name="file" type="path" gui-text="Template file name (full path):" mode="file" filetypes="txt">./templates/</param>
<label appearance="header">Grid description</label> <label appearance="header">Grid description</label>
@ -55,6 +55,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">lace_ground.py</command> <command location="inx" interpreter="python">ground_from_template.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -31,7 +31,7 @@ __author__ = 'Veronika Irvine'
__credits__ = ['Ben Connors', 'Veronika Irvine', 'Mark Shafer'] __credits__ = ['Ben Connors', 'Veronika Irvine', 'Mark Shafer']
__license__ = 'Simplified BSD' __license__ = 'Simplified BSD'
class LaceGround(inkex.EffectExtension): class GroundFromTemplate(inkex.EffectExtension):
def loadFile(self): def loadFile(self):
# Ensure that file exists and has the proper extension # Ensure that file exists and has the proper extension
@ -169,4 +169,4 @@ class LaceGround(inkex.EffectExtension):
self.draw(result['data'],result['rowCount'],result['colCount']) self.draw(result['data'],result['rowCount'],result['colCount'])
if __name__ == '__main__': if __name__ == '__main__':
LaceGround().run() GroundFromTemplate().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Polar Grid</name> <name>Polar Grid</name>
<id>fablabchemnitz.de.lace_polar</id> <id>fablabchemnitz.de.polar_grid</id>
<label>Creates a printable polar grid of dots with a constant number of dots per circle and the distance between circles changing at the same speed as the distance between the dots on a circle.</label> <label>Creates a printable polar grid of dots with a constant number of dots per circle and the distance between circles changing at the same speed as the distance between the dots on a circle.</label>
<label appearance="header">Grid style</label> <label appearance="header">Grid style</label>
<hbox indent="1"> <hbox indent="1">
@ -66,6 +66,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">lace_polar.py</command> <command location="inx" interpreter="python">polar_grid.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Regular Grid</name> <name>Regular Grid</name>
<id>fablabchemnitz.de.lace_grid</id> <id>fablabchemnitz.de.regular_grid</id>
<label appearance="header">Creates a grid of dots of specified angle.</label> <label appearance="header">Creates a grid of dots of specified angle.</label>
<spacer/> <spacer/>
<label appearance="header">Grid description</label> <label appearance="header">Grid description</label>
@ -55,6 +55,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">lace_grid.py</command> <command location="inx" interpreter="python">regular_grid.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -31,7 +31,7 @@ __author__ = 'Veronika Irvine'
__credits__ = ['Ben Connors', 'Veronika Irvine', 'Mark Shafer'] __credits__ = ['Ben Connors', 'Veronika Irvine', 'Mark Shafer']
__license__ = 'Simplified BSD' __license__ = 'Simplified BSD'
class LaceGrid(inkex.EffectExtension): class RegularGrid(inkex.EffectExtension):
def circle(self, x, y, r, fill): def circle(self, x, y, r, fill):
# define the stroke style # define the stroke style
s = {'fill': fill} s = {'fill': fill}
@ -104,4 +104,4 @@ class LaceGrid(inkex.EffectExtension):
self.draw() self.draw()
if __name__ == '__main__': if __name__ == '__main__':
LaceGrid().run() RegularGrid().run()

View File

@ -38,7 +38,7 @@ import re
import inkex import inkex
from lxml import etree from lxml import etree
class BouwkampCodeExtension(inkex.EffectExtension): class BouwkampCode(inkex.EffectExtension):
""" """
This Inkscape extension allows you to generate squared squares and squared rectangles from This Inkscape extension allows you to generate squared squares and squared rectangles from
Bouwkamp codes and table codes. Bouwkamp codes and table codes.
@ -160,4 +160,4 @@ class BouwkampCodeExtension(inkex.EffectExtension):
etree.SubElement(parent, inkex.addNS('rect', 'svg'), rectangle_attributes) etree.SubElement(parent, inkex.addNS('rect', 'svg'), rectangle_attributes)
if __name__ == '__main__': if __name__ == '__main__':
BouwkampCodeExtension().run() BouwkampCode().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Bounding Box</name> <name>Bounding Box</name>
<id>fablabchemnitz.de.boundingbox</id> <id>fablabchemnitz.de.bounding_box</id>
<label>Draws bounding boxes around selected objects, useful for debugging. Author: Pawel Mosakowski. Modded by Mario Voigt.</label> <label>Draws bounding boxes around selected objects, useful for debugging. Author: Pawel Mosakowski. Modded by Mario Voigt.</label>
<param min="-10000.0" max="10000.0" name="offset" type="float" gui-text="Offset from object (all directions)">0.0</param> <param min="-10000.0" max="10000.0" name="offset" type="float" gui-text="Offset from object (all directions)">0.0</param>
<param name="box" type="bool" gui-text="Draw boxes">true</param> <param name="box" type="bool" gui-text="Draw boxes">true</param>
@ -16,6 +16,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">boundingbox.py</command> <command location="inx" interpreter="python">bounding_box.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -4,7 +4,7 @@ import inkex
import math import math
from lxml import etree from lxml import etree
class DrawBBoxes(inkex.EffectExtension): class BoundingBox(inkex.EffectExtension):
def add_arguments(self, pars): def add_arguments(self, pars):
pars.add_argument('--offset', type=float, default=0.0, help='Offset from object (all directions)') pars.add_argument('--offset', type=float, default=0.0, help='Offset from object (all directions)')
@ -47,4 +47,4 @@ class DrawBBoxes(inkex.EffectExtension):
return return
if __name__ == '__main__': if __name__ == '__main__':
DrawBBoxes().run() BoundingBox().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Box Maker - Conical</name> <name>Box Maker - Conical</name>
<id>fablabchemnitz.de.conic_box</id> <id>fablabchemnitz.de.box_maker_conical</id>
<param name="unit" type="optiongroup" appearance="combo" gui-text="Unit"> <param name="unit" type="optiongroup" appearance="combo" gui-text="Unit">
<option value="mm">mm</option> <option value="mm">mm</option>
<option value="cm">cm</option> <option value="cm">cm</option>
@ -29,6 +29,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">conic_box.py</command> <command location="inx" interpreter="python">box_maker_conical.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -225,7 +225,7 @@ def gen_cercle(diametre, nombre_pas, epaisseur, xOffset, yOffset, parent):
index_pas += 1 index_pas += 1
path.GenPath() path.GenPath()
class ConicalBox(inkex.EffectExtension): class BoxMakerConical(inkex.EffectExtension):
""" """
Creates a new layer with the drawings for a parametrically generaded box. Creates a new layer with the drawings for a parametrically generaded box.
""" """
@ -350,4 +350,4 @@ class ConicalBox(inkex.EffectExtension):
gen_cercle(d1, nombre_pas, thickness, -xmax - d1/2 + xOffset + 10, d1/2 + yOffset - ymin + 10, layer) gen_cercle(d1, nombre_pas, thickness, -xmax - d1/2 + xOffset + 10, d1/2 + yOffset - ymin + 10, layer)
if __name__ == '__main__': if __name__ == '__main__':
ConicalBox().run() BoxMakerConical().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Box Maker - Elliptical Box</name> <name>Box Maker - Elliptical Box</name>
<id>fablabchemnitz.de.elliptical_box</id> <id>fablabchemnitz.de.box_maker_elliptical_box</id>
<param name="unit" type="optiongroup" appearance="combo" gui-text="Unit"> <param name="unit" type="optiongroup" appearance="combo" gui-text="Unit">
<option value="mm">mm</option> <option value="mm">mm</option>
<option value="cm">cm</option> <option value="cm">cm</option>
@ -34,6 +34,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">elliptical_box.py</command> <command location="inx" interpreter="python">box_maker_elliptical_box.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -0,0 +1 @@
/DebugEllConicBox.txt

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Box Maker - Elliptical Cone</name> <name>Box Maker - Elliptical Cone</name>
<id>fablabchemnitz.de.elliptical_cone_box</id> <id>fablabchemnitz.de.box_maker_elliptical_cone</id>
<param name="unit" type="optiongroup" appearance="combo" gui-text="Unit"> <param name="unit" type="optiongroup" appearance="combo" gui-text="Unit">
<option value="mm">mm</option> <option value="mm">mm</option>
<option value="cm">cm</option> <option value="cm">cm</option>
@ -32,6 +32,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">elliptical_cone_box.py</command> <command location="inx" interpreter="python">box_maker_elliptical_cone.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -67,7 +67,7 @@ class inkcape_polar:
line_attribs = {'style': objStyle, 'd': self.Path} line_attribs = {'style': objStyle, 'd': self.Path}
etree.SubElement(self.group, inkex.addNS('path', 'svg'), line_attribs) etree.SubElement(self.group, inkex.addNS('path', 'svg'), line_attribs)
class EllConicalBox(inkex.EffectExtension): class BoxMakerEllipticalCone(inkex.EffectExtension):
""" """
Creates a new layer with the drawings for a parametrically generaded box. Creates a new layer with the drawings for a parametrically generaded box.
""" """
@ -700,4 +700,4 @@ class EllConicalBox(inkex.EffectExtension):
self.fDebug.close() self.fDebug.close()
if __name__ == '__main__': if __name__ == '__main__':
EllConicalBox().run() BoxMakerEllipticalCone().run()

View File

@ -0,0 +1 @@
/DebugGenericBox.txt

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Box Maker - Generic Generator</name> <name>Box Maker - Generic Generator</name>
<id>fablabchemnitz.de.gen_box</id> <id>fablabchemnitz.de.box_maker_generic_generator</id>
<param name="Topic" type="notebook"> <param name="Topic" type="notebook">
<page name="dimensions" gui-text="Box dimensions"> <page name="dimensions" gui-text="Box dimensions">
<param name="unit" type="optiongroup" appearance="combo" gui-text="Unit"> <param name="unit" type="optiongroup" appearance="combo" gui-text="Unit">
@ -67,6 +67,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">gen_box.py</command> <command location="inx" interpreter="python">box_maker_generic_generator.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -1827,7 +1827,7 @@ class BoxFace:
class GenericBox(inkex.Effect): class BoxMakerGenericGenerator(inkex.Effect):
""" """
Creates a new layer with the drawings for a parametrically generated box. Creates a new layer with the drawings for a parametrically generated box.
""" """
@ -3053,4 +3053,4 @@ class GenericBox(inkex.Effect):
if __name__ == '__main__': if __name__ == '__main__':
GenericBox().run() BoxMakerGenericGenerator().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Box Maker - Lasercut Box</name> <name>Box Maker - Lasercut Box</name>
<id>fablabchemnitz.de.lasercut_box</id> <id>fablabchemnitz.de.box_maker_lasercut_box</id>
<param name="tab" type="notebook"> <param name="tab" type="notebook">
<page name="Dimensions" gui-text="Dimensions"> <page name="Dimensions" gui-text="Dimensions">
<label xml:space="preserve">Dimensions can measure the external or internal size of the box. <label xml:space="preserve">Dimensions can measure the external or internal size of the box.
@ -84,6 +84,6 @@ This can be helpful if printing tests fits for different materials.
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">lasercut_box.py</command> <command location="inx" interpreter="python">box_maker_lasercut_box.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -42,28 +42,27 @@ import inkex
from inkex.paths import Path from inkex.paths import Path
from lxml import etree from lxml import etree
class LasercutBox(inkex.Effect): class BoxMakerLasercutBox(inkex.EffectExtension):
def __init__(self): def add_arguments(self, pars):
super().__init__() pars.add_argument("-i", "--int_ext", type = inkex.Boolean, default=False, help="Are the Dimensions for External or Internal sizing.")
self.arg_parser.add_argument("-i", "--int_ext", type = inkex.Boolean, default=False, help="Are the Dimensions for External or Internal sizing.") pars.add_argument("-x", "--width", type=float, default=50.0, help="The Box Width - in the X dimension")
self.arg_parser.add_argument("-x", "--width", type=float, default=50.0, help="The Box Width - in the X dimension") pars.add_argument("-y", "--height", type=float, default=30.0, help="The Box Height - in the Y dimension")
self.arg_parser.add_argument("-y", "--height", type=float, default=30.0, help="The Box Height - in the Y dimension") pars.add_argument("-z", "--depth", type=float, default=15.0, help="The Box Depth - in the Z dimension")
self.arg_parser.add_argument("-z", "--depth", type=float, default=15.0, help="The Box Depth - in the Z dimension") pars.add_argument("-t", "--thickness", type=float, default=3.0, help="Material Thickness - critical to know")
self.arg_parser.add_argument("-t", "--thickness", type=float, default=3.0, help="Material Thickness - critical to know") pars.add_argument("-u", "--units", default="cm", help="The unit of the box dimensions")
self.arg_parser.add_argument("-u", "--units", default="cm", help="The unit of the box dimensions") pars.add_argument("-c", "--corners", type = inkex.Boolean, default=True, help="The corner cubes can be removed for a different look")
self.arg_parser.add_argument("-c", "--corners", type = inkex.Boolean, default=True, help="The corner cubes can be removed for a different look") pars.add_argument("-H", "--halftabs", type = inkex.Boolean, default=True, help="Start/End with half-sized tabs - Avoid with very small tabs")
self.arg_parser.add_argument("-H", "--halftabs", type = inkex.Boolean, default=True, help="Start/End with half-sized tabs - Avoid with very small tabs") pars.add_argument("-p", "--ntab_W", type=int, default=11, help="Number of tabs in Width")
self.arg_parser.add_argument("-p", "--ntab_W", type=int, default=11, help="Number of tabs in Width") pars.add_argument("-q", "--ntab_H", type=int, default=11, help="Number of tabs in Height")
self.arg_parser.add_argument("-q", "--ntab_H", type=int, default=11, help="Number of tabs in Height") pars.add_argument("-r", "--ntab_D", type=int, default=6, help="Number of tabs in Depth")
self.arg_parser.add_argument("-r", "--ntab_D", type=int, default=6, help="Number of tabs in Depth") pars.add_argument("-k", "--kerf_size", type=float,default=0.0, help="Kerf size - amount lost to laser for this material. 0 = loose fit")
self.arg_parser.add_argument("-k", "--kerf_size", type=float,default=0.0, help="Kerf size - amount lost to laser for this material. 0 = loose fit") pars.add_argument("-d", "--dimples", type=inkex.Boolean, default=False, help="Add dimples for press fitting wooden materials")
self.arg_parser.add_argument("-d", "--dimples", type=inkex.Boolean, default=False, help="Add dimples for press fitting wooden materials") pars.add_argument("-s", "--dstyle", type=inkex.Boolean, default=False, help="Dimples can be triangles(cheaper) or half rounds(better)")
self.arg_parser.add_argument("-s", "--dstyle", type=inkex.Boolean, default=False, help="Dimples can be triangles(cheaper) or half rounds(better)") pars.add_argument("-g", "--linewidth", type=inkex.Boolean, default=False, help="Use the kerf value as the drawn line width")
self.arg_parser.add_argument("-g", "--linewidth", type=inkex.Boolean, default=False, help="Use the kerf value as the drawn line width") pars.add_argument("-j", "--annotation", type=inkex.Boolean, default=True, help="Show Kerf value as annotation")
self.arg_parser.add_argument("-j", "--annotation", type=inkex.Boolean, default=True, help="Show Kerf value as annotation")
#dummy for the doc tab - which is named #dummy for the doc tab - which is named
self.arg_parser.add_argument("--tab", default="use", help="The selected UI-tab when OK was pressed") pars.add_argument("--tab", default="use", help="The selected UI-tab when OK was pressed")
#internal useful variables #internal useful variables
self.stroke_width = 0.1 #default for visiblity self.stroke_width = 0.1 #default for visiblity
self.line_style = {'stroke': '#0000FF', # Ponoko blue self.line_style = {'stroke': '#0000FF', # Ponoko blue
@ -468,4 +467,4 @@ class LasercutBox(inkex.Effect):
#self.thin(g) # remove short straight lines #self.thin(g) # remove short straight lines
if __name__ == '__main__': if __name__ == '__main__':
LasercutBox().run() BoxMakerLasercutBox().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Box Maker - Living Hinge</name> <name>Box Maker - Living Hinge</name>
<id>fablabchemnitz.de.living_hinge2</id> <id>fablabchemnitz.de.box_maker_living_hinge</id>
<param name="hingeOpt" gui-text="Hinge Type" type="optiongroup" appearance="combo"> <param name="hingeOpt" gui-text="Hinge Type" type="optiongroup" appearance="combo">
<option value="0">Standard parallel slit</option> <option value="0">Standard parallel slit</option>
<option value="1">Single spiral</option> <option value="1">Single spiral</option>
@ -46,6 +46,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">living_hinge2.py</command> <command location="inx" interpreter="python">box_maker_living_hinge.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -191,26 +191,24 @@ def side(rx,ry,sox,soy,eox,eoy,tabVec,length, dirx, diry, isTab, isLongSide, tru
return s return s
#God class. Makes poor design, but not much object oriented in this guy... #God class. Makes poor design, but not much object oriented in this guy...
class LivingHinge(inkex.Effect): class BoxMakerLivingHinge(inkex.EffectExtension):
def __init__(self):
# Call the base class constructor. def add_arguments(self, pars):
inkex.Effect.__init__(self) pars.add_argument('--unit',default='mm',help='Measure Units')
# Define options pars.add_argument('--inside',type=int,default=0,help='Int/Ext Dimension')
self.arg_parser.add_argument('--unit',default='mm',help='Measure Units') pars.add_argument('--length',type=float,default=100,help='Length of Box')
self.arg_parser.add_argument('--inside',type=int,default=0,help='Int/Ext Dimension') pars.add_argument('--width',type=float,default=100,help='Width of Box')
self.arg_parser.add_argument('--length',type=float,default=100,help='Length of Box') pars.add_argument('--height',type=float,default=100,help='Height of Box')
self.arg_parser.add_argument('--width',type=float,default=100,help='Width of Box') pars.add_argument('--tab',type=float,default=25,help='Nominal Tab Width')
self.arg_parser.add_argument('--height',type=float,default=100,help='Height of Box') pars.add_argument('--equal',type=int,default=0,help='Equal/Prop Tabs')
self.arg_parser.add_argument('--tab',type=float,default=25,help='Nominal Tab Width') pars.add_argument('--thickness',type=float,default=10,help='Thickness of Material')
self.arg_parser.add_argument('--equal',type=int,default=0,help='Equal/Prop Tabs') pars.add_argument('--kerf',type=float,default=0.5,help='Kerf (width) of cut')
self.arg_parser.add_argument('--thickness',type=float,default=10,help='Thickness of Material') pars.add_argument('--clearance',type=float,default=0.01,help='Clearance of joints')
self.arg_parser.add_argument('--kerf',type=float,default=0.5,help='Kerf (width) of cut') pars.add_argument('--style',type=int,default=25,help='Layout/Style')
self.arg_parser.add_argument('--clearance',type=float,default=0.01,help='Clearance of joints') pars.add_argument('--spacing',type=float,default=25,help='Part Spacing')
self.arg_parser.add_argument('--style',type=int,default=25,help='Layout/Style') pars.add_argument('--hingeOpt',type=int,default=0,help='Hinge type')
self.arg_parser.add_argument('--spacing',type=float,default=25,help='Part Spacing') pars.add_argument('--hingeThick',type=float,default=0,help='Hinge thickness')
self.arg_parser.add_argument('--hingeOpt',type=int,default=0,help='Hinge type') pars.add_argument('--thumbTab',default=0,help='Add a thumb tab')
self.arg_parser.add_argument('--hingeThick',type=float,default=0,help='Hinge thickness')
self.arg_parser.add_argument('--thumbTab',default=0,help='Add a thumb tab')
""" """
Traditional multi-slit design. Traditional multi-slit design.
@ -510,4 +508,4 @@ class LivingHinge(inkex.Effect):
self.livingHinge4(x+(Z/2), y + (dy/2) - thickness, (x+(Z/2)+(EllipseCircumference(X/2, Z/2)/4)), y + dy, True, 1, hingeThick) self.livingHinge4(x+(Z/2), y + (dy/2) - thickness, (x+(Z/2)+(EllipseCircumference(X/2, Z/2)/4)), y + dy, True, 1, hingeThick)
if __name__ == '__main__': if __name__ == '__main__':
LivingHinge().run() BoxMakerLivingHinge().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Box Maker - Mehr Boxes</name> <name>Box Maker - Mehr Boxes</name>
<id>fablabchemnitz.de.mehrbox</id> <id>fablabchemnitz.de.box_maker_mehr_boxes</id>
<param name="page" type="notebook"> <param name="page" type="notebook">
<page name="page_1" gui-text="Sizes"> <page name="page_1" gui-text="Sizes">
<param name="unit" gui-text="Unit" type="optiongroup" appearance="combo"> <param name="unit" gui-text="Unit" type="optiongroup" appearance="combo">
@ -69,6 +69,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">mehrbox.py</command> <command location="inx" interpreter="python">box_maker_mehr_boxes.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -0,0 +1 @@
/DebugPath2Flex.txt

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Box Maker - Path To Flex</name> <name>Box Maker - Path To Flex</name>
<id>fablabchemnitz.de.path2flex</id> <id>fablabchemnitz.de.box_maker_path_to_flex</id>
<param name="unit" type="optiongroup" appearance="combo" gui-text="Unit"> <param name="unit" type="optiongroup" appearance="combo" gui-text="Unit">
<option value="mm">mm</option> <option value="mm">mm</option>
<option value="cm">cm</option> <option value="cm">cm</option>
@ -28,6 +28,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">path2flex.py</command> <command location="inx" interpreter="python">box_maker_path_to_flex.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -294,17 +294,16 @@ def Solve2nd(a, b, c):
def distance2points(x0, y0, x1, y1): def distance2points(x0, y0, x1, y1):
return math.hypot(x0-x1,y0-y1) return math.hypot(x0-x1,y0-y1)
class Path2Flex(inkex.Effect): class BoxMakerPathToFlex(inkex.EffectExtension):
def __init__(self): def add_arguments(self, pars):
inkex.Effect.__init__(self)
self.knownUnits = ['in', 'pt', 'px', 'mm', 'cm', 'm', 'km', 'pc', 'yd', 'ft'] self.knownUnits = ['in', 'pt', 'px', 'mm', 'cm', 'm', 'km', 'pc', 'yd', 'ft']
self.arg_parser.add_argument('--unit', default = 'mm', help = 'Unit, should be one of ') pars.add_argument('--unit', default = 'mm', help = 'Unit, should be one of ')
self.arg_parser.add_argument('--thickness', type = float, default = '3.0', help = 'Material thickness') pars.add_argument('--thickness', type = float, default = '3.0', help = 'Material thickness')
self.arg_parser.add_argument('--zc', type = float, default = '50.0', help = 'Flex height') pars.add_argument('--zc', type = float, default = '50.0', help = 'Flex height')
self.arg_parser.add_argument('--notch_interval', type = int, default = '2', help = 'Interval between notches') pars.add_argument('--notch_interval', type = int, default = '2', help = 'Interval between notches')
self.arg_parser.add_argument('--max_size_flex', type = float, default = '1000.0', help = 'Max size of a single band of flex, above this limit it will be cut') pars.add_argument('--max_size_flex', type = float, default = '1000.0', help = 'Max size of a single band of flex, above this limit it will be cut')
self.arg_parser.add_argument('--Mode_Debug', type = inkex.Boolean, default = 'false', help = 'Output Debug information in file') pars.add_argument('--Mode_Debug', type = inkex.Boolean, default = 'false', help = 'Output Debug information in file')
# Dictionary of paths we will construct. It's keyed by the SVG node # Dictionary of paths we will construct. It's keyed by the SVG node
# it came from. Such keying isn't too useful in this specific case, # it came from. Such keying isn't too useful in this specific case,
@ -1352,4 +1351,4 @@ class Path2Flex(inkex.Effect):
self.fDebug.close() self.fDebug.close()
if __name__ == '__main__': if __name__ == '__main__':
Path2Flex().run() BoxMakerPathToFlex().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Box Maker - Tabbed</name> <name>Box Maker - Tabbed</name>
<id>fablabchemnitz.de.boxmaker.tabbed</id> <id>fablabchemnitz.de.box_maker_tabbed</id>
<hbox> <hbox>
<vbox> <vbox>
<label>Dimensions</label> <label>Dimensions</label>
@ -83,6 +83,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">boxmaker.py</command> <command location="inx" interpreter="python">box_maker_tabbed.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Box Maker - Schroff</name> <name>Box Maker - Schroff</name>
<id>fablabchemnitz.de.boxmaker.schroff</id> <id>fablabchemnitz.de.box_maker_schroff</id>
<param name="unit" type="string" gui-hidden="true">mm</param> <param name="unit" type="string" gui-hidden="true">mm</param>
<param name="inside" type="string" gui-hidden="true">1</param> <param name="inside" type="string" gui-hidden="true">1</param>
<param name="schroff" type="int" gui-hidden="true">1</param> <param name="schroff" type="int" gui-hidden="true">1</param>
@ -43,6 +43,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">boxmaker.py</command> <command location="inx" interpreter="python">box_maker_tabbed.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -63,6 +63,6 @@ These patterns allow otherwise rigid materials (eg wood, acrylic) to have bends
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">living_hinge.py</command> <command location="inx" interpreter="python">buxtronix_living_hinges.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -344,7 +344,7 @@ class WavyLatticeGenerator(Generator):
) )
class LivingHingeEffect(inkex.EffectExtension): class BuxtronixLivingHinges(inkex.EffectExtension):
""" """
Extension to create laser cut bend lattices. Extension to create laser cut bend lattices.
""" """
@ -447,4 +447,4 @@ class LivingHingeEffect(inkex.EffectExtension):
y = bbox.y.minimum y = bbox.y.minimum
draw_one(x, y) draw_one(x, y)
LivingHingeEffect().run() BuxtronixLivingHinges().run()

View File

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Can Generator</name> <name>Can Generator</name>
<id>fablabchemnitz.de.can_generator</id> <id>fablabchemnitz.de.can_generator</id>

View File

@ -34,7 +34,7 @@ def punkte_erstellen(punkte, x, y):
###Schreibt die aktuellen Koordinaten in die Punkteliste ###Schreibt die aktuellen Koordinaten in die Punkteliste
punkte.append((x, y)) punkte.append((x, y))
class Dose(inkex.EffectExtension): class CanGenerator(inkex.EffectExtension):
def add_arguments(self, pars): def add_arguments(self, pars):
pars.add_argument("--height", type=int, default = 50, help="Höhe der Dose") pars.add_argument("--height", type=int, default = 50, help="Höhe der Dose")
@ -368,4 +368,4 @@ class Dose(inkex.EffectExtension):
branding_line.text = 'Die Einschnitte nur zu 70 Prozent in das Material lasern' branding_line.text = 'Die Einschnitte nur zu 70 Prozent in das Material lasern'
if __name__ == '__main__': if __name__ == '__main__':
Dose().run() CanGenerator().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Cards Layout Guides</name> <name>Cards Layout Guides</name>
<id>fablabchemnitz.de.CardLayoutGuides</id> <id>fablabchemnitz.de.card_layout_guides</id>
<param name="layout" type="optiongroup" appearance="combo" gui-text="Layout Type"> <param name="layout" type="optiongroup" appearance="combo" gui-text="Layout Type">
<option value="SIMPLE">Simple Grid</option> <option value="SIMPLE">Simple Grid</option>
<option value="FOLDING">Folding Grid</option> <option value="FOLDING">Folding Grid</option>
@ -24,6 +24,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">CardLayoutGuides.py</command> <command location="inx" interpreter="python">card_layout_guides.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -432,7 +432,7 @@ class LineGeneratorForHorizontalCards(LineGeneratorBase):
return lines return lines
class FoldedCardLayoutGuidesEffect(inkex.EffectExtension): class CardLayoutGuides(inkex.EffectExtension):
def add_arguments(self, pars): def add_arguments(self, pars):
pars.add_argument('-l', '--layout') pars.add_argument('-l', '--layout')
@ -477,4 +477,4 @@ class FoldedCardLayoutGuidesEffect(inkex.EffectExtension):
gen.GenerateCropMarks(layer) gen.GenerateCropMarks(layer)
if __name__ == '__main__': if __name__ == '__main__':
FoldedCardLayoutGuidesEffect().run() CardLayoutGuides().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Chip Scratches</name> <name>Chip Scratches</name>
<id>fablabchemnitz.de.chipScratches</id> <id>fablabchemnitz.de.chip_scratches</id>
<param type="notebook" name="Nmain"> <param type="notebook" name="Nmain">
<page name="Overall" gui-text="Overall"> <page name="Overall" gui-text="Overall">
<!-- Dummy line for index. Nmain Current index tab "page" --> <!-- Dummy line for index. Nmain Current index tab "page" -->
@ -45,6 +45,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">chipScratches.py</command> <command location="inx" interpreter="python">chip_scratches.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -74,7 +74,7 @@ global /inxGen/ =1 and run the file stand-alone.
- AK Sept 2018 - AK Sept 2018
""" """
class noiseEffect(inkex.EffectExtension): class ChipScratches(inkex.EffectExtension):
""" """
Creates visual noise. 3 kinds: Scratches, chips, specks. Creates visual noise. 3 kinds: Scratches, chips, specks.
50, 100, 100 instances are predefined. These are chosen 50, 100, 100 instances are predefined. These are chosen
@ -109,27 +109,16 @@ for number and size, as well as some specific to each type.
def effect(self): def effect(self):
# Get access to main SVG document element and get its dimensions. # Get access to main SVG document element and get its dimensions.
svg = self.document.getroot()
if self.options.pgsizep: if self.options.pgsizep:
rx = self.svg.unittouu(svg.get('width')) rx = self.svg.unittouu(self.svg.get('width'))
ry = self.svg.unittouu(svg.attrib['height']) ry = self.svg.unittouu(self.svg.attrib['height'])
else: else:
rx = self.options.rx rx = self.options.rx
ry = self.options.ry ry = self.options.ry
parent = self.document.getroot()
svg = self.document.getroot()
seld = self.svg.selected
if len(seld) :
id = seld.keys()[0]
sel = seld[id]
parent = self.getParentNode(sel)
else :
parent = svg
#Create scratches #Create scratches
pdic = { pdic = {
'rx' : rx, 'rx' : rx,
'ry' : ry, 'ry' : ry,
@ -779,4 +768,4 @@ def addparms( p ) :
return s return s
if __name__ == '__main__': if __name__ == '__main__':
noiseEffect().run() ChipScratches().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Circle Tangents</name> <name>Circle Tangents</name>
<id>fablabchemnitz.de.tangent</id> <id>fablabchemnitz.de.circle_tangents</id>
<param name="position" type="optiongroup" appearance="combo" gui-text="Outer or inner?"> <param name="position" type="optiongroup" appearance="combo" gui-text="Outer or inner?">
<option value="inner">Inner</option> <option value="inner">Inner</option>
<option value="outer">Outer</option> <option value="outer">Outer</option>
@ -11,6 +11,7 @@
<option value="second">Second</option> <option value="second">Second</option>
<option value="both">Both</option> <option value="both">Both</option>
</param> </param>
<param name="use_style_from_first" type="bool" gui-text="Use style from first selected">true</param>
<effect> <effect>
<object-type>all</object-type> <object-type>all</object-type>
<effects-menu> <effects-menu>
@ -20,6 +21,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">tangent.py</command> <command location="inx" interpreter="python">circle_tangents.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -104,11 +104,12 @@ def getPathData(obj):
return data return data
class Tangent(inkex.Effect): class CircleTangents(inkex.EffectExtension):
def __init__(self):
inkex.Effect.__init__(self) def add_arguments(self, pars):
self.arg_parser.add_argument("--position", default="inner", help="Choose either inner or outer tangent lines") pars.add_argument("--position", default="inner", help="Choose either inner or outer tangent lines")
self.arg_parser.add_argument("--selector", default="both", help="Choose which tangents you want to get") pars.add_argument("--selector", default="both", help="Choose which tangents you want to get")
pars.add_argument("--use_style_from_first", type=inkex.Boolean, default=False, help="Use style from first selected")
def effect(self): def effect(self):
if len(self.options.ids) != 2: if len(self.options.ids) != 2:
@ -118,6 +119,10 @@ class Tangent(inkex.Effect):
c1object = self.svg.selected[self.options.ids[0]] c1object = self.svg.selected[self.options.ids[0]]
c2object = self.svg.selected[self.options.ids[1]] c2object = self.svg.selected[self.options.ids[1]]
if c1object.tag != inkex.addNS('circle','svg') or c2object.tag != inkex.addNS('circle','svg'):
self.msg("One or both objects are not svg:circle elements!")
return
c1 = getPathData(c1object) c1 = getPathData(c1object)
c2 = getPathData(c2object) c2 = getPathData(c2object)
@ -196,7 +201,10 @@ class Tangent(inkex.Effect):
# Draw a line # Draw a line
llx1 = cyfA[0] llx1 = cyfA[0]
lly1 = cyfA[1] lly1 = cyfA[1]
llsteil = (c1object.get("style")) if self.options.use_style_from_first is True:
llsteil = (c1object.get("style")) #note: if the selected objects do not contain a stroke width the tangents will be invisible!
else:
llsteil = "stroke:#000000; stroke-width:1px; fill:none;"
# Line 1 # Line 1
if self.options.selector == "first" or self.options.selector == "both": if self.options.selector == "first" or self.options.selector == "both":
@ -219,4 +227,4 @@ class Tangent(inkex.Effect):
etree.SubElement(parent, inkex.addNS('path','svg'), attribsLine1 ) etree.SubElement(parent, inkex.addNS('path','svg'), attribsLine1 )
if __name__ == '__main__': if __name__ == '__main__':
Tangent().run() CircleTangents().run()

View File

@ -32,7 +32,7 @@ Notes:
import inkex import inkex
import re import re
class Cleanup(inkex.EffectExtension): class CleanupStyles(inkex.EffectExtension):
groups = [] groups = []
@ -184,4 +184,4 @@ class Cleanup(inkex.EffectExtension):
self.groups.append(node) self.groups.append(node)
if __name__ == '__main__': if __name__ == '__main__':
Cleanup().run() CleanupStyles().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Clones In Perspective</name> <name>Clones In Perspective</name>
<id>fablabchemnitz.de.clonesperspective</id> <id>fablabchemnitz.de.clones_in_perspective</id>
<param max="256" name="num" type="int" gui-text="How many?">5</param> <param max="256" name="num" type="int" gui-text="How many?">5</param>
<param max="0.9999" precision="4" name="ratio" type="float" gui-text="relative size">0.8</param> <param max="0.9999" precision="4" name="ratio" type="float" gui-text="relative size">0.8</param>
<effect> <effect>
@ -13,6 +13,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">clonesperspective.py</command> <command location="inx" interpreter="python">clones_in_perspective.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -4,7 +4,7 @@ import math
import inkex import inkex
from lxml import etree from lxml import etree
class clonesPerspectiveEffect(inkex.EffectExtension): class clonesInPerspective(inkex.EffectExtension):
def add_arguments(self, pars): def add_arguments(self, pars):
pars.add_argument('--num', type = int, default = 5, help = 'Drag out center of rotation before calling') pars.add_argument('--num', type = int, default = 5, help = 'Drag out center of rotation before calling')
@ -60,4 +60,4 @@ class clonesPerspectiveEffect(inkex.EffectExtension):
parent.insert(j, etree.Element('use', att)) parent.insert(j, etree.Element('use', att))
if __name__ == '__main__': if __name__ == '__main__':
clonesPerspectiveEffect().run() clonesInPerspective().run()

View File

@ -28,7 +28,7 @@ import inkex
import re import re
from inkex.paths import Path from inkex.paths import Path
class CloseCurves(inkex.EffectExtension): class ClosePaths(inkex.EffectExtension):
def effect(self): def effect(self):
for id, node in self.svg.selected.items(): for id, node in self.svg.selected.items():
@ -40,4 +40,4 @@ class CloseCurves(inkex.EffectExtension):
node.set('d', d) node.set('d', d)
if __name__ == '__main__': if __name__ == '__main__':
CloseCurves().run() ClosePaths().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Colorize Path Lengths</name> <name>Colorize Path Lengths</name>
<id>fablabchemnitz.de.pathselection</id> <id>fablabchemnitz.de.colorize_path_lengths</id>
<param name="selection" type="optiongroup" appearance="combo" gui-text="Selection: "> <param name="selection" type="optiongroup" appearance="combo" gui-text="Selection: ">
<option value="path_lengthselection">Length selection</option> <option value="path_lengthselection">Length selection</option>
<option value="path_slantselection">Slant selection</option> <option value="path_slantselection">Slant selection</option>
@ -23,6 +23,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">pathselection.py</command> <command location="inx" interpreter="python">colorize_path_lengths.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -55,7 +55,7 @@ def roughBBox(path):
tn=(yMax-ymin)/(xMax-xmin) tn=(yMax-ymin)/(xMax-xmin)
return tn return tn
class Length(inkex.EffectExtension): class ColorizePathLengths(inkex.EffectExtension):
def add_arguments(self, pars): def add_arguments(self, pars):
pars.add_argument("-s", "--selection", default=True, help="select path with length or slant") pars.add_argument("-s", "--selection", default=True, help="select path with length or slant")
@ -135,4 +135,4 @@ class Length(inkex.EffectExtension):
return return
if __name__ == '__main__': if __name__ == '__main__':
Length().run() ColorizePathLengths().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Convert To Polylines</name> <name>Convert To Polylines</name>
<id>fablabchemnitz.de.convert_polylines</id> <id>fablabchemnitz.de.convert_to_polylines</id>
<effect> <effect>
<object-type>path</object-type> <object-type>path</object-type>
<effects-menu> <effects-menu>
@ -11,6 +11,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">convert_polylines.py</command> <command location="inx" interpreter="python">convert_to_polylines.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Convert Vertical/Horizontal To Line</name> <name>Convert Vertical/Horizontal To Line</name>
<id>fablabchemnitz.de.vh_to_line</id> <id>fablabchemnitz.de.convert_vertical_horizontal_to_line</id>
<effect> <effect>
<object-type>path</object-type> <object-type>path</object-type>
<effects-menu> <effects-menu>
@ -11,6 +11,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">vh_to_line.py</command> <command location="inx" interpreter="python">convert_vertical_horizontal_to_line.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -23,7 +23,7 @@ from math import *
import inkex import inkex
from inkex.paths import Path, CubicSuperPath from inkex.paths import Path, CubicSuperPath
class VHToLine(inkex.EffectExtension): class ConvertVerticalHorizontalToLine(inkex.EffectExtension):
def effect(self): def effect(self):
if len(self.svg.selected) == 0: exit("Please select at least one path.") if len(self.svg.selected) == 0: exit("Please select at least one path.")
@ -61,4 +61,4 @@ class VHToLine(inkex.EffectExtension):
else: else:
inkex.utils.debug("Object " + obj.get('id') + " is not a path. Please convert it to a path first.") inkex.utils.debug("Object " + obj.get('id') + " is not a path. Please convert it to a path first.")
if __name__ == '__main__': if __name__ == '__main__':
VHToLine().run() ConvertVerticalHorizontalToLine().run()

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Convex Hull</name> <name>Convex Hull</name>
<id>fablabchemnitz.de.convexhull</id> <id>fablabchemnitz.de.convex_hull</id>
<effect needs-live-preview="false"> <effect needs-live-preview="false">
<object-type>all</object-type> <object-type>all</object-type>
<effects-menu> <effects-menu>
@ -11,6 +11,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">convexhull.py</command> <command location="inx" interpreter="python">convex_hull.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Create Hexmap</name> <name>Create Hexmap</name>
<id>fablabchemnitz.de.hexmap</id> <id>fablabchemnitz.de.create_hexmap</id>
<param name="tab" type="notebook"> <param name="tab" type="notebook">
<page name="page_1" gui-text="Size"> <page name="page_1" gui-text="Size">
<param name="units" type="optiongroup" appearance="combo" gui-text="Size units"> <param name="units" type="optiongroup" appearance="combo" gui-text="Size units">
@ -58,6 +58,6 @@
</effects-menu> </effects-menu>
</effect> </effect>
<script> <script>
<command location="inx" interpreter="python">hexmap.py</command> <command location="inx" interpreter="python">create_hexmap.py</command>
</script> </script>
</inkscape-extension> </inkscape-extension>

View File

@ -44,39 +44,39 @@ COORD_SIZE_PART_OF_HEX_HEIGHT = 0.1
COORD_YOFFSET_PART = 75 COORD_YOFFSET_PART = 75
CENTERDOT_SIZE_FACTOR = 1.1690625 CENTERDOT_SIZE_FACTOR = 1.1690625
class HexmapEffect(inkex.Effect): class CreateHexmap(inkex.EffectExtension):
def __init__(self):
inkex.Effect.__init__(self) def add_arguments(self, pars):
self.arg_parser.add_argument('--tab') pars.add_argument('--tab')
self.arg_parser.add_argument('--generatelog', type = inkex.Boolean, default = False) pars.add_argument('--generatelog', type = inkex.Boolean, default = False)
self.arg_parser.add_argument('--logfilepath', default = "debug.txt") pars.add_argument('--logfilepath', default = "debug.txt")
self.arg_parser.add_argument("--units", default='mm', help="Units this dialog is using") pars.add_argument("--units", default='mm', help="Units this dialog is using")
self.arg_parser.add_argument('--cols', type = int, default = '10', help = 'Number of columns.') pars.add_argument('--cols', type = int, default = '10', help = 'Number of columns.')
self.arg_parser.add_argument('--rows', type = int, default = '10', help = 'Number of columns.') pars.add_argument('--rows', type = int, default = '10', help = 'Number of columns.')
self.arg_parser.add_argument('--hexsize', type = float, default = 0.0) pars.add_argument('--hexsize', type = float, default = 0.0)
self.arg_parser.add_argument('--strokewidth', type = float, default = 1.0) pars.add_argument('--strokewidth', type = float, default = 1.0)
self.arg_parser.add_argument('--coordrows', type = int, default = '1') pars.add_argument('--coordrows', type = int, default = '1')
self.arg_parser.add_argument('--coordcolstart', type = int, default = '1') pars.add_argument('--coordcolstart', type = int, default = '1')
self.arg_parser.add_argument('--coordrowstart', type = int, default = '1') pars.add_argument('--coordrowstart', type = int, default = '1')
self.arg_parser.add_argument('--bricks', type = inkex.Boolean, default = False) pars.add_argument('--bricks', type = inkex.Boolean, default = False)
self.arg_parser.add_argument('--squarebricks', type = inkex.Boolean, default = False) pars.add_argument('--squarebricks', type = inkex.Boolean, default = False)
self.arg_parser.add_argument('--rotate', type = inkex.Boolean, default = False) pars.add_argument('--rotate', type = inkex.Boolean, default = False)
self.arg_parser.add_argument('--coordseparator', default = '') pars.add_argument('--coordseparator', default = '')
self.arg_parser.add_argument('--layersingroup', type = inkex.Boolean, default = False, help = 'Put all layers in a layer group.') pars.add_argument('--layersingroup', type = inkex.Boolean, default = False, help = 'Put all layers in a layer group.')
self.arg_parser.add_argument('--coordalphacol', type = inkex.Boolean, default = False, help = 'Reverse row coordinates.') pars.add_argument('--coordalphacol', type = inkex.Boolean, default = False, help = 'Reverse row coordinates.')
self.arg_parser.add_argument('--coordrevrow', type = inkex.Boolean, default = False, help = 'Reverse row coordinates.') pars.add_argument('--coordrevrow', type = inkex.Boolean, default = False, help = 'Reverse row coordinates.')
self.arg_parser.add_argument('--coordzeros', type = inkex.Boolean, default = True) pars.add_argument('--coordzeros', type = inkex.Boolean, default = True)
self.arg_parser.add_argument('--coordrowfirst', type = inkex.Boolean, default = False, help = 'Reverse row coordinates.') pars.add_argument('--coordrowfirst', type = inkex.Boolean, default = False, help = 'Reverse row coordinates.')
self.arg_parser.add_argument('--xshift', type = inkex.Boolean, default = False, help = 'Shift grid half hex and wrap.') pars.add_argument('--xshift', type = inkex.Boolean, default = False, help = 'Shift grid half hex and wrap.')
self.arg_parser.add_argument('--firstcoldown', type = inkex.Boolean, default = False, help = 'Make first column half-hex down.') pars.add_argument('--firstcoldown', type = inkex.Boolean, default = False, help = 'Make first column half-hex down.')
self.arg_parser.add_argument('--halfhexes', type = inkex.Boolean, default = False) pars.add_argument('--halfhexes', type = inkex.Boolean, default = False)
self.arg_parser.add_argument('--verticesize', type = float,default = 1.0) pars.add_argument('--verticesize', type = float,default = 1.0)
self.arg_parser.add_argument('--layer_grid', type = inkex.Boolean, default = True) pars.add_argument('--layer_grid', type = inkex.Boolean, default = True)
self.arg_parser.add_argument('--layer_fill', type = inkex.Boolean, default = True) pars.add_argument('--layer_fill', type = inkex.Boolean, default = True)
self.arg_parser.add_argument('--layer_coordinates', type = inkex.Boolean, default = True) pars.add_argument('--layer_coordinates', type = inkex.Boolean, default = True)
self.arg_parser.add_argument('--layer_centerdots', type = inkex.Boolean, default = True) pars.add_argument('--layer_centerdots', type = inkex.Boolean, default = True)
self.arg_parser.add_argument('--layer_vertices', type = inkex.Boolean, default = False) pars.add_argument('--layer_vertices', type = inkex.Boolean, default = False)
self.arg_parser.add_argument('--layer_circles', type = inkex.Boolean, default = False) pars.add_argument('--layer_circles', type = inkex.Boolean, default = False)
def createLayer(self, name): def createLayer(self, name):
layer = etree.Element(inkex.addNS('g', 'svg')) layer = etree.Element(inkex.addNS('g', 'svg'))
@ -417,4 +417,4 @@ class HexmapEffect(inkex.Effect):
svg.append(layer) svg.append(layer)
if __name__ == '__main__': if __name__ == '__main__':
HexmapEffect().run() CreateHexmap().run()

View File

@ -0,0 +1 @@
/Debug_CutOptim.txt

Some files were not shown because too many files have changed in this diff Show More