diff options
| author | Andreas <v.andreas.1@web.de> | 2021-10-30 21:28:40 +0200 |
|---|---|---|
| committer | Kaalleen <reni@allenka.de> | 2022-05-04 18:57:20 +0200 |
| commit | 1a1939b5daf421116791b5ae45434cb1aba2ea38 (patch) | |
| tree | ee91d51873bcb70d26adf0884d205c611c1ec7a6 /lib/stitches/auto_fill.py | |
| parent | 125db3f83b3b330df757f7cc0faf6489b3cb348d (diff) | |
Bug fixing + refactoring
Diffstat (limited to 'lib/stitches/auto_fill.py')
| -rw-r--r-- | lib/stitches/auto_fill.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/stitches/auto_fill.py b/lib/stitches/auto_fill.py index 1331ecb2..a0d9637a 100644 --- a/lib/stitches/auto_fill.py +++ b/lib/stitches/auto_fill.py @@ -21,7 +21,7 @@ from ..utils.geometry import line_string_to_point_list from .fill import intersect_region_with_grating, intersect_region_with_grating_line, stitch_row from .running_stitch import running_stitch from .PointTransfer import transfer_points_to_surrounding_graph -from .LineStringSampling import raster_line_string_with_priority_points_graph +from .LineStringSampling import raster_line_string_with_priority_points class PathEdge(object): @@ -666,8 +666,12 @@ def stitch_line(stitches, stitching_direction, geometry, projected_points, max_s # print(geometry[0]) # if stitching_direction == -1: # geometry.coords = geometry.coords[::-1] - stitched_line, stitched_line_origin = raster_line_string_with_priority_points_graph( - geometry, max_stitch_length, stitching_direction, projected_points, abs(row_spacing), offset_by_half) + if stitching_direction == 1: + stitched_line, _ = raster_line_string_with_priority_points( + geometry, 0.0, geometry.length, max_stitch_length, projected_points, abs(row_spacing), offset_by_half, True) + else: + stitched_line, _ = raster_line_string_with_priority_points( + geometry, geometry.length, 0.0, max_stitch_length, projected_points, abs(row_spacing), offset_by_half, True) stitches.append(Stitch(*stitched_line[0], tags=('fill_row_start',))) for i in range(1, len(stitched_line)): |
