summaryrefslogtreecommitdiff
path: root/lib/stitches
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stitches')
-rw-r--r--lib/stitches/ConnectAndSamplePattern.py6
-rw-r--r--lib/stitches/LineStringSampling.py2
-rw-r--r--lib/stitches/PointTransfer.py4
-rw-r--r--lib/stitches/StitchPattern.py3
-rw-r--r--lib/stitches/fill.py2
5 files changed, 7 insertions, 10 deletions
diff --git a/lib/stitches/ConnectAndSamplePattern.py b/lib/stitches/ConnectAndSamplePattern.py
index 33a1ba6d..1cf2b2a1 100644
--- a/lib/stitches/ConnectAndSamplePattern.py
+++ b/lib/stitches/ConnectAndSamplePattern.py
@@ -7,7 +7,6 @@ import trimesh
import numpy as np
from scipy import spatial
import math
-from shapely.geometry import asLineString
from anytree import PreOrderIter
from ..stitches import LineStringSampling
from ..stitches import PointTransfer
@@ -52,7 +51,7 @@ def cut(line, distance):
return LineString([(cp.x, cp.y)] + coords[i:] + coords[:i])
-def connect_raster_tree_nearest_neighbor(
+def connect_raster_tree_nearest_neighbor( # noqa: C901
tree, used_offset, stitch_distance, close_point, offset_by_half):
"""
Takes the offsetted curves organized as tree, connects and samples them.
@@ -458,8 +457,7 @@ def calculate_replacing_middle_point(line_segment, abs_offset, max_stitch_distan
return line_segment.coords[1]
-def connect_raster_tree_from_inner_to_outer(
- tree, used_offset, stitch_distance, close_point, offset_by_half):
+def connect_raster_tree_from_inner_to_outer(tree, used_offset, stitch_distance, close_point, offset_by_half): # noqa: C901
"""
Takes the offsetted curves organized as tree, connects and samples them.
Strategy: A connection from parent to child is made as fast as possible to
diff --git a/lib/stitches/LineStringSampling.py b/lib/stitches/LineStringSampling.py
index 43f650e6..71660e2d 100644
--- a/lib/stitches/LineStringSampling.py
+++ b/lib/stitches/LineStringSampling.py
@@ -70,7 +70,7 @@ def calculate_line_angles(line):
return Angles
-def raster_line_string_with_priority_points(line, start_distance, end_distance, maxstitch_distance,
+def raster_line_string_with_priority_points(line, start_distance, end_distance, maxstitch_distance, # noqa: C901
must_use_points_deque, abs_offset, offset_by_half, replace_forbidden_points):
"""
Rasters a line between start_distance and end_distance.
diff --git a/lib/stitches/PointTransfer.py b/lib/stitches/PointTransfer.py
index b6e4e026..93fe02c5 100644
--- a/lib/stitches/PointTransfer.py
+++ b/lib/stitches/PointTransfer.py
@@ -36,7 +36,7 @@ def calc_transferred_point(bisectorline, child):
return point, priority
-def transfer_points_to_surrounding(treenode, used_offset, offset_by_half, to_transfer_points, to_transfer_points_origin=[],
+def transfer_points_to_surrounding(treenode, used_offset, offset_by_half, to_transfer_points, to_transfer_points_origin=[], # noqa: C901
overnext_neighbor=False, transfer_forbidden_points=False,
transfer_to_parent=True, transfer_to_sibling=True, transfer_to_child=True):
"""
@@ -305,7 +305,7 @@ def calc_transferred_point_graph(bisectorline, edge_geometry):
return point, priority
-def transfer_points_to_surrounding_graph(fill_stitch_graph, current_edge, used_offset, offset_by_half, to_transfer_points,
+def transfer_points_to_surrounding_graph(fill_stitch_graph, current_edge, used_offset, offset_by_half, to_transfer_points, # noqa: C901
overnext_neighbor=False, transfer_forbidden_points=False, transfer_to_previous=True, transfer_to_next=True):
"""
Takes the current graph edge and its rastered points (to_transfer_points) and transfers these points to its previous and next edges (if selected)
diff --git a/lib/stitches/StitchPattern.py b/lib/stitches/StitchPattern.py
index 62ef2b0f..4a38c0bc 100644
--- a/lib/stitches/StitchPattern.py
+++ b/lib/stitches/StitchPattern.py
@@ -159,8 +159,7 @@ def check_and_prepare_tree_for_valid_spiral(root):
return True
-def offset_poly(
- poly, offset, join_style, stitch_distance, offset_by_half, strategy, starting_point):
+def offset_poly(poly, offset, join_style, stitch_distance, offset_by_half, strategy, starting_point): # noqa: C901
"""
Takes a polygon (which can have holes) as input and creates offsetted
versions until the polygon is filled with these smaller offsets.
diff --git a/lib/stitches/fill.py b/lib/stitches/fill.py
index 5afcb228..ceac56d9 100644
--- a/lib/stitches/fill.py
+++ b/lib/stitches/fill.py
@@ -145,7 +145,7 @@ def repair_non_simple_lines(line):
return repaired
-def intersect_region_with_grating_line(shape, line, row_spacing, end_row_spacing=None, flip=False):
+def intersect_region_with_grating_line(shape, line, row_spacing, end_row_spacing=None, flip=False): # noqa: C901
row_spacing = abs(row_spacing)
(minx, miny, maxx, maxy) = shape.bounds