diff options
Diffstat (limited to 'lib/elements/fill_stitch.py')
| -rw-r--r-- | lib/elements/fill_stitch.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/elements/fill_stitch.py b/lib/elements/fill_stitch.py index 6bf52d95..7d96fd14 100644 --- a/lib/elements/fill_stitch.py +++ b/lib/elements/fill_stitch.py @@ -9,6 +9,7 @@ import re import numpy as np from inkex import LinearGradient, Transform from shapely import geometry as shgeo +from shapely import set_precision from shapely.errors import GEOSException from shapely.ops import nearest_points from shapely.validation import explain_validity, make_valid @@ -726,7 +727,8 @@ class FillStitch(EmbroideryElement): @property @cache def shape(self): - shape = self._get_clipped_path() + # avoid FloatingPointError while keeping a decent precision necessary for clamp path + shape = set_precision(self._get_clipped_path(), 0.0000000001) if shape.is_valid: return ensure_multi_polygon(shape, 3) |
