From 5a9ae03dc14ea5b68a99581c21a5d8085f1a3243 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Fri, 7 Nov 2025 17:10:03 +0100 Subject: Running stitch length sequence (#4034) * allow running stitch length sequences * contour fill: fix error message for long stitch length * satin: fix center underlay stitch length --- lib/utils/settings.py | 2 +- lib/utils/smoothing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/utils') diff --git a/lib/utils/settings.py b/lib/utils/settings.py index b2220ef9..82d8938a 100644 --- a/lib/utils/settings.py +++ b/lib/utils/settings.py @@ -49,7 +49,7 @@ class GlobalSettings(MutableMapping): # We set create=False here because this code is executed on module load # and via imports also runs on generate-inx-files, which with the Nix # package manager is executed with a non-writable home directory. - user_dir = get_user_dir(create=False) + user_dir = get_user_dir(create=True) self._settings_file = os.path.join(user_dir, "settings.json") self._settings = {} diff --git a/lib/utils/smoothing.py b/lib/utils/smoothing.py index 1511b0a3..c451140c 100644 --- a/lib/utils/smoothing.py +++ b/lib/utils/smoothing.py @@ -44,7 +44,7 @@ def smooth_path(path, smoothness=1.0, iterations=5): # # Fortunately, we can convert the path to segments that are mostly the same # length by using the running stitch algorithm. - points = stitch_curve_evenly(points, smoothness * 5, smoothness * 2) + points, _ = stitch_curve_evenly(points, [smoothness * 5], smoothness * 2) points = np.array(points) for _ in range(iterations): ll = points.repeat(2, axis=0) -- cgit v1.2.3