- fixed the Cutout plugin for the rectangular cutout: the name of the resulting object is now correct if there is no extension in the source file
This commit is contained in:
@@ -10,6 +10,7 @@ CHANGELOG for FlatCAM beta
|
|||||||
26.01.2022
|
26.01.2022
|
||||||
|
|
||||||
- fixed the Cutout plugin not working with Geometry objects that are made out of a LineString or LinearRing geometric elements
|
- fixed the Cutout plugin not working with Geometry objects that are made out of a LineString or LinearRing geometric elements
|
||||||
|
- fixed the Cutout plugin for the rectangular cutout: the name of the resulting object is now correct if there is no extension in the source file
|
||||||
|
|
||||||
25.01.2022
|
25.01.2022
|
||||||
|
|
||||||
|
|||||||
@@ -1079,7 +1079,7 @@ class CutOut(AppTool):
|
|||||||
has_mouse_bites_val = True if self.ui.gaptype_combo.get_value() == 2 else False # "mouse bytes"
|
has_mouse_bites_val = True if self.ui.gaptype_combo.get_value() == 2 else False # "mouse bytes"
|
||||||
|
|
||||||
formatted_name = cutout_obj.options["name"].rpartition('.')[0]
|
formatted_name = cutout_obj.options["name"].rpartition('.')[0]
|
||||||
outname = "%s_cutout" % formatted_name
|
outname = "%s_cutout" % formatted_name if formatted_name != '' else "%s_cutout" % cutout_obj.options["name"]
|
||||||
self.app.collection.promise(outname)
|
self.app.collection.promise(outname)
|
||||||
|
|
||||||
outname_exc = cutout_obj.options["name"] + "_mouse_bites"
|
outname_exc = cutout_obj.options["name"] + "_mouse_bites"
|
||||||
@@ -1109,6 +1109,12 @@ class CutOut(AppTool):
|
|||||||
# fuse the lines
|
# fuse the lines
|
||||||
object_geo = unary_union(object_geo)
|
object_geo = unary_union(object_geo)
|
||||||
|
|
||||||
|
# if isinstance(object_geo, (MultiPolygon, MultiLineString)):
|
||||||
|
# x0, y0, x1, y1 = object_geo.bounds
|
||||||
|
# geo = box(x0, y0, x1, y1)
|
||||||
|
# if isinstance(object_geo, (LinearRing, LineString)):
|
||||||
|
# geo = Polygon(object_geo)
|
||||||
|
|
||||||
xmin, ymin, xmax, ymax = object_geo.bounds
|
xmin, ymin, xmax, ymax = object_geo.bounds
|
||||||
geo = box(xmin, ymin, xmax, ymax)
|
geo = box(xmin, ymin, xmax, ymax)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user