diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2022-06-30 19:22:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-30 19:22:33 +0200 |
| commit | 8d5ef5b6635b5b84f12409b535114853954680d1 (patch) | |
| tree | c963bf0e1ddc4ee584c08b4014232f0f067ae512 /lib/stitches/fill.py | |
| parent | 725281f075f8d40a68427733f377983b6f7c607b (diff) | |
Fixes (#1703)
* guide line position
* use direction from line to shape
* optimize intersection detection
* fix flapack elf
* handle weird guide lines better
* update starting point for self crossing (multiple) fills
* ripple: fixes and non circular join style
* avoid jumps in ripple stitch
* fallback only necessary if shape does not intersect grating
* make valid may return a polygon
* add profiling
* Stitch.__init__ didn't work right and was super slow
* shrink or grow to multipolygon
Co-authored-by: Lex Neva
Diffstat (limited to 'lib/stitches/fill.py')
| -rw-r--r-- | lib/stitches/fill.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/stitches/fill.py b/lib/stitches/fill.py index 46352d4f..7c07b5c2 100644 --- a/lib/stitches/fill.py +++ b/lib/stitches/fill.py @@ -132,7 +132,7 @@ def intersect_region_with_grating(shape, angle, row_spacing, end_row_spacing=Non start -= (start + normal * center) % row_spacing current_row_y = start - + rows = [] while current_row_y < end: p0 = center + normal * current_row_y + direction * half_length p1 = center + normal * current_row_y - direction * half_length @@ -157,13 +157,15 @@ def intersect_region_with_grating(shape, angle, row_spacing, end_row_spacing=Non runs.reverse() runs = [tuple(reversed(run)) for run in runs] - yield runs + rows.append(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 = [] |
