adjust purge tower belt offset
This commit is contained in:
parent
270437f0f2
commit
d306ac0569
2 changed files with 10 additions and 5 deletions
|
|
@ -268,7 +268,8 @@
|
|||
// replace extruders array with object array containing more info
|
||||
extruders = extruders.map((ext,i) => {
|
||||
if (!ext) return ext;
|
||||
let noz = device.extruders[i].extNozzle,
|
||||
let exi = device.extruders[i],
|
||||
noz = exi.extNozzle,
|
||||
pos = {x:blokpos.x, y:blokpos.y, z:0},
|
||||
rect = newPolygon().centerRectangle(pos, blok.x, blok.y),
|
||||
full = linesToPoly(POLY.fillArea([
|
||||
|
|
@ -279,6 +280,7 @@
|
|||
], 135, noz * 5)),
|
||||
rec = {
|
||||
extruder: i,
|
||||
diameter: exi.extNozzle,
|
||||
rect,
|
||||
full,
|
||||
sparse
|
||||
|
|
@ -323,12 +325,14 @@
|
|||
if (layer.last()) {
|
||||
layer.last().retract = true;
|
||||
}
|
||||
let purgeOn = first || !thin;
|
||||
let purgeOn = (!isBelt && first) || !thin;
|
||||
let box = rec.rect.clone().setZ(z);
|
||||
let fill = (purgeOn ? rec.full : rec.sparse).clone().setZ(z);
|
||||
if (isBelt) {
|
||||
box.move({x:0, y:z, z:0});
|
||||
fill.move({x:0, y:z, z:0});
|
||||
// offset by nozzle diameter + half step (shell) then angled
|
||||
let exo = rec.diameter * (1/Math.sqrt(2)) * 1.5;
|
||||
box.move({x:0, y:z - exo, z:0});
|
||||
fill.move({x:0, y:z - exo, z:0});
|
||||
if (offset) {
|
||||
box.move(offset);
|
||||
fill.move(offset);
|
||||
|
|
|
|||
|
|
@ -367,7 +367,8 @@
|
|||
}
|
||||
}
|
||||
// mark slice as touching belt if near miny
|
||||
if (Math.abs(slice.belt.miny - smin) < 0.01) {
|
||||
// if (Math.abs(slice.belt.miny - smin) < 0.01) {
|
||||
if (Math.abs(slice.belt.miny) < 0.01) {
|
||||
slice.belt.touch = true;
|
||||
if (!start) start = slice;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue