fix zerodivision error in zigzag to satin (#3858)

pull/3874/head dev-build-claudine-add_cyrillic_font
Kaalleen 2025-07-12 07:59:16 +02:00 zatwierdzone przez GitHub
rodzic 407713ae1a
commit d1e84fc283
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -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])