From b0105196889a463579aab21cd29bbf1abb96dab1 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Sat, 7 Dec 2024 15:20:11 +0100 Subject: Enable start end commands for satins (#3315) Updates commands fill_start (_end) => starting_point (_end) stain_start (_end) and run_start (_end) => autoroute_start ripple_target => target_point Sets inkstitch svg version to 3 --- lib/elements/fill_stitch.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/elements/fill_stitch.py') diff --git a/lib/elements/fill_stitch.py b/lib/elements/fill_stitch.py index 04ddeaea..9b330947 100644 --- a/lib/elements/fill_stitch.py +++ b/lib/elements/fill_stitch.py @@ -891,25 +891,25 @@ class FillStitch(EmbroideryElement): return self.shrink_or_grow_shape(shape, self.expand) def get_starting_point(self, previous_stitch_group): - # If there is a "fill_start" Command, then use that; otherwise pick + # If there is a "starting_point" Command, then use that; otherwise pick # the point closest to the end of the last stitch_group. - if self.get_command('fill_start'): - return self.get_command('fill_start').target_point + if self.get_command('starting_point'): + return self.get_command('starting_point').target_point elif previous_stitch_group: return previous_stitch_group.stitches[-1] else: return None def uses_previous_stitch(self): - if self.get_command('fill_start'): + if self.get_command('starting_point'): return False else: return True def get_ending_point(self): - if self.get_command('fill_end'): - return self.get_command('fill_end').target_point + if self.get_command('ending_point'): + return self.get_command('ending_point').target_point else: return None @@ -1177,7 +1177,7 @@ class FillStitch(EmbroideryElement): def do_circular_fill(self, shape, last_stitch_group, starting_point, ending_point): # get target position - command = self.get_command('ripple_target') + command = self.get_command('target_point') if command: pos = [float(command.use.get("x", 0)), float(command.use.get("y", 0))] transform = get_node_transform(command.use) -- cgit v1.2.3