knockdown: mitre limit cannot be zero (#3537)

pull/3545/head dev-build-kaaleen-auto_satin_stroke_width
Kaalleen 2025-02-25 07:16:33 +01:00 zatwierdzone przez GitHub
rodzic 18dbafb0c9
commit f8cedafcbe
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -66,7 +66,7 @@ class KnockdownFill(InkstitchExtension):
self.options.offset * PIXELS_PER_MM,
cap_style=int(self.options.join_style),
join_style=int(self.options.join_style),
mitre_limit=int(self.options.mitre_limit)
mitre_limit=float(max(self.options.mitre_limit, 0.1))
)
combined_shape = combined_shape.simplify(0.3)
combined_shape = ensure_multi_polygon(combined_shape)

Wyświetl plik

@ -16,13 +16,13 @@
<param name="notebook" type="notebook">
<page name="options" gui-text="Options">
<param name="keep-holes" type="bool" gui-text="Keep holes">true</param>
<param name="offset" type="float" gui-text="Offset">1</param>
<param name="offset" type="float" gui-text="Offset" min="0" max="50">1</param>
<param name="join-style" type="optiongroup" gui-text="Method">
<option value="1">Round</option>
<option value="2">Mitre</option>
<option value="3">Bevel</option>
</param>
<param name="mitre-limit" type="float" gui-text="Mitre limit">5.0</param>
<param name="mitre-limit" type="float" gui-text="Mitre limit" min="0.1" max="50">5.0</param>
</page>
<page name="info" gui-text="Help">
<label appearance="header">This extension generates a knockdown fill area with a specified offset around selected elements.</label>