Don't try to add closed loops to other paths
This is too slow for hole patterns and the holes can't be added anywhere anyway.
This commit is contained in:
parent
4344c93b6e
commit
bfa327d83a
|
@ -118,15 +118,15 @@ class Part:
|
||||||
return
|
return
|
||||||
# search for path ending at new start coordinates to append this path to
|
# search for path ending at new start coordinates to append this path to
|
||||||
xy0 = self.path[0][1:3]
|
xy0 = self.path[0][1:3]
|
||||||
for p in reversed(self.pathes):
|
if (not points_equal(*xy0, *self.path[-1][1:3]) and
|
||||||
if self.path[0][0] == "T":
|
not self.path[0][0] == "T"):
|
||||||
break
|
for p in reversed(self.pathes):
|
||||||
xy1 = p.path[-1][1:3]
|
xy1 = p.path[-1][1:3]
|
||||||
if points_equal(*xy0, *xy1):
|
if points_equal(*xy0, *xy1):
|
||||||
# todo: check for same color and linewidth
|
# todo: check for same color and linewidth
|
||||||
p.path.extend(self.path[1:])
|
p.path.extend(self.path[1:])
|
||||||
self.path = []
|
self.path = []
|
||||||
return p
|
return p
|
||||||
p = Path(self.path, params)
|
p = Path(self.path, params)
|
||||||
self.pathes.append(p)
|
self.pathes.append(p)
|
||||||
self.path = []
|
self.path = []
|
||||||
|
|
Loading…
Reference in New Issue