diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2025-08-31 11:25:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-31 11:25:46 +0200 |
| commit | 612f18dc711c6a0fbf554465174b449604abb374 (patch) | |
| tree | 3ad9bab29ae6f453c7f0406bfe8ee5bcbceabfb2 /lib/extensions/stroke_to_satin.py | |
| parent | 3b2f2973f3977bba5838e48c85ba4c8e3a41c71d (diff) | |
stroke to satin: ensure a good starting point for closed paths (#3944)
starting point for the conversion, not necessarily the resulting column
Diffstat (limited to 'lib/extensions/stroke_to_satin.py')
| -rw-r--r-- | lib/extensions/stroke_to_satin.py | 9 |
1 files changed, 7 insertions, 2 deletions
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: |
