- fixed an error due of missing attribute of PlotCanvasLegacy when using Legacy2D graphic engine

- solving deprecation warnings issued by Shapely
- made sure that the Gerber Object geometry is always flattened
This commit is contained in:
Marius Stanciu
2021-09-21 15:55:35 +03:00
committed by Marius
parent 5f417f7156
commit dd029d6ded
17 changed files with 143 additions and 202 deletions

View File

@@ -10,6 +10,7 @@ from PyQt6 import QtWidgets, QtCore, QtGui
from appTool import AppTool
from appGUI.GUIElements import FCButton, FCDoubleSpinner, RadioSet, FCComboBox, NumericalEvalEntry, FCEntry, \
VerticalScrollArea, FCGridLayout, FCLabel, FCFrame
from camlib import flatten_shapely_geometry
from shapely.ops import unary_union
@@ -225,11 +226,7 @@ class ToolEtchCompensation(AppTool):
# no need to do anything for zero value offset isn't it? compensating with zero is the same as the original
return
try:
__ = iter(grb_obj.solid_geometry)
except TypeError:
grb_obj.solid_geometry = [grb_obj.solid_geometry]
grb_obj.solid_geometry = flatten_shapely_geometry(grb_obj.solid_geometry)
new_solid_geometry = []
for poly in grb_obj.solid_geometry: