diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2025-07-12 07:59:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-12 07:59:16 +0200 |
| commit | d1e84fc28332a299928e6fbbddca6b38619bdba1 (patch) | |
| tree | 770f22f2262f8cf93dada448169094b1823f0754 /lib | |
| parent | 407713ae1a580f740fd9e485a73b6fa96b4bcf43 (diff) | |
fix zerodivision error in zigzag to satin (#3858)
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/extensions/zigzag_line_to_satin.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/extensions/zigzag_line_to_satin.py b/lib/extensions/zigzag_line_to_satin.py index ed6b8013..4f61f1ed 100644 --- a/lib/extensions/zigzag_line_to_satin.py +++ b/lib/extensions/zigzag_line_to_satin.py @@ -166,6 +166,9 @@ class ZigzagLineToSatin(InkstitchExtension): # so we need to find a spot on the smoothed rail to ensure the correct length rung = r[i-1] line = inkex.DirectedLineSegment(rung[0], rung[1]) + if line.length == 0: + continue + point0 = line.point_at_length(-50) point1 = line.point_at_length(line.length + 50) new_point = inkex.bezier.linebezierintersect((point0, point1), [prev, handle_position_start, handle_position_end, point]) |
