- in Cutout Plugin added an extra attempt to solve the issue with creating invalid geometries
This commit is contained in:
@@ -11,6 +11,7 @@ CHANGELOG for FlatCAM Evo beta
|
||||
|
||||
- in Cutout Plugin added ability to use the margin (full range of values: negative, zero, positive) when applying the cutout over a Geometry source object
|
||||
- updated the Turkish language strings (by Mehmet Kaya)
|
||||
- in Cutout Plugin added an extra attempt to solve the issue with creating invalid geometries
|
||||
|
||||
16.05.2022
|
||||
|
||||
|
||||
@@ -744,6 +744,8 @@ class CutOut(AppTool):
|
||||
object_geo = Polygon(object_geo)
|
||||
if margin >= 0:
|
||||
geo_buf = object_geo.buffer(margin)
|
||||
if geo_buf.is_empty:
|
||||
geo_buf = object_geo.buffer(margin + 0.0000001)
|
||||
geo = geo_buf.exterior
|
||||
else:
|
||||
geo_buf = object_geo.buffer(0.0000001)
|
||||
@@ -771,6 +773,8 @@ class CutOut(AppTool):
|
||||
else:
|
||||
if margin >= 0:
|
||||
geo_buf = geom_struct.buffer(margin)
|
||||
if geo_buf.is_empty:
|
||||
geo_buf = geom_struct.buffer(margin + 0.0000001)
|
||||
geom_struct = geo_buf.exterior
|
||||
else:
|
||||
geo_buf = geom_struct.buffer(0.0000001)
|
||||
@@ -1126,6 +1130,8 @@ class CutOut(AppTool):
|
||||
else:
|
||||
if margin >= 0:
|
||||
geo_buf = geo.buffer(margin)
|
||||
if geo_buf.is_empty:
|
||||
geo_buf = geo.buffer(margin + 0.0000001)
|
||||
geo = geo_buf.exterior
|
||||
else:
|
||||
geo_buf = geo.buffer(0.0000001)
|
||||
@@ -1147,6 +1153,8 @@ class CutOut(AppTool):
|
||||
geom_struct = box(xmin, ymin, xmax, ymax)
|
||||
if margin >= 0:
|
||||
geo_buf = geom_struct.buffer(margin)
|
||||
if geo_buf.is_empty:
|
||||
geo_buf = geom_struct.buffer(margin + 0.0000001)
|
||||
geom_struct = geo_buf.exterior
|
||||
else:
|
||||
geo_buf = geom_struct.buffer(0.0000001)
|
||||
|
||||
Reference in New Issue
Block a user