mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 04:54:04 -06:00
T466: Added ability to print loaded gcode
This commit is contained in:
parent
2ee5e2cb0b
commit
64d7bb0c2a
390 changed files with 7 additions and 1 deletions
8
plugins/GCODEReader/GCODEReader.py
Normal file → Executable file
8
plugins/GCODEReader/GCODEReader.py
Normal file → Executable file
|
@ -76,7 +76,7 @@ class GCODEReader(MeshReader):
|
|||
else:
|
||||
backend = Application.getInstance().getBackend()
|
||||
backend._pauseSlicing = True
|
||||
backend.backendStateChange.emit(1)
|
||||
backend.backendStateChange.emit(3)
|
||||
Application.getInstance().getPrintInformation()._abbr_machine = "Pre-sliced"
|
||||
Application.getInstance().setHideSettings(True)
|
||||
|
||||
|
@ -116,6 +116,9 @@ class GCODEReader(MeshReader):
|
|||
backend.close()
|
||||
backend.backendStateChange.emit(1)
|
||||
|
||||
glist = getattr(Application.getInstance().getController().getScene(), "gcode_list")
|
||||
glist.clear()
|
||||
|
||||
file = open(file_name, "r")
|
||||
|
||||
layer_data = LayerDataBuilder.LayerDataBuilder()
|
||||
|
@ -159,6 +162,7 @@ class GCODEReader(MeshReader):
|
|||
# current_path.append([10, 10, 10])
|
||||
# while file.readable():
|
||||
for line in file:
|
||||
glist.append(line)
|
||||
if len(line) == 0:
|
||||
continue
|
||||
if line[0] == ";":
|
||||
|
@ -241,6 +245,8 @@ class GCODEReader(MeshReader):
|
|||
Preferences.getInstance().setValue("cura/jobname_prefix", True)
|
||||
|
||||
|
||||
|
||||
|
||||
view = Application.getInstance().getController().getActiveView()
|
||||
if view.getPluginId() == "LayerView":
|
||||
view.resetLayerData()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue