Fixed bug introduced to clear_poly() in previous commit.
This commit is contained in:
@@ -987,9 +987,12 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
|
|||||||
assert isinstance(geo_obj, FlatCAMGeometry)
|
assert isinstance(geo_obj, FlatCAMGeometry)
|
||||||
#assert isinstance(app_obj, App)
|
#assert isinstance(app_obj, App)
|
||||||
|
|
||||||
cp = self.clear_polygon(poly.buffer(-self.options["paintmargin"]), tooldia, overlap=overlap)
|
|
||||||
if self.options["paintmethod"] == "seed":
|
if self.options["paintmethod"] == "seed":
|
||||||
cp = self.clear_polygon2(poly.buffer(-self.options["paintmargin"]), tooldia, overlap=overlap)
|
cp = self.clear_polygon2(poly.buffer(-self.options["paintmargin"]), tooldia, overlap=overlap)
|
||||||
|
|
||||||
|
else:
|
||||||
|
cp = self.clear_polygon(poly.buffer(-self.options["paintmargin"]), tooldia, overlap=overlap)
|
||||||
|
|
||||||
geo_obj.solid_geometry = list(cp.get_objects())
|
geo_obj.solid_geometry = list(cp.get_objects())
|
||||||
geo_obj.options["cnctooldia"] = tooldia
|
geo_obj.options["cnctooldia"] = tooldia
|
||||||
self.app.inform.emit("Done.")
|
self.app.inform.emit("Done.")
|
||||||
|
|||||||
18
camlib.py
18
camlib.py
@@ -331,6 +331,8 @@ class Geometry(object):
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
assert type(polygon) == Polygon
|
||||||
|
|
||||||
## The toolpaths
|
## The toolpaths
|
||||||
# Index first and last points in paths
|
# Index first and last points in paths
|
||||||
def get_pts(o):
|
def get_pts(o):
|
||||||
@@ -347,9 +349,19 @@ class Geometry(object):
|
|||||||
while True:
|
while True:
|
||||||
current = current.buffer(-tooldia * (1 - overlap))
|
current = current.buffer(-tooldia * (1 - overlap))
|
||||||
if current.area > 0:
|
if current.area > 0:
|
||||||
geoms.insert(current.exterior)
|
|
||||||
for i in current.interiors:
|
# current can be a MultiPolygon
|
||||||
geoms.insert(i)
|
try:
|
||||||
|
for p in current:
|
||||||
|
geoms.insert(p.exterior)
|
||||||
|
for i in p.interiors:
|
||||||
|
geoms.insert(i)
|
||||||
|
|
||||||
|
# Not a Multipolygon.
|
||||||
|
except TypeError:
|
||||||
|
geoms.insert(current.exterior)
|
||||||
|
for i in current.interiors:
|
||||||
|
geoms.insert(i)
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
return geoms
|
return geoms
|
||||||
|
|||||||
Reference in New Issue
Block a user