diff options
Diffstat (limited to 'lib/stitches/contour_fill.py')
| -rw-r--r-- | lib/stitches/contour_fill.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/stitches/contour_fill.py b/lib/stitches/contour_fill.py index c42cc6f2..f2ab2aef 100644 --- a/lib/stitches/contour_fill.py +++ b/lib/stitches/contour_fill.py @@ -391,12 +391,12 @@ def _find_path_inner_to_outer(tree, node, offset, starting_point, avoid_self_cro return LineString(result_coords) -def inner_to_outer(tree, offset, stitch_length, starting_point, avoid_self_crossing): +def inner_to_outer(tree, offset, stitch_length, tolerance, starting_point, avoid_self_crossing): """Fill a shape with spirals, from innermost to outermost.""" stitch_path = _find_path_inner_to_outer(tree, 'root', offset, starting_point, avoid_self_crossing) points = [Stitch(*point) for point in stitch_path.coords] - stitches = running_stitch(points, stitch_length) + stitches = running_stitch(points, stitch_length, tolerance) return stitches @@ -490,24 +490,24 @@ def _check_and_prepare_tree_for_valid_spiral(tree): return process_node('root') -def single_spiral(tree, stitch_length, starting_point): +def single_spiral(tree, stitch_length, tolerance, starting_point): """Fill a shape with a single spiral going from outside to center.""" - return _spiral_fill(tree, stitch_length, starting_point, _make_spiral) + return _spiral_fill(tree, stitch_length, tolerance, starting_point, _make_spiral) -def double_spiral(tree, stitch_length, starting_point): +def double_spiral(tree, stitch_length, tolerance, starting_point): """Fill a shape with a double spiral going from outside to center and back to outside. """ - return _spiral_fill(tree, stitch_length, starting_point, _make_fermat_spiral) + return _spiral_fill(tree, stitch_length, tolerance, starting_point, _make_fermat_spiral) -def _spiral_fill(tree, stitch_length, close_point, spiral_maker): +def _spiral_fill(tree, stitch_length, tolerance, close_point, spiral_maker): starting_point = close_point.coords[0] rings = _get_spiral_rings(tree) path = spiral_maker(rings, stitch_length, starting_point) path = [Stitch(*stitch) for stitch in path] - return running_stitch(path, stitch_length) + return running_stitch(path, stitch_length, tolerance) def _get_spiral_rings(tree): |
