summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2025-02-25 07:16:33 +0100
committerGitHub <noreply@github.com>2025-02-25 07:16:33 +0100
commitf8cedafcbe49590154cbef6832f347588b6a72df (patch)
treea0d735a35dd66375494e7cf2f5f41ad89ebba399
parent18dbafb0c9a51974f5453ef25ed8bd564c348deb (diff)
knockdown: mitre limit cannot be zero (#3537)
-rw-r--r--lib/extensions/knockdown_fill.py2
-rw-r--r--templates/knockdown_fill.xml4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/extensions/knockdown_fill.py b/lib/extensions/knockdown_fill.py
index 35459016..8815efa5 100644
--- a/lib/extensions/knockdown_fill.py
+++ b/lib/extensions/knockdown_fill.py
@@ -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)
diff --git a/templates/knockdown_fill.xml b/templates/knockdown_fill.xml
index a58f8c0a..1cda08bd 100644
--- a/templates/knockdown_fill.xml
+++ b/templates/knockdown_fill.xml
@@ -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>