From 839ac35cafbd1906d14df9026864f6ca66ffae2b Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Fri, 18 Dec 2020 16:15:14 +0200 Subject: [PATCH] - Gerber Editor - when doing a selection of polygons, the displayed area is now the cummulated value --- CHANGELOG.md | 1 + appEditors/AppGerberEditor.py | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cc03f8d..bbf91bd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ CHANGELOG for FlatCAM beta 18.12.2020 - fixed the Tcl command export_gcode to return the actual gcode +- Gerber Editor - when doing a selection of polygons, the displayed area is now the cummulated value 17.12.2020 diff --git a/appEditors/AppGerberEditor.py b/appEditors/AppGerberEditor.py index f3481505..f98a40ed 100644 --- a/appEditors/AppGerberEditor.py +++ b/appEditors/AppGerberEditor.py @@ -4723,6 +4723,19 @@ class AppGerberEditor(QtCore.QObject): self.ui.geo_vertex_entry.set_value(vertex_nr) + # ############################################################################################################# + # ######################### calculate total area for all selected shapes ###################################### + # ############################################################################################################# + t_area = 0 + for sha in self.selected: + sha_geo = sha.geo + if 'solid' in sha_geo: + sha_geo_solid = sha_geo['solid'] + if sha_geo_solid.geom_type == 'Polygon': + t_area += sha_geo_solid.area + + self.ui.area_entry.set_value(t_area) + self.ui.apertures_table.cellPressed.connect(self.on_row_selected) self.plot_all()