mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 23:53:56 -06:00
T466: Added ability to print loaded gcode
This commit is contained in:
parent
8987aa2048
commit
aa81cc090b
1 changed files with 5 additions and 1 deletions
|
@ -76,7 +76,7 @@ class GCODEReader(MeshReader):
|
||||||
else:
|
else:
|
||||||
backend = Application.getInstance().getBackend()
|
backend = Application.getInstance().getBackend()
|
||||||
backend._pauseSlicing = True
|
backend._pauseSlicing = True
|
||||||
backend.backendStateChange.emit(1)
|
backend.backendStateChange.emit(3)
|
||||||
Application.getInstance().getPrintInformation()._abbr_machine = "Pre-sliced"
|
Application.getInstance().getPrintInformation()._abbr_machine = "Pre-sliced"
|
||||||
Application.getInstance().setHideSettings(True)
|
Application.getInstance().setHideSettings(True)
|
||||||
|
|
||||||
|
@ -116,6 +116,9 @@ class GCODEReader(MeshReader):
|
||||||
backend.close()
|
backend.close()
|
||||||
backend.backendStateChange.emit(1)
|
backend.backendStateChange.emit(1)
|
||||||
|
|
||||||
|
glist = getattr(Application.getInstance().getController().getScene(), "gcode_list")
|
||||||
|
glist.clear()
|
||||||
|
|
||||||
file = open(file_name, "r")
|
file = open(file_name, "r")
|
||||||
|
|
||||||
layer_data = LayerDataBuilder.LayerDataBuilder()
|
layer_data = LayerDataBuilder.LayerDataBuilder()
|
||||||
|
@ -159,6 +162,7 @@ class GCODEReader(MeshReader):
|
||||||
# current_path.append([10, 10, 10])
|
# current_path.append([10, 10, 10])
|
||||||
# while file.readable():
|
# while file.readable():
|
||||||
for line in file:
|
for line in file:
|
||||||
|
glist.append(line)
|
||||||
if len(line) == 0:
|
if len(line) == 0:
|
||||||
continue
|
continue
|
||||||
if line[0] == ";":
|
if line[0] == ";":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue