From 612f18dc711c6a0fbf554465174b449604abb374 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Sun, 31 Aug 2025 11:25:46 +0200 Subject: stroke to satin: ensure a good starting point for closed paths (#3944) starting point for the conversion, not necessarily the resulting column --- lib/extensions/stroke_to_satin.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/extensions/stroke_to_satin.py') diff --git a/lib/extensions/stroke_to_satin.py b/lib/extensions/stroke_to_satin.py index fa360548..878fa869 100644 --- a/lib/extensions/stroke_to_satin.py +++ b/lib/extensions/stroke_to_satin.py @@ -9,7 +9,8 @@ import inkex from shapely import geometry as shgeo from ..elements import SatinColumn, Stroke -from ..elements.utils.stroke_to_satin import convert_path_to_satin +from ..elements.utils.stroke_to_satin import (convert_path_to_satin, + set_first_node) from ..i18n import _ from ..svg import get_correction_transform from ..svg.styles import get_join_style_args @@ -38,7 +39,11 @@ class StrokeToSatin(InkstitchExtension): style_args = get_join_style_args(element) path_style = self.path_style(element) - for path in element.paths: + paths = element.paths + if element.is_closed_path: + set_first_node(paths, element.stroke_width) + + for path in paths: satin_paths = convert_path_to_satin(path, element.stroke_width, style_args) if satin_paths is not None: -- cgit v1.2.3