- 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:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,6 +3,7 @@
|
||||
tests/tmp/
|
||||
build/
|
||||
/venv/
|
||||
/venv/
|
||||
|
||||
# General for macOS
|
||||
.DS_Store
|
||||
|
||||
@@ -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
|
||||
|
||||
10
FlatCAM.py
10
FlatCAM.py
@@ -134,13 +134,19 @@ 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()
|
||||
|
||||
response = msgbox.clickedButton()
|
||||
if response == bt_ret:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
QtWidgets.QApplication.quit()
|
||||
QtWidgets.QApplication.quit()
|
||||
else:
|
||||
QtWidgets.QApplication.quit()
|
||||
# or QtWidgets.QApplication.exit(0)
|
||||
|
||||
sys.excepthook = excepthook
|
||||
|
||||
@@ -2819,18 +2819,27 @@ class ToolMilling(AppTool, Excellon):
|
||||
|
||||
buff_dia = float(tools_dict[tool]['tooldia']) / 2.0 + offset
|
||||
if mill_type in ['drills', 'both']:
|
||||
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']:
|
||||
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':
|
||||
try:
|
||||
drills_tool_geo = [
|
||||
d_p.buffer(buff_dia) for d_p in tools_dict[tool]['drills']
|
||||
]
|
||||
total_paint_geo = drills_tool_geo
|
||||
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
|
||||
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 = []
|
||||
|
||||
Reference in New Issue
Block a user