- 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/
|
tests/tmp/
|
||||||
build/
|
build/
|
||||||
/venv/
|
/venv/
|
||||||
|
/venv/
|
||||||
|
|
||||||
# General for macOS
|
# General for macOS
|
||||||
.DS_Store
|
.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
|
9.11.2022
|
||||||
|
|
||||||
- when changing the style for the decorations from Preferences, now change is applied immediately
|
- 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)
|
msgbox.setIcon(QtWidgets.QMessageBox.Icon.Critical)
|
||||||
|
|
||||||
bt_yes = msgbox.addButton("Quit", QtWidgets.QMessageBox.ButtonRole.YesRole)
|
bt_yes = msgbox.addButton("Quit", QtWidgets.QMessageBox.ButtonRole.YesRole)
|
||||||
|
bt_ret = msgbox.addButton("Return", QtWidgets.QMessageBox.ButtonRole.NoRole)
|
||||||
|
|
||||||
msgbox.setDefaultButton(bt_yes)
|
msgbox.setDefaultButton(bt_yes)
|
||||||
# msgbox.setTextFormat(Qt.TextFormat.RichText)
|
# msgbox.setTextFormat(Qt.TextFormat.RichText)
|
||||||
msgbox.exec()
|
msgbox.exec()
|
||||||
|
|
||||||
|
response = msgbox.clickedButton()
|
||||||
|
if response == bt_ret:
|
||||||
|
pass
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
QtWidgets.QApplication.quit()
|
||||||
QtWidgets.QApplication.quit()
|
else:
|
||||||
|
QtWidgets.QApplication.quit()
|
||||||
# or QtWidgets.QApplication.exit(0)
|
# or QtWidgets.QApplication.exit(0)
|
||||||
|
|
||||||
sys.excepthook = excepthook
|
sys.excepthook = excepthook
|
||||||
|
|||||||
@@ -2819,18 +2819,27 @@ class ToolMilling(AppTool, Excellon):
|
|||||||
|
|
||||||
buff_dia = float(tools_dict[tool]['tooldia']) / 2.0 + offset
|
buff_dia = float(tools_dict[tool]['tooldia']) / 2.0 + offset
|
||||||
if mill_type in ['drills', 'both']:
|
if mill_type in ['drills', 'both']:
|
||||||
drills_tool_geo = [
|
try:
|
||||||
d_p.buffer(buff_dia) for d_p in tools_dict[tool]['drills']
|
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']:
|
total_paint_geo = drills_tool_geo
|
||||||
slots_tool_geo = [
|
except KeyError:
|
||||||
LineString(s_l).buffer(buff_dia) for s_l in tools_dict[tool]['slots']
|
total_paint_geo = []
|
||||||
]
|
if mill_type in ['slots', 'both']:
|
||||||
total_paint_geo = slots_tool_geo
|
try:
|
||||||
elif mill_type == 'both':
|
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
|
total_paint_geo = drills_tool_geo + slots_tool_geo
|
||||||
|
|
||||||
|
if not total_paint_geo:
|
||||||
|
continue
|
||||||
|
|
||||||
pol_nr = 0
|
pol_nr = 0
|
||||||
geo_len = len(total_paint_geo)
|
geo_len = len(total_paint_geo)
|
||||||
cp = []
|
cp = []
|
||||||
|
|||||||
Reference in New Issue
Block a user