From 110dca3c9a6861fda9eac555157396d532ef9c3a Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sun, 10 Mar 2019 18:24:10 -0400 Subject: make debugging auto-fill easier --- lib/elements/auto_fill.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/elements/auto_fill.py') diff --git a/lib/elements/auto_fill.py b/lib/elements/auto_fill.py index b8d8d15f..1308b9e3 100644 --- a/lib/elements/auto_fill.py +++ b/lib/elements/auto_fill.py @@ -1,4 +1,5 @@ import math +import sys import traceback from shapely import geometry as shgeo @@ -185,6 +186,10 @@ class AutoFill(Fill): # for one of our exceptions, just print the message self.fatal(_("Unable to autofill: ") + str(exc)) except Exception, exc: + if hasattr(sys, 'gettrace') and sys.gettrace(): + # if we're debugging, let the exception bubble up + raise + # for an uncaught exception, give a little more info so that they can create a bug report message = "" message += _("Error during autofill! This means that there is a problem with Ink/Stitch.") -- cgit v1.2.3 From 6b8121fb04075b135f6f67954a9f7686460ce5f5 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 19 Mar 2019 22:30:07 -0400 Subject: add underpath checkboxes for underlay and top stitching --- lib/elements/auto_fill.py | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'lib/elements/auto_fill.py') diff --git a/lib/elements/auto_fill.py b/lib/elements/auto_fill.py index 1308b9e3..e78943ec 100644 --- a/lib/elements/auto_fill.py +++ b/lib/elements/auto_fill.py @@ -119,6 +119,28 @@ class AutoFill(Fill): def expand(self): return self.get_float_param('expand_mm', 0) + @property + @param('underpath', + _('Underpath'), + tooltip=_('Travel inside the shape when moving from section to section. Underpath ' + 'stitches avoid traveling in the direction of the row angle so that they ' + 'are not visible. This gives them a jagged appearance.'), + type='boolean', + default=True) + def underpath(self): + return self.get_boolean_param('underpath', True) + + @property + @param('underlay_underpath', + _('Underpath'), + tooltip=_('Travel inside the shape when moving from section to section. Underpath ' + 'stitches avoid traveling in the direction of the row angle so that they ' + 'are not visible. This gives them a jagged appearance.'), + type='boolean', + default=False) + def underlay_underpath(self): + return self.get_boolean_param('underpath', False) + def shrink_or_grow_shape(self, amount): if amount: shape = self.shape.buffer(amount) @@ -169,7 +191,8 @@ class AutoFill(Fill): self.running_stitch_length, self.staggers, self.fill_underlay_skip_last, - starting_point)) + starting_point, + underpath=self.underlay_underpath)) starting_point = stitches[-1] stitches.extend(auto_fill(self.fill_shape, @@ -181,7 +204,8 @@ class AutoFill(Fill): self.staggers, self.skip_last, starting_point, - ending_point)) + ending_point, + self.underpath)) except InkstitchException, exc: # for one of our exceptions, just print the message self.fatal(_("Unable to autofill: ") + str(exc)) -- cgit v1.2.3 From e7a8a3677b805d338362be6556aa702d40791fa2 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Thu, 21 Mar 2019 21:07:48 -0400 Subject: put underlay underpath checkbox in the right tab --- lib/elements/auto_fill.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'lib/elements/auto_fill.py') diff --git a/lib/elements/auto_fill.py b/lib/elements/auto_fill.py index e78943ec..a30bb6df 100644 --- a/lib/elements/auto_fill.py +++ b/lib/elements/auto_fill.py @@ -131,13 +131,15 @@ class AutoFill(Fill): return self.get_boolean_param('underpath', True) @property - @param('underlay_underpath', - _('Underpath'), - tooltip=_('Travel inside the shape when moving from section to section. Underpath ' - 'stitches avoid traveling in the direction of the row angle so that they ' - 'are not visible. This gives them a jagged appearance.'), - type='boolean', - default=False) + @param( + 'underlay_underpath', + _('Underpath'), + tooltip=_('Travel inside the shape when moving from section to section. Underpath ' + 'stitches avoid traveling in the direction of the row angle so that they ' + 'are not visible. This gives them a jagged appearance.'), + group=_('AutoFill Underlay'), + type='boolean', + default=False) def underlay_underpath(self): return self.get_boolean_param('underpath', False) -- cgit v1.2.3 From e54b9d7d8dae59321c6bfbc2de1b02e06c58466d Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Thu, 21 Mar 2019 21:25:14 -0400 Subject: default underlay underpathing to enabled as well --- lib/elements/auto_fill.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/elements/auto_fill.py') diff --git a/lib/elements/auto_fill.py b/lib/elements/auto_fill.py index a30bb6df..bbb2aff1 100644 --- a/lib/elements/auto_fill.py +++ b/lib/elements/auto_fill.py @@ -139,9 +139,9 @@ class AutoFill(Fill): 'are not visible. This gives them a jagged appearance.'), group=_('AutoFill Underlay'), type='boolean', - default=False) + default=True) def underlay_underpath(self): - return self.get_boolean_param('underpath', False) + return self.get_boolean_param('underpath', True) def shrink_or_grow_shape(self, amount): if amount: -- cgit v1.2.3 From 37722b7ddf8b1f612408bea783d9ac5455f7b9fd Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 30 Mar 2019 21:56:39 -0400 Subject: fix underlay underpath checkbox --- lib/elements/auto_fill.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/elements/auto_fill.py') diff --git a/lib/elements/auto_fill.py b/lib/elements/auto_fill.py index bbb2aff1..62d3493c 100644 --- a/lib/elements/auto_fill.py +++ b/lib/elements/auto_fill.py @@ -141,7 +141,7 @@ class AutoFill(Fill): type='boolean', default=True) def underlay_underpath(self): - return self.get_boolean_param('underpath', True) + return self.get_boolean_param('underlay_underpath', True) def shrink_or_grow_shape(self, amount): if amount: -- cgit v1.2.3