mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Add thread yields to several long running and heavy processing jobs
Contributes to CURA-358
This commit is contained in:
parent
653b46d825
commit
0b2f0b2604
3 changed files with 11 additions and 1 deletions
|
@ -38,10 +38,10 @@ class ProcessSlicedObjectListJob(Job):
|
|||
for node in DepthFirstIterator(self._scene.getRoot()):
|
||||
if type(node) is SceneNode and node.getMeshData():
|
||||
if node.callDecoration("getLayerData"):
|
||||
#if hasattr(node.getMeshData(), "layerData"):
|
||||
self._scene.getRoot().removeChild(node)
|
||||
else:
|
||||
objectIdMap[id(node)] = node
|
||||
Job.yieldThread()
|
||||
|
||||
settings = Application.getInstance().getMachineManager().getActiveProfile()
|
||||
layerHeight = settings.getSettingValue("layer_height")
|
||||
|
@ -91,6 +91,8 @@ class ProcessSlicedObjectListJob(Job):
|
|||
|
||||
layer_data.addPolygon(layer.id, polygon.type, points, polygon.line_width)
|
||||
|
||||
Job.yieldThread()
|
||||
|
||||
current_layer += 1
|
||||
progress = (current_layer / layer_count) * 100
|
||||
# TODO: Rebuild the layer data mesh once the layer has been processed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue