tweak purge start and declarations

This commit is contained in:
Stewart Allen 2021-11-18 22:57:47 -05:00
commit c2375cd544
3 changed files with 21 additions and 7 deletions

View file

@ -123,7 +123,7 @@
minz = { x: Infinity, y: Infinity, z: Infinity },
isPalette = device.filamentSource === 'palette3',
paletteInfo = extras.palette || {},
palettePingStart = paletteInfo.push + paletteInfo.feed + 200,
palettePingStart = paletteInfo.ping / 2,
palettePingSpace = paletteInfo.ping || 0,
segments = [];
@ -508,15 +508,27 @@
// do not generate pings before total tube length exhausted
// because the palette cannot respond to differences before then
if (isPalette && palettePingSpace && emitted >= palettePingStart) {
if (out.point.purgeOn && emitted - purgeOff >= palettePingSpace) {
if (out.point.purgeOn && (purgeOff === 0 || emitted - purgeOff >= palettePingSpace)) {
retract();
append(`G4 P13000`);
// for (let i=0; i<13; i++) {
// append(`G4 P1000`);
// if (i < 12) append('G1');
// }
append(`G4 P4000`); append('G1');
append(`G4 P4000`); append('G1');
append(`G4 P4000`); append('G1');
append(`G4 P1000`);
unretract();
purgeOn = emitted;
}
if (purgeOn && out.point.purgeOff) {
retract();
append(`G4 P7000`);
// for (let i=0; i<7; i++) {
// append(`G4 P1000`);
// if (i < 6) append('G1');
// }
append(`G4 P4000`); append('G1');
append(`G4 P3000`);
unretract();
purgeOff = emitted;
if (!print.purges) {

View file

@ -327,6 +327,7 @@
return poly;
}
let purgedFirst = false;
let lastPurgeTool;
// generate purge block for given nozzle
@ -337,7 +338,7 @@
let rec = track[nozzle];
let thin = using >= 0 || lastPurgeTool === nozzle;
let tool = using >= 0 ? using : nozzle;
let first = layer.slice.index === 0;
let first = isBelt ? !purgedFirst && layer.slice.index >= 0 : layer.slice.index === 0;
let rate = first ? process.firstLayerRate : process.outputFeedrate;
lastPurgeTool = tool;
if (rec) {
@ -345,7 +346,8 @@
if (layer.last()) {
layer.last().retract = true;
}
let purgeOn = (!isBelt && first) || !thin;
purgedFirst = purgedFirst || first;
let purgeOn = first || !thin;
if (isBelt && z < 0) {
let scale = 1 - ((z / zmin));
mkblok(blokw * scale, blokh);

View file

@ -169,7 +169,7 @@ kiri.lang['en-us'] = {
dv_paid_s: "printer id",
dv_paid_l: ["unique printer identifier","may be made up"],
dv_paps_s: "ping spacing",
dv_paps_l: ["minimum filament consumption","between pings in millimeters","0 = disable pings"],
dv_paps_l: ["minimum filament consumption","between pings in millimeters","recommended 500 - 1000","0 = disable pings"],
dv_pafe_s: "feed length",
dv_pafe_l: ["feeder tube length in millimeters","short=570, medium=800, long=1100"],
dv_papl_s: "push length",