fix file export names for laser, sla. add device max power for lasers
This commit is contained in:
parent
5c1cddbb1c
commit
cbfa05e1da
9 changed files with 33 additions and 22 deletions
|
|
@ -559,7 +559,8 @@ function exportGCode(settings, data) {
|
|||
let dev = settings.device;
|
||||
let proc = settings.process;
|
||||
let space = dev.gcodeSpace ? ' ' : '';
|
||||
let power = 255;
|
||||
let max_power = dev.laserMaxPower || 255;
|
||||
let power = max_power;
|
||||
let cut_on = dev.gcodeLaserOn || dev.gcodeWaterOn || dev.gcodeKnifeDn || [];
|
||||
let cut_off = dev.gcodeLaserOff || dev.gcodeWaterOff || dev.gcodeKnifeUp || [];
|
||||
let knifeOn = proc.knifeOn;
|
||||
|
|
@ -569,14 +570,14 @@ function exportGCode(settings, data) {
|
|||
exportElements(
|
||||
settings,
|
||||
data,
|
||||
function(min, max, power, speed) {
|
||||
function(min, max, pct, speed) {
|
||||
let width = (max.x - min.x),
|
||||
height = (max.y - min.y);
|
||||
|
||||
dx = min.x;
|
||||
dy = min.y;
|
||||
feedrate = `${space}F${speed}`;
|
||||
power = (256 * (power / 100)).toFixed(3);
|
||||
power = (max_power * (pct / 100)).toFixed(3);
|
||||
|
||||
(dev.gcodePre || []).forEach(line => {
|
||||
lines.push(line);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ function init(kiri, api) {
|
|||
print_min = print_min.toString().padStart(2,'0');
|
||||
print_hrs = print_hrs.toString().padStart(2,'0');
|
||||
|
||||
$('print-filename').value = filename;
|
||||
$('print-filename-sla').value = filename;
|
||||
$('print-volume').value = (volume/1000).round(2);
|
||||
$('print-layers').value = layers;
|
||||
$('print-time').value = `${print_hrs}:${print_min}:${print_sec}`;
|
||||
|
|
@ -94,7 +94,7 @@ function init(kiri, api) {
|
|||
}
|
||||
|
||||
function saveFile(api, file, ext) {
|
||||
api.util.download(file, $('print-filename').value + ext);
|
||||
api.util.download(file, $('print-filename-sla').value + ext);
|
||||
api.modal.hide();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue