mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 18:57:52 -06:00
Put try catch around actual arranging
`arrange` is the function that _could_ fail CURA-7951
This commit is contained in:
parent
cfc4db00a5
commit
b3b5ffbf55
1 changed files with 9 additions and 8 deletions
|
@ -32,17 +32,18 @@ class ArrangeObjectsJob(Job):
|
||||||
title = i18n_catalog.i18nc("@info:title", "Finding Location"))
|
title = i18n_catalog.i18nc("@info:title", "Finding Location"))
|
||||||
status_message.show()
|
status_message.show()
|
||||||
|
|
||||||
|
if self._grid_arrange:
|
||||||
|
arranger = GridArrange(self._nodes, Application.getInstance().getBuildVolume(), self._fixed_nodes)
|
||||||
|
else:
|
||||||
|
arranger = Nest2DArrange(self._nodes, Application.getInstance().getBuildVolume(), self._fixed_nodes,
|
||||||
|
factor=1000)
|
||||||
|
|
||||||
|
found_solution_for_all = False
|
||||||
try:
|
try:
|
||||||
if self._grid_arrange:
|
|
||||||
arranger = GridArrange(self._nodes, Application.getInstance().getBuildVolume(), self._fixed_nodes)
|
|
||||||
else:
|
|
||||||
arranger = Nest2DArrange(self._nodes, Application.getInstance().getBuildVolume(), self._fixed_nodes,
|
|
||||||
factor=1000)
|
|
||||||
|
|
||||||
found_solution_for_all = arranger.arrange()
|
found_solution_for_all = arranger.arrange()
|
||||||
|
|
||||||
except: # If the thread crashes, the message should still close
|
except: # If the thread crashes, the message should still close
|
||||||
Logger.logException("e", "Unable to arrange the objects on the buildplate. The arrange algorithm has crashed.")
|
Logger.logException("e",
|
||||||
|
"Unable to arrange the objects on the buildplate. The arrange algorithm has crashed.")
|
||||||
|
|
||||||
status_message.hide()
|
status_message.hide()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue