From 8d5ef5b6635b5b84f12409b535114853954680d1 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Thu, 30 Jun 2022 19:22:33 +0200 Subject: Fixes (#1703) * guide line position * use direction from line to shape * optimize intersection detection * fix flapack elf * handle weird guide lines better * update starting point for self crossing (multiple) fills * ripple: fixes and non circular join style * avoid jumps in ripple stitch * fallback only necessary if shape does not intersect grating * make valid may return a polygon * add profiling * Stitch.__init__ didn't work right and was super slow * shrink or grow to multipolygon Co-authored-by: Lex Neva --- lib/utils/geometry.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/utils/geometry.py') diff --git a/lib/utils/geometry.py b/lib/utils/geometry.py index f5ba4ad8..30457749 100644 --- a/lib/utils/geometry.py +++ b/lib/utils/geometry.py @@ -129,6 +129,10 @@ class Point: def from_shapely_point(cls, point): return cls(point.x, point.y) + @classmethod + def from_tuple(cls, point): + return cls(point[0], point[1]) + def __json__(self): return vars(self) -- cgit v1.2.3