summaryrefslogtreecommitdiff
path: root/lib/stitches/guided_fill.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2024-06-20 16:56:00 +0200
committerGitHub <noreply@github.com>2024-06-20 16:56:00 +0200
commitc017cae01aa33a876795ec5da1438e8ec0f11fc5 (patch)
treeace90dd7c09b6bbddd53cf4b351cb55ef56f42c0 /lib/stitches/guided_fill.py
parentc030e3283530bc1d0f4bad219f4c61db22750506 (diff)
gray out randomize stitch length param when random stitch length is disabled (#3002)
Diffstat (limited to 'lib/stitches/guided_fill.py')
-rw-r--r--lib/stitches/guided_fill.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/stitches/guided_fill.py b/lib/stitches/guided_fill.py
index f170f024..dcf9971a 100644
--- a/lib/stitches/guided_fill.py
+++ b/lib/stitches/guided_fill.py
@@ -35,12 +35,12 @@ def guided_fill(shape,
ending_point,
underpath,
strategy,
- enable_random,
+ enable_random_stitch_length,
random_sigma,
random_seed,
):
segments = intersect_region_with_grating_guideline(shape, guideline, row_spacing, num_staggers, max_stitch_length, strategy,
- enable_random, running_stitch_tolerance, random_sigma, random_seed,)
+ enable_random_stitch_length, running_stitch_tolerance, random_sigma, random_seed,)
if not segments:
return fallback(shape, guideline, row_spacing, max_stitch_length, running_stitch_length, running_stitch_tolerance,
num_staggers, skip_last, starting_point, ending_point, underpath)
@@ -239,7 +239,7 @@ def _get_start_row(line, shape, row_spacing, line_direction):
def intersect_region_with_grating_guideline(shape, line, row_spacing, num_staggers, max_stitch_length, strategy,
- enable_random, tolerance, random_sigma, random_seed):
+ enable_random_stitch_length, tolerance, random_sigma, random_seed):
line = prepare_guide_line(line, shape)
debug.log_line_string(shape.exterior, "guided fill shape")
@@ -271,7 +271,7 @@ def intersect_region_with_grating_guideline(shape, line, row_spacing, num_stagge
debug.log_line_string(offset_line, f"offset {row}")
- if enable_random:
+ if enable_random_stitch_length:
points = [InkstitchPoint(*x) for x in offset_line.coords]
stitched_line = shgeo.LineString(random_running_stitch(
points, max_stitch_length, tolerance, random_sigma, prng.join_args(random_seed, row)))