summaryrefslogtreecommitdiff
path: root/lib/gui
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2024-12-26 16:19:35 +0100
committerGitHub <noreply@github.com>2024-12-26 16:19:35 +0100
commitef7d056173cc6d7782d6120c031dae9276725a3d (patch)
tree75d2ef67976336a93424b504e42bbf1a394b9a49 /lib/gui
parente20161a4ec9a69cb0f1bdfdd16bcd27a8601fde7 (diff)
End points (#3370)
* end at nearest point to next element (if requested and possible)
Diffstat (limited to 'lib/gui')
-rw-r--r--lib/gui/lettering/main_panel.py8
-rw-r--r--lib/gui/satin_multicolor/main_panel.py5
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/gui/lettering/main_panel.py b/lib/gui/lettering/main_panel.py
index 30583070..3d0f65ba 100644
--- a/lib/gui/lettering/main_panel.py
+++ b/lib/gui/lettering/main_panel.py
@@ -320,10 +320,14 @@ class LetteringPanel(wx.Panel):
elements = nodes_to_elements(self.group.iterdescendants(SVG_PATH_TAG))
last_stitch_group = None
- for element in elements:
+ next_elements = [None]
+ if len(elements) > 1:
+ next_elements = elements[1:] + next_elements
+ for element, next_element in zip(elements, next_elements):
check_stop_flag()
- stitch_groups.extend(element.embroider(last_stitch_group))
+ stitch_groups.extend(element.embroider(last_stitch_group, next_element))
+
if stitch_groups:
last_stitch_group = stitch_groups[-1]
diff --git a/lib/gui/satin_multicolor/main_panel.py b/lib/gui/satin_multicolor/main_panel.py
index c27372b3..fd053731 100644
--- a/lib/gui/satin_multicolor/main_panel.py
+++ b/lib/gui/satin_multicolor/main_panel.py
@@ -187,6 +187,11 @@ class MultiColorSatinPanel(wx.Panel):
new_satin.set('inkstitch:contour_underlay', False)
new_satin.set('inkstitch:zigzag_underlay', False)
+ # TODO: adapt start and end position, as well as running_stitch_position
+ # For now, turn start and end points off as they may produce bad looking output
+ new_satin.set('inkstitch:start_at_nearest_point', False)
+ new_satin.set('inkstitch:end_at_nearest_point', False)
+
previous_margin = margin
current_position += width + margin