- fixed INFO in Gerber Object UI to show correctly the type of geometric element in Follow geometry
This commit is contained in:
@@ -10,6 +10,7 @@ CHANGELOG for FlatCAM beta
|
|||||||
19.09.2021
|
19.09.2021
|
||||||
|
|
||||||
- fixed Extract Plugin not extracting soldermask for aperture macros
|
- fixed Extract Plugin not extracting soldermask for aperture macros
|
||||||
|
- fixed INFO in Gerber Object UI to show correctly the type of geometric element in Follow geometry
|
||||||
|
|
||||||
18.09.2021
|
18.09.2021
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
# File modified by: Marius Stanciu #
|
# File modified by: Marius Stanciu #
|
||||||
# ##########################################################
|
# ##########################################################
|
||||||
|
|
||||||
# import inspect # TODO: For debugging only.
|
# import inspect
|
||||||
|
|
||||||
from appGUI.ObjectUI import *
|
from appGUI.ObjectUI import *
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ from appGUI.PlotCanvasLegacy import ShapeCollectionLegacy
|
|||||||
from appGUI.VisPyVisuals import ShapeCollection
|
from appGUI.VisPyVisuals import ShapeCollection
|
||||||
|
|
||||||
from shapely.ops import unary_union
|
from shapely.ops import unary_union
|
||||||
from shapely.geometry import Polygon, MultiPolygon
|
from shapely.geometry import Polygon, MultiPolygon, Point, LineString
|
||||||
|
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
import sys
|
import sys
|
||||||
@@ -658,7 +658,8 @@ class FlatCAMObj(QtCore.QObject):
|
|||||||
temp_ap.pop('geometry', None)
|
temp_ap.pop('geometry', None)
|
||||||
|
|
||||||
solid_nr = 0
|
solid_nr = 0
|
||||||
follow_nr = 0
|
follow_nr_points = 0
|
||||||
|
follow_nr_lines = 0
|
||||||
clear_nr = 0
|
clear_nr = 0
|
||||||
|
|
||||||
if 'geometry' in obj.tools[ap]:
|
if 'geometry' in obj.tools[ap]:
|
||||||
@@ -668,14 +669,23 @@ class FlatCAMObj(QtCore.QObject):
|
|||||||
if 'solid' in el:
|
if 'solid' in el:
|
||||||
solid_nr += 1
|
solid_nr += 1
|
||||||
if 'follow' in el:
|
if 'follow' in el:
|
||||||
follow_nr += 1
|
if isinstance(el['follow'], Point):
|
||||||
|
follow_nr_points += 1
|
||||||
|
else:
|
||||||
|
follow_nr_lines += 1
|
||||||
if 'clear' in el:
|
if 'clear' in el:
|
||||||
clear_nr += 1
|
clear_nr += 1
|
||||||
else:
|
else:
|
||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
temp_ap['Solid_Geo'] = '%s Polygons' % str(solid_nr)
|
|
||||||
temp_ap['Follow_Geo'] = '%s LineStrings' % str(follow_nr)
|
temp_ap['Solid_Geo'] = '%s %s' % (str(solid_nr), _("Polygons"))
|
||||||
temp_ap['Clear_Geo'] = '%s Polygons' % str(clear_nr)
|
if follow_nr_lines > 0 and follow_nr_points == 0:
|
||||||
|
temp_ap['Follow_Geo'] = '%s %s' % (str(follow_nr_lines), _("LineStrings"))
|
||||||
|
elif follow_nr_lines == 0 and follow_nr_points > 0:
|
||||||
|
temp_ap['Follow_Geo'] = '%s %s' % (str(follow_nr_points), _("Points"))
|
||||||
|
else:
|
||||||
|
temp_ap['Follow_Geo'] = '%s %s' % (str(follow_nr_lines + follow_nr_points), _("Elements"))
|
||||||
|
temp_ap['Clear_Geo'] = '%s %s' % (str(clear_nr), _("Polygons"))
|
||||||
|
|
||||||
apid = self.treeWidget.addParent(
|
apid = self.treeWidget.addParent(
|
||||||
apertures, str(ap), expanded=False, color=p_color, font=font)
|
apertures, str(ap), expanded=False, color=p_color, font=font)
|
||||||
|
|||||||
Reference in New Issue
Block a user