diff options
| author | George Steel <george.steel@gmail.com> | 2022-11-23 21:59:37 -0500 |
|---|---|---|
| committer | George Steel <george.steel@gmail.com> | 2022-11-23 21:59:37 -0500 |
| commit | 74f0943cc8e73a68b84d69acc1482bf1657e3ad6 (patch) | |
| tree | bca22600fc3d0730a75171945ee9fd4d9f755ce9 /lib/stitches | |
| parent | 7cef2c9a094abe61282ac9bdc6bbfdc1e3e1d8c6 (diff) | |
| parent | df4c5cd59b0e391048c8fd2271893dbd49ec7cd3 (diff) | |
Merge branch 'main' of https://github.com/inkstitch/inkstitch into george-steel/pull-comp-percent
Diffstat (limited to 'lib/stitches')
| -rw-r--r-- | lib/stitches/fill.py | 2 | ||||
| -rw-r--r-- | lib/stitches/guided_fill.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/stitches/fill.py b/lib/stitches/fill.py index ed4ff655..60a0cb7d 100644 --- a/lib/stitches/fill.py +++ b/lib/stitches/fill.py @@ -38,7 +38,7 @@ def row_num(point, angle, row_spacing): def adjust_stagger(stitch, angle, row_spacing, max_stitch_length, staggers): if staggers == 0: - staggers = 1 # sanity check to avoid division by zero. + staggers = 1 # sanity check to avoid division by zero. this_row_num = row_num(stitch, angle, row_spacing) stagger_phase = (this_row_num / staggers) % 1 stagger_offset = stagger_phase * max_stitch_length diff --git a/lib/stitches/guided_fill.py b/lib/stitches/guided_fill.py index 6a92f8e8..14c58b7a 100644 --- a/lib/stitches/guided_fill.py +++ b/lib/stitches/guided_fill.py @@ -149,7 +149,7 @@ def take_only_line_strings(thing): def apply_stitches(line, max_stitch_length, num_staggers, row_spacing, row_num): if num_staggers == 0: - num_staggers = 1 # sanity check to avoid division by zero. + num_staggers = 1 # sanity check to avoid division by zero. start = ((row_num / num_staggers) % 1) * max_stitch_length projections = np.arange(start, line.length, max_stitch_length) points = np.array([line.interpolate(projection).coords[0] for projection in projections]) |
