diff --git a/extensions/fablabchemnitz/vpypetools/vpypetools.py b/extensions/fablabchemnitz/vpypetools/vpypetools.py index c51f570c..a86dbd18 100644 --- a/extensions/fablabchemnitz/vpypetools/vpypetools.py +++ b/extensions/fablabchemnitz/vpypetools/vpypetools.py @@ -97,6 +97,11 @@ class vpypetools (inkex.EffectExtension): pars.add_argument("--plugin_occult_tolerance", type=float, default=0.01, help="Max distance between start and end point to consider a path closed (default 0.01 mm)") pars.add_argument("--plugin_occult_keepseparatelayer", type=inkex.Boolean, default=False, help="Put occulted lines to separate layer") + # Plugin Deduplicate + pars.add_argument("--plugin_deduplicate", type=inkex.Boolean, default=False) + pars.add_argument("--plugin_deduplicate_tolerance", type=float, default=0.01, help="Max distance between points to consider them equal (default 0.01 mm)") + pars.add_argument("--plugin_deduplicate_keepseparatelayer", type=inkex.Boolean, default=False, help="Put duplicate lines to separate layer") + # Free Mode pars.add_argument("--tab") pars.add_argument("--freemode", type=inkex.Boolean, default=False) @@ -270,6 +275,12 @@ class vpypetools (inkex.EffectExtension): if self.options.plugin_occult_keepseparatelayer is True: command += " --keep-occulted" + # Plugin Deduplicate + if self.options.plugin_deduplicate is True: + command = "deduplicate --tolerance " + str(self.options.plugin_deduplicate_tolerance) + if self.options.plugin_deduplicate_keepseparatelayer is True: + command += " --keep-duplicates" + # Split All if self.options.splitall is True: command = " splitall" diff --git a/extensions/fablabchemnitz/vpypetools/vpypetools_deduplicate.inx b/extensions/fablabchemnitz/vpypetools/vpypetools_deduplicate.inx new file mode 100644 index 00000000..fb22b8ca --- /dev/null +++ b/extensions/fablabchemnitz/vpypetools/vpypetools_deduplicate.inx @@ -0,0 +1,78 @@ + + + Deduplicate Plugin + fablabchemnitz.de.vpype_plugin_deduplicate + + + vpype_logo.svg + + true + 0.01 + false + + + + + + + + true + 0.100 + 3 + false + false + + + false + false + false + + + false + false + true + true + 1.000 + 1.000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + ../000_about_fablabchemnitz.svg + + + + all + + + + + + + + \ No newline at end of file diff --git a/extensions/fablabchemnitz/vpypetools/vpypetools_freemode.inx b/extensions/fablabchemnitz/vpypetools/vpypetools_freemode.inx index 47f56a56..b670dee3 100644 --- a/extensions/fablabchemnitz/vpypetools/vpypetools_freemode.inx +++ b/extensions/fablabchemnitz/vpypetools/vpypetools_freemode.inx @@ -63,7 +63,7 @@ - +