From ef7d056173cc6d7782d6120c031dae9276725a3d Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Thu, 26 Dec 2024 16:19:35 +0100 Subject: End points (#3370) * end at nearest point to next element (if requested and possible) --- lib/gui/lettering/main_panel.py | 8 ++++++-- lib/gui/satin_multicolor/main_panel.py | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'lib/gui') 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 -- cgit v1.2.3