summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2024-02-23 16:52:29 +0100
committerGitHub <noreply@github.com>2024-02-23 16:52:29 +0100
commit760f39df90b16edc675c808b1946ce038bfe5ebe (patch)
treebde032485634c31a37851dcb11e29efb8f05c225 /lib
parentcb87279cff6fafcd450e7b4f24b0b1a904ac07af (diff)
Satin warnings (#2735)
Diffstat (limited to 'lib')
-rw-r--r--lib/elements/satin_column.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/elements/satin_column.py b/lib/elements/satin_column.py
index 54ae02d5..bf81fd0d 100644
--- a/lib/elements/satin_column.py
+++ b/lib/elements/satin_column.py
@@ -680,13 +680,14 @@ class SatinColumn(EmbroideryElement):
yield TwoRungsWarning(self.flattened_rails[0].interpolate(0.5, normalized=True))
if len(self.csp) == 2 and len(self.rails[0]) != len(self.rails[1]):
yield UnequalPointsWarning(self.flattened_rails[0].interpolate(0.5, normalized=True))
- for rung in self.flattened_rungs:
- for rail in self.flattened_rails:
- intersection = rung.intersection(rail)
- if intersection.is_empty:
- yield DanglingRungWarning(rung.interpolate(0.5, normalized=True))
- elif not isinstance(intersection, shgeo.Point):
- yield TooManyIntersectionsWarning(rung.interpolate(0.5, normalized=True))
+ if len(self.csp) > 2:
+ for rung in self.flattened_rungs:
+ for rail in self.flattened_rails:
+ intersection = rung.intersection(rail)
+ if intersection.is_empty:
+ yield DanglingRungWarning(rung.interpolate(0.5, normalized=True))
+ elif not isinstance(intersection, shgeo.Point):
+ yield TooManyIntersectionsWarning(rung.interpolate(0.5, normalized=True))
def validation_errors(self):
# The node should have exactly two paths with the same number of points - or it should