mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 21:55:52 +08:00
T466: Added ability to print loaded gcode
This commit is contained in:
parent
8987aa2048
commit
aa81cc090b
@ -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…
x
Reference in New Issue
Block a user