diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2022-05-20 12:06:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-20 12:06:31 -0400 |
| commit | 8ab4abf190778867a8eccde08733c45f3760b2d0 (patch) | |
| tree | f5b63f5e192c36d8c6bf47e4c30c68d8b1a73728 /lib/stitches/fill.py | |
| parent | 1316e8132e58361f42cb4315c586e0e2cccfc64c (diff) | |
| parent | 47123198760f8740acda0799d3b22f14b3f69550 (diff) | |
Merge pull request #1548 from inkstitch/feature_guided_fill
Feature guided fill
Diffstat (limited to 'lib/stitches/fill.py')
| -rw-r--r-- | lib/stitches/fill.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/stitches/fill.py b/lib/stitches/fill.py index 21e35d83..46352d4f 100644 --- a/lib/stitches/fill.py +++ b/lib/stitches/fill.py @@ -131,8 +131,6 @@ def intersect_region_with_grating(shape, angle, row_spacing, end_row_spacing=Non # fill regions at the same angle and spacing always line up nicely. start -= (start + normal * center) % row_spacing - rows = [] - current_row_y = start while current_row_y < end: @@ -159,15 +157,13 @@ def intersect_region_with_grating(shape, angle, row_spacing, end_row_spacing=Non runs.reverse() runs = [tuple(reversed(run)) for run in runs] - rows.append(runs) + yield runs if end_row_spacing: current_row_y += row_spacing + (end_row_spacing - row_spacing) * ((current_row_y - start) / height) else: current_row_y += row_spacing - return rows - def section_to_stitches(group_of_segments, angle, row_spacing, max_stitch_length, staggers, skip_last): stitches = [] @@ -221,6 +217,7 @@ def pull_runs(rows, shape, row_spacing): # print >>sys.stderr, "\n".join(str(len(row)) for row in rows) + rows = list(rows) runs = [] count = 0 while (len(rows) > 0): |
