diff options
| author | Lex Neva <github.com@lexneva.name> | 2022-04-28 23:25:52 -0400 |
|---|---|---|
| committer | Kaalleen <reni@allenka.de> | 2022-05-04 19:18:33 +0200 |
| commit | e2ede5e456d8037552ac9077f2cc34ccdfb52db2 (patch) | |
| tree | 38165f05047c7f2e0a40c026c8d67b301c1a5883 /lib/stitches/tangential_fill_stitch_line_creator.py | |
| parent | f019d396588f538431b7a1c7d41240d5db66930c (diff) | |
get rid of "closest point" strategy
Diffstat (limited to 'lib/stitches/tangential_fill_stitch_line_creator.py')
| -rw-r--r-- | lib/stitches/tangential_fill_stitch_line_creator.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/stitches/tangential_fill_stitch_line_creator.py b/lib/stitches/tangential_fill_stitch_line_creator.py index deb87659..46b5a262 100644 --- a/lib/stitches/tangential_fill_stitch_line_creator.py +++ b/lib/stitches/tangential_fill_stitch_line_creator.py @@ -146,9 +146,8 @@ def make_tree_uniform_ccw(tree): # Used to define which stitching strategy shall be used class StitchingStrategy(IntEnum): - CLOSEST_POINT = 0 - INNER_TO_OUTER = 1 - SPIRAL = 2 + INNER_TO_OUTER = 0 + SPIRAL = 1 def check_and_prepare_tree_for_valid_spiral(tree): @@ -350,10 +349,7 @@ def offset_poly(poly, offset, join_style, stitch_distance, min_stitch_distance, make_tree_uniform_ccw(tree) - if strategy == StitchingStrategy.CLOSEST_POINT: - (connected_line, connected_line_origin) = tangential_fill_stitch_pattern_creator.connect_raster_tree_nearest_neighbor( - tree, 'root', offset, stitch_distance, min_stitch_distance, starting_point, offset_by_half) - elif strategy == StitchingStrategy.INNER_TO_OUTER: + if strategy == StitchingStrategy.INNER_TO_OUTER: (connected_line, connected_line_origin) = tangential_fill_stitch_pattern_creator.connect_raster_tree_from_inner_to_outer( tree, 'root', offset, stitch_distance, min_stitch_distance, starting_point, offset_by_half) elif strategy == StitchingStrategy.SPIRAL: |
