mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Less yields for G-code reader and faster. CURA-3390
This commit is contained in:
parent
ea0c55fff1
commit
1e75c84662
1 changed files with 1 additions and 3 deletions
|
@ -255,6 +255,7 @@ class GCodeReader(MeshReader):
|
||||||
current_line += 1
|
current_line += 1
|
||||||
if current_line % file_step == 0:
|
if current_line % file_step == 0:
|
||||||
self._message.setProgress(math.floor(current_line / file_lines * 100))
|
self._message.setProgress(math.floor(current_line / file_lines * 100))
|
||||||
|
Job.yieldThread()
|
||||||
if len(line) == 0:
|
if len(line) == 0:
|
||||||
continue
|
continue
|
||||||
if line.find(self._type_keyword) == 0:
|
if line.find(self._type_keyword) == 0:
|
||||||
|
@ -290,9 +291,6 @@ class GCodeReader(MeshReader):
|
||||||
if T is not None:
|
if T is not None:
|
||||||
current_position = self._processTCode(T, line, current_position, current_path)
|
current_position = self._processTCode(T, line, current_position, current_path)
|
||||||
|
|
||||||
if current_line % 32 == 0:
|
|
||||||
Job.yieldThread()
|
|
||||||
|
|
||||||
if not self._is_layers_in_file and len(current_path) > 1 and current_position[2] > 0:
|
if not self._is_layers_in_file and len(current_path) > 1 and current_position[2] > 0:
|
||||||
if self._createPolygon(current_position[2], current_path):
|
if self._createPolygon(current_position[2], current_path):
|
||||||
self._layer_number += 1
|
self._layer_number += 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue