fix laser output for centering
This commit is contained in:
parent
220cf4777c
commit
6e71caae04
2 changed files with 17 additions and 2 deletions
|
|
@ -186,8 +186,8 @@ var gs_kiri_laser = exports;
|
|||
});
|
||||
});
|
||||
|
||||
// normalize against origin lower left
|
||||
if (!process.outputOriginCenter) {
|
||||
// normalize against origin lower left
|
||||
output.forEach(function(layer) {
|
||||
layer.forEach(function(out) {
|
||||
point = out.point;
|
||||
|
|
@ -199,6 +199,21 @@ var gs_kiri_laser = exports;
|
|||
max.y = max.y - min.y;
|
||||
min.x = 0;
|
||||
min.y = 0;
|
||||
} else {
|
||||
// normalize against center of build area
|
||||
let w = print.settings.device.bedWidth;
|
||||
let h = print.settings.device.bedDepth;
|
||||
output.forEach(function(layer) {
|
||||
layer.forEach(function(out) {
|
||||
point = out.point;
|
||||
point.x += w/2;
|
||||
point.y += h/2;
|
||||
});
|
||||
});
|
||||
max.x = w;
|
||||
max.y = h;
|
||||
min.x = 0;
|
||||
min.y = 0;
|
||||
}
|
||||
|
||||
onpre(min, max, process.outputLaserPower, process.outputLaserSpeed);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
var exports = {
|
||||
COPYRIGHT:"Copyright (C) 2014-2019 Stewart Allen <sa@grid.space> - All Rights Reserved",
|
||||
LICENSE:"See the license.md file included with the source distribution",
|
||||
VERSION:"1.4.2"
|
||||
VERSION:"1.4.3"
|
||||
};
|
||||
if (!module) var module = {};
|
||||
module.exports = exports;
|
||||
|
|
|
|||
Loading…
Reference in a new issue