From 707341e04d26e5b787e31f81022af2bec32844f2 Mon Sep 17 00:00:00 2001 From: Mario Voigt Date: Fri, 9 Apr 2021 10:22:11 +0200 Subject: [PATCH] added point display option --- extensions/fablabchemnitz/vpypetools/vpypetools.py | 7 ++++--- extensions/fablabchemnitz/vpypetools/vpypetools_filter.inx | 3 ++- .../fablabchemnitz/vpypetools/vpypetools_freemode.inx | 3 ++- .../fablabchemnitz/vpypetools/vpypetools_linemerge.inx | 3 ++- .../fablabchemnitz/vpypetools/vpypetools_linesort.inx | 3 ++- .../fablabchemnitz/vpypetools/vpypetools_multipass.inx | 3 ++- extensions/fablabchemnitz/vpypetools/vpypetools_occult.inx | 3 ++- .../fablabchemnitz/vpypetools/vpypetools_relooping.inx | 3 ++- .../fablabchemnitz/vpypetools/vpypetools_splitall.inx | 3 ++- extensions/fablabchemnitz/vpypetools/vpypetools_trim.inx | 3 ++- 10 files changed, 22 insertions(+), 12 deletions(-) diff --git a/extensions/fablabchemnitz/vpypetools/vpypetools.py b/extensions/fablabchemnitz/vpypetools/vpypetools.py index f1ca982d..a44a6e57 100644 --- a/extensions/fablabchemnitz/vpypetools/vpypetools.py +++ b/extensions/fablabchemnitz/vpypetools/vpypetools.py @@ -119,7 +119,8 @@ class vpypetools (inkex.EffectExtension): self.arg_parser.add_argument("--simplify", type=inkex.Boolean, default=False, help="Reduces significantly the number of segments used to approximate the curve while still guaranteeing an accurate conversion, but may increase the execution time. Does not work for 'Singlelayer/paths'") self.arg_parser.add_argument("--parallel", type=inkex.Boolean, default=False, help="Enables multiprocessing for the SVG conversion. This is recommended ONLY when using 'Simplify geometry' on large SVG files with many curved elements. Does not work for 'Singlelayer/paths'") self.arg_parser.add_argument("--apply_transformations", type=inkex.Boolean, default=False, help="Run 'Apply Transformations' extension before running vpype. Helps avoiding geometry shifting") - self.arg_parser.add_argument("--output_show", type=inkex.Boolean, default=False, help="This will open a new matplotlib window showing modified SVG data") + self.arg_parser.add_argument("--output_show", type=inkex.Boolean, default=False, help="This will open a separate window showing the finished SVG data. If enabled, output is not applied to InkScape canvas (only for preview)!") + self.arg_parser.add_argument("--output_show_points", type=inkex.Boolean, default=False, help="Enable point display in viewer") self.arg_parser.add_argument("--output_stats", type=inkex.Boolean, default=False, help="Show output statistics before/after conversion") self.arg_parser.add_argument("--output_trajectories", type=inkex.Boolean, default=False, help="Add paths for the travel trajectories") self.arg_parser.add_argument("--keep_objects", type=inkex.Boolean, default=False, help="If false, selected paths will be removed") @@ -331,8 +332,8 @@ class vpypetools (inkex.EffectExtension): # show the vpype document visually if self.options.output_show: warnings.filterwarnings("ignore") # workaround to suppress annoying DeprecationWarning - # vpype_viewer.show(doc, view_mode=ViewMode.PREVIEW, show_pen_up=self.options.output_trajectories, show_points=False, pen_width=0.1, pen_opacity=1.0, argv=None) - vpype_viewer.show(doc, view_mode=ViewMode.PREVIEW, show_pen_up=self.options.output_trajectories, show_points=False, argv=None) # https://vpype.readthedocs.io/en/stable/api/vpype_viewer.ViewMode.html + # vpype_viewer.show(doc, view_mode=ViewMode.PREVIEW, show_pen_up=self.options.output_trajectories, show_points=self.options.output_show_points, pen_width=0.1, pen_opacity=1.0, argv=None) + vpype_viewer.show(doc, view_mode=ViewMode.PREVIEW, show_pen_up=self.options.output_trajectories, show_points=self.options.output_show_points, argv=None) # https://vpype.readthedocs.io/en/stable/api/vpype_viewer.ViewMode.html warnings.filterwarnings("default") # reset warning filter exit(0) #we leave the code loop because we only want to preview. We don't want to import the geometry diff --git a/extensions/fablabchemnitz/vpypetools/vpypetools_filter.inx b/extensions/fablabchemnitz/vpypetools/vpypetools_filter.inx index 2720a739..b7f80575 100644 --- a/extensions/fablabchemnitz/vpypetools/vpypetools_filter.inx +++ b/extensions/fablabchemnitz/vpypetools/vpypetools_filter.inx @@ -30,7 +30,8 @@ false - false + false + false false diff --git a/extensions/fablabchemnitz/vpypetools/vpypetools_freemode.inx b/extensions/fablabchemnitz/vpypetools/vpypetools_freemode.inx index 1af8716c..63c82943 100644 --- a/extensions/fablabchemnitz/vpypetools/vpypetools_freemode.inx +++ b/extensions/fablabchemnitz/vpypetools/vpypetools_freemode.inx @@ -35,7 +35,8 @@ false - false + false + false false diff --git a/extensions/fablabchemnitz/vpypetools/vpypetools_linemerge.inx b/extensions/fablabchemnitz/vpypetools/vpypetools_linemerge.inx index 39713980..4887bfd7 100644 --- a/extensions/fablabchemnitz/vpypetools/vpypetools_linemerge.inx +++ b/extensions/fablabchemnitz/vpypetools/vpypetools_linemerge.inx @@ -25,7 +25,8 @@ false - false + false + false false diff --git a/extensions/fablabchemnitz/vpypetools/vpypetools_linesort.inx b/extensions/fablabchemnitz/vpypetools/vpypetools_linesort.inx index 5853083e..c49d0757 100644 --- a/extensions/fablabchemnitz/vpypetools/vpypetools_linesort.inx +++ b/extensions/fablabchemnitz/vpypetools/vpypetools_linesort.inx @@ -24,7 +24,8 @@ false - false + false + false false diff --git a/extensions/fablabchemnitz/vpypetools/vpypetools_multipass.inx b/extensions/fablabchemnitz/vpypetools/vpypetools_multipass.inx index e0aebf81..b494ca34 100644 --- a/extensions/fablabchemnitz/vpypetools/vpypetools_multipass.inx +++ b/extensions/fablabchemnitz/vpypetools/vpypetools_multipass.inx @@ -24,7 +24,8 @@ false - false + false + false false diff --git a/extensions/fablabchemnitz/vpypetools/vpypetools_occult.inx b/extensions/fablabchemnitz/vpypetools/vpypetools_occult.inx index 07ecc77d..ed925189 100644 --- a/extensions/fablabchemnitz/vpypetools/vpypetools_occult.inx +++ b/extensions/fablabchemnitz/vpypetools/vpypetools_occult.inx @@ -24,7 +24,8 @@ false - false + false + false false diff --git a/extensions/fablabchemnitz/vpypetools/vpypetools_relooping.inx b/extensions/fablabchemnitz/vpypetools/vpypetools_relooping.inx index 979c985c..9c04938a 100644 --- a/extensions/fablabchemnitz/vpypetools/vpypetools_relooping.inx +++ b/extensions/fablabchemnitz/vpypetools/vpypetools_relooping.inx @@ -24,7 +24,8 @@ false - false + false + false false diff --git a/extensions/fablabchemnitz/vpypetools/vpypetools_splitall.inx b/extensions/fablabchemnitz/vpypetools/vpypetools_splitall.inx index 120ac9f2..2fe21be4 100644 --- a/extensions/fablabchemnitz/vpypetools/vpypetools_splitall.inx +++ b/extensions/fablabchemnitz/vpypetools/vpypetools_splitall.inx @@ -23,7 +23,8 @@ false - false + false + false false diff --git a/extensions/fablabchemnitz/vpypetools/vpypetools_trim.inx b/extensions/fablabchemnitz/vpypetools/vpypetools_trim.inx index 240730e1..861ee473 100644 --- a/extensions/fablabchemnitz/vpypetools/vpypetools_trim.inx +++ b/extensions/fablabchemnitz/vpypetools/vpypetools_trim.inx @@ -25,7 +25,8 @@ false - false + false + false false