- added a 'return' button when a fatal error is encountered allowing the user to continue the work

- fixed a crash in Milling Plugin when trying to mill slots that do not have drills in the same file
This commit is contained in:
Marius Stanciu
2022-11-19 02:29:40 +02:00
parent 22f4d92be7
commit c1377d5090
4 changed files with 33 additions and 12 deletions

1
.gitignore vendored
View File

@@ -3,6 +3,7 @@
tests/tmp/
build/
/venv/
/venv/
# General for macOS
.DS_Store

View File

@@ -7,6 +7,11 @@ CHANGELOG for FlatCAM Evo beta
=================================================
19.11.2022
- added a 'return' button when a fatal error is encountered allowing the user to continue the work
- fixed a crash in Milling Plugin when trying to mill slots that do not have drills in the same file
9.11.2022
- when changing the style for the decorations from Preferences, now change is applied immediately

View File

@@ -134,12 +134,18 @@ if __name__ == '__main__':
msgbox.setIcon(QtWidgets.QMessageBox.Icon.Critical)
bt_yes = msgbox.addButton("Quit", QtWidgets.QMessageBox.ButtonRole.YesRole)
bt_ret = msgbox.addButton("Return", QtWidgets.QMessageBox.ButtonRole.NoRole)
msgbox.setDefaultButton(bt_yes)
# msgbox.setTextFormat(Qt.TextFormat.RichText)
msgbox.exec()
except Exception:
response = msgbox.clickedButton()
if response == bt_ret:
pass
except Exception:
QtWidgets.QApplication.quit()
else:
QtWidgets.QApplication.quit()
# or QtWidgets.QApplication.exit(0)

View File

@@ -2819,18 +2819,27 @@ class ToolMilling(AppTool, Excellon):
buff_dia = float(tools_dict[tool]['tooldia']) / 2.0 + offset
if mill_type in ['drills', 'both']:
try:
drills_tool_geo = [
d_p.buffer(buff_dia) for d_p in tools_dict[tool]['drills']
]
total_paint_geo = drills_tool_geo
elif mill_type in ['slots', 'both']:
except KeyError:
total_paint_geo = []
if mill_type in ['slots', 'both']:
try:
slots_tool_geo = [
LineString(s_l).buffer(buff_dia) for s_l in tools_dict[tool]['slots']
]
total_paint_geo = slots_tool_geo
elif mill_type == 'both':
except KeyError:
total_paint_geo = []
if mill_type == 'both':
total_paint_geo = drills_tool_geo + slots_tool_geo
if not total_paint_geo:
continue
pol_nr = 0
geo_len = len(total_paint_geo)
cp = []