0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-11-25 10:37:56 +01:00

Merge branch 'feature/printerdriver' of https://github.com/Doodle3D/doodle3d-client into feature/printerdriver

# By peteruithoven
# Via peteruithoven
* 'feature/printerdriver' of https://github.com/Doodle3D/doodle3d-client:
  Added bed temperature settings and replacement patterns
  Correcting spelling mistake

Conflicts:
	.gitignore
This commit is contained in:
Adriaan Wormgoor 2013-10-22 16:21:06 +02:00
commit 476e7d3e2d
7 changed files with 56 additions and 2264 deletions

2255
.gitignore vendored

File diff suppressed because it is too large Load Diff

View File

@ -49,6 +49,7 @@ function generate_gcode() {
var layerHeight = settings["printer.layerHeight"];
var maxObjectHeight = settings["printer.maxObjectHeight"];
var temperature = settings["printer.temperature"];
var bedTemperature = settings["printer.bed.temperature"];
var useSubLayers = settings["printer.useSubLayers"];
var enableTraveling = settings["printer.enableTraveling"];
var retractionEnabled = settings["printer.retraction.enabled"];
@ -56,15 +57,14 @@ function generate_gcode() {
var retractionminDistance = settings["printer.retraction.minDistance"];
var retractionamount = settings["printer.retraction.amount"];
var preheatTemperature = settings["printer.heatup.temperature"];
var preheatBedTemperature = settings["printer.heatup.bed.temperature"];
var startGcode = settings["printer.startgcode"];
startGcode = startGcode.replace("{printingTemp}",temperature);
startGcode = startGcode.replace("{preheatTemp}",preheatTemperature);
startGcode = subsituteVariables(startGcode,temperature,bedTemperature,preheatTemperature,preheatBedTemperature);
startGcode = startGcode.split("\n");
var endGcode = settings["printer.endgcode"];
endGcode = endGcode.replace("{printingTemp}",temperature);
endGcode = endGcode.replace("{preheatTemp}",preheatTemperature);
endGcode = subsituteVariables(endGcode,temperature,bedTemperature,preheatTemperature,preheatBedTemperature);
endGcode = endGcode.split("\n");
/*
@ -260,6 +260,16 @@ function generate_gcode() {
return gcode;
}
function subsituteVariables(gcode,temperature,bedTemperature,preheatTemperature,preheatBedTemperature) {
gcode = gcode.replace(/{printingTemp}/gi ,temperature);
gcode = gcode.replace(/{printingBedTemp}/gi ,bedTemperature);
gcode = gcode.replace(/{preheatTemp}/gi ,preheatTemperature);
gcode = gcode.replace(/{preheatBedTemp}/gi ,preheatBedTemperature);
return gcode;
}
function scaleFunction(percent) {
var r = 1.0;

View File

@ -76,7 +76,7 @@ $(function() {
$("#debug_display").css("display", "block");
// show and hide the progressguage and thermometer
showhideInterval = setInterval(showOrHideThermo, 2500);
//showhideInterval = setInterval(showOrHideThermo, 2500);
// $("#debugContainer").css("display", "block");

View File

@ -101,4 +101,9 @@ form input.error, form textarea.error, form select.error {
form .errorMsg {
color: #f00;
margin: 0 0 0 1em;
}
form dl dt {
float: left;
font-style: italic;
width: 10em;
}

View File

@ -2215,6 +2215,7 @@ function generate_gcode() {
var layerHeight = settings["printer.layerHeight"];
var maxObjectHeight = settings["printer.maxObjectHeight"];
var temperature = settings["printer.temperature"];
var bedTemperature = settings["printer.bed.temperature"];
var useSubLayers = settings["printer.useSubLayers"];
var enableTraveling = settings["printer.enableTraveling"];
var retractionEnabled = settings["printer.retraction.enabled"];
@ -2222,15 +2223,14 @@ function generate_gcode() {
var retractionminDistance = settings["printer.retraction.minDistance"];
var retractionamount = settings["printer.retraction.amount"];
var preheatTemperature = settings["printer.heatup.temperature"];
var preheatBedTemperature = settings["printer.heatup.bed.temperature"];
var startGcode = settings["printer.startgcode"];
startGcode = startGcode.replace("{printingTemp}",temperature);
startGcode = startGcode.replace("{preheatTemp}",preheatTemperature);
startGcode = subsituteVariables(startGcode,temperature,bedTemperature,preheatTemperature,preheatBedTemperature);
startGcode = startGcode.split("\n");
var endGcode = settings["printer.endgcode"];
endGcode = endGcode.replace("{printingTemp}",temperature);
endGcode = endGcode.replace("{preheatTemp}",preheatTemperature);
endGcode = subsituteVariables(endGcode,temperature,bedTemperature,preheatTemperature,preheatBedTemperature);
endGcode = endGcode.split("\n");
/*
@ -2426,6 +2426,16 @@ function generate_gcode() {
return gcode;
}
function subsituteVariables(gcode,temperature,bedTemperature,preheatTemperature,preheatBedTemperature) {
gcode = gcode.replace(/{printingTemp}/gi ,temperature);
gcode = gcode.replace(/{printingBedTemp}/gi ,bedTemperature);
gcode = gcode.replace(/{preheatTemp}/gi ,preheatTemperature);
gcode = gcode.replace(/{preheatBedTemp}/gi ,preheatBedTemperature);
return gcode;
}
function scaleFunction(percent) {
var r = 1.0;
@ -3333,7 +3343,7 @@ $(function() {
$("#debug_display").css("display", "block");
// show and hide the progressguage and thermometer
showhideInterval = setInterval(showOrHideThermo, 2500);
//showhideInterval = setInterval(showOrHideThermo, 2500);
// $("#debugContainer").css("display", "block");

File diff suppressed because one or more lines are too long

View File

@ -61,6 +61,7 @@
<label for="wallThickness">Wall thickness:</label><input id="wallThickness" type="number" step="0.1" class="small" name="printer.wallThickness">mm<br>
<label for="filamentThickness">Filament thickness:</label><input id="filamentThickness" step="0.01" type="number" class="small" name="printer.filamentThickness">mm<br>
<label for="temperature">Temperature:</label><input id="temperature" type="number" class="small" name="printer.temperature">degrees C<br>
<label for="bedTemperature">Bed temperature:</label><input id="bedTemperature" type="number" class="small" name="printer.bed.temperature">degrees C<br>
<br>
<label for="speed">Speed:</label><input id="speed" type="number" name="printer.speed" class="small">mm/s<br>
<label for="travelSpeed">Travel speed:</label><input id="travelSpeed" type="number" name="printer.travelSpeed" class="small">mm/s<br>
@ -69,13 +70,14 @@
<label for="useSubLayers">Use sub-layers*:</label><input id="useSubLayers" type="checkbox" name="printer.useSubLayers" value="firstLayerSlow"><br>
<small>* Continuously move platform while printing instead of once per layer</small>
<br>
<label for="useRetraction">Use retraction:</label><input id="useRetraction" type="checkbox" name="printer.retraction.enabled" value="useRetraction"><br>
<label for="useRetraction">Use retraction:</label><input id="useRetraction" type="checkbox" name="printer.retraction.enabled" value="useRetraction"><br>
<label for="retractionAmount">Retraction amount:</label><input id="retractionAmount" type="number" class="small" name="printer.retraction.amount">mm<br>
<label for="retractionMinDistance">Retraction min distance:</label><input id="retractionMinDistance" type="number" class="small" name="printer.retraction.minDistance">mm<br>
<label for="retractionSpeed">Retraction speed:</label><input id="retractionSpeed" type="number" class="small" name="printer.retraction.speed">mm/s<br>
<br>
<label for="heatupEnabled">Auto preheat:</label><input id="heatupEnabled" type="checkbox" name="printer.heatup.enabled" value="heatupEnabled"><br>
<label for="heatupTemperature">Auto preaheat temperature:</label><input id="heatupTemperature" type="number" class="small" name="printer.heatup.temperature"><br>
<label for="heatupEnabled">Auto preheat:</label><input id="heatupEnabled" type="checkbox" name="printer.heatup.enabled" value="heatupEnabled"><br>
<label for="heatupTemperature">Preheat temperature:</label><input id="heatupTemperature" type="number" class="small" name="printer.heatup.temperature"><br>
<label for="heatupBedTemperature">Preheat bed temperature:</label><input id="heatupBedTemperature" type="number" class="small" name="printer.heatup.bed.temperature"><br>
</fieldset>
<fieldset id="doodlesettings">
@ -142,7 +144,15 @@
<label for="endgcode">End:</label><br/>
<textarea id="endgcode" class="gcode" name="printer.endgcode"></textarea>
</div>
<small>The text <em>{printingTemp}</em> will be replaced by the printing temperature and <em>{preheatTemp}</em> will be replaced by the preaheat temperature.</small>
<small>
The following texts are replaced:
<dl>
<dt>{printingTemp}</dt><dd>Printing temperature</dd>
<dt>{printingBedTemp}</dt><dd>Printing bed temperature</dd>
<dt>{preheatTemp}</dt><dd>Preheat temperature</dd>
<dt>{preheatBedTemp}</dt><dd>Preheat bed temperature</dd>
</dl>
</small>
</fieldset>
</form><br/>
</div>