more belt tweaks
This commit is contained in:
parent
848b168bc8
commit
9a94a87aef
4 changed files with 41 additions and 17 deletions
|
|
@ -51,7 +51,7 @@
|
|||
timeDwell = retDwell / 1000,
|
||||
offset = process.outputOriginCenter ? null : {
|
||||
x: device.bedWidth/2,
|
||||
y: device.bedDepth/2
|
||||
y: isBelt ? 0 : device.bedDepth/2
|
||||
},
|
||||
subst = {
|
||||
travel_speed: seekMMM,
|
||||
|
|
@ -182,7 +182,9 @@
|
|||
append(";; " + comment);
|
||||
}
|
||||
let o = [!rate && !newpos.e ? 'G0' : 'G1'];
|
||||
let emit = { x: isBelt, y: isBelt, z: isBelt };
|
||||
// put out x,y,z in belt mode if not engage/retract
|
||||
let xyz = newpos.x || newpos.y || newpos.z;
|
||||
let emit = { x: xyz && isBelt, y: xyz && isBelt, z: xyz && isBelt };
|
||||
if (typeof newpos.x === 'number') {
|
||||
pos.x = newpos.x;
|
||||
emit.x = true;
|
||||
|
|
@ -289,7 +291,9 @@
|
|||
|
||||
// move Z to layer height
|
||||
zpos += path.height;
|
||||
moveTo({z:zpos}, seekMMM);
|
||||
if (layer > 0 || !isBelt) {
|
||||
moveTo({z:zpos}, seekMMM);
|
||||
}
|
||||
|
||||
// iterate through layer outputs
|
||||
for (pidx=0; pidx<path.length; pidx++) {
|
||||
|
|
@ -321,7 +325,7 @@
|
|||
y = out.point.y + offset_y,
|
||||
z = out.point.z;
|
||||
|
||||
// adjust for inversions and offsets
|
||||
// adjust for inversions and origin offsets
|
||||
if (process.outputInvertX) x = -x;
|
||||
if (process.outputInvertY) y = -y;
|
||||
if (offset) {
|
||||
|
|
|
|||
|
|
@ -398,6 +398,24 @@
|
|||
|
||||
print.output = output;
|
||||
|
||||
// if belt, adjust z and y to baselines
|
||||
if (false && isBelt) {
|
||||
let miny = Infinity, minz = Infinity;
|
||||
for (let layer of output) {
|
||||
for (let rec of layer) {
|
||||
miny = Math.min(miny, rec.point.y);
|
||||
minz = Math.min(minz, rec.point.y);
|
||||
}
|
||||
}
|
||||
console.log({miny, minz});
|
||||
for (let layer of output) {
|
||||
for (let rec of layer) {
|
||||
// rec.point.y -= minz;
|
||||
// rec.point.z -= miny;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// render if not explicitly disabled
|
||||
if (render) {
|
||||
print.render = FDM.prepareRender(output, (progress, layer) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue