Add back placeholder expansion for start/end gcode

See issue Ultimaker/CuraEngine#240

The intent of this change it to allow token replacement in start/end
gcode similar to the old Cura. Tokens are of the form
{material_bed_temperature} where the name is any setting name that is
passed to the engine.

Control the backend's generation of temperature commands via new
settings material_bed_temp_prepend and material_print_temp_prepend based
on whether there are temperature tokens in the printer profile's start
gcode.

This change will generate the same temperature gcode as FffGcodeWriter
at the head, if none of the temperature tokens are present in the
machine profile. Otherwise, they're suppressed via the prepend settings.

Also, set fdmprinter.json so that all that inherit from it default to
having the gcode temperature prepend also wait for temperature. Profiles
can override these settings: material_bed_temp_wait and
material_print_temp_wait

This PR intends to change both Cura and CuraEngine.  However, it is safe
to sequence with the Cura change first which will do token replacement
(if present), but will fail to supress the temperature prepends.
This commit is contained in:
Mark Walker 2015-11-16 01:12:53 -08:00
parent 107beb9798
commit 4a3db419ec
3 changed files with 40 additions and 3 deletions

View file

@ -273,4 +273,4 @@ class CuraEngineBackend(Backend):
self._process.terminate()
except: # terminating a process that is already terminating causes an exception, silently ignore this.
pass
self.slicingCancelled.emit()
self.slicingCancelled.emit()