resurrect wipe as a post-retraction option

This commit is contained in:
Stewart Allen 2021-02-09 15:38:05 -05:00
commit 7ab7701f8c
6 changed files with 22 additions and 12 deletions

View file

@ -330,13 +330,13 @@
outputFanLayer: 1,
outputRetractDist: 1.5,
outputRetractSpeed: 40,
outputRetractWipe: 0,
outputRetractDwell: 20,
outputBrimCount: 2,
outputBrimOffset: 2,
outputShortPoly: 100.0,
outputMinSpeed: 10.0,
outputCoastDist: 0,
outputWipeDistance: 0,
outputLayerRetract: false,
outputOriginCenter: true,
outputLoopLayers: "",

View file

@ -1786,9 +1786,9 @@
advanced: UC.newGroup(LANG.ad_menu, null, {modes:FDM}),
outputRetractDist: UC.newInput(LANG.ad_rdst_s, {title:LANG.ad_rdst_l, convert:UC.toFloat, modes:FDM}),
outputRetractSpeed: UC.newInput(LANG.ad_rrat_s, {title:LANG.ad_rrat_l, convert:UC.toInt, modes:FDM}),
outputRetractWipe: UC.newInput(LANG.ad_wpln_s, {title:LANG.ad_wpln_l, bound:UC.bound(0.0,10), convert:UC.toFloat, modes:FDM}),
outputRetractDwell: UC.newInput(LANG.ad_rdwl_s, {title:LANG.ad_rdwl_l, convert:UC.toInt, modes:FDM}),
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
// outputWipeDistance: UC.newInput("wipe", {title:"non-printing move at\close of polygon\nin millimeters", bound:UC.bound(0.0,10), convert:UC.toFloat, modes:FDM}),
sliceSolidMinArea: UC.newInput(LANG.ad_msol_s, {title:LANG.ad_msol_l, convert:UC.toFloat, modes:FDM}),
outputMinSpeed: UC.newInput(LANG.ad_mins_s, {title:LANG.ad_mins_l, bound:UC.bound(5,200), convert:UC.toFloat, modes:FDM}),
outputShortPoly: UC.newInput(LANG.ad_spol_s, {title:LANG.ad_spol_l, bound:UC.bound(0,10000), convert:UC.toFloat, modes:FDM}),

View file

@ -449,7 +449,6 @@
first = true,
close = !options.open,
last = startPoint,
wipeDist = options.wipe || 0,
coastDist = options.coast || 0,
tool = options.tool;
@ -525,10 +524,12 @@
origin = startPoint.add(offset),
zhop = process.zHopDistance || 0,
antiBacklash = process.antiBacklash,
wipeDist = process.outputRetractWipe || 0,
doSupport = opt.support,
isBelt = device.bedBelt,
startClone = startPoint.clone(),
z = slice.z;
z = slice.z,
lastPoly;
// apply first layer extrusion multipliers
if (firstLayer) {
@ -538,12 +539,15 @@
}
function retract() {
if (preout.length) {
preout.last().retract = true;
} else if (output.length) {
output.last().retract = true;
let array = preout.length ? preout : output;
if (array.length) {
let last = array.last();
last.retract = true;
if (wipeDist && lastPoly && last.point) {
addOutput(array, last.point.followTo(lastPoly.center(true), wipeDist));
}
} else if (opt.pretract) {
opt.pretract();
opt.pretract(wipeDist);
} else {
console.log('unable to retract. no preout or output');
}
@ -583,6 +587,7 @@
}
}
});
lastPoly = output.lastPoly = poly;
}
}

View file

@ -207,7 +207,6 @@
// console.log({double_retract: zhop});
return;
}
// console.log({retract:zhop});
retracted = retDist;
moveTo({e:-retracted}, retSpeed, `e-retract ${retDist}`);
if (zhop) moveTo({z:zpos + zhop}, seekMMM, "z-hop start");

View file

@ -403,9 +403,13 @@
first: slice.index === 0,
support: slice.widget.support,
onBelt: slice.onbelt,
pretract: () => {
pretract: (wipeDist) => {
if (lastLayer && lastLayer.length) {
lastLayer.last().retract = true;
let lastOut = lastLayer.last();
lastOut.retract = true;
if (wipeDist && lastLayer.lastPoly && lastOut.point) {
print.addOutput(lastLayer, lastOut.point.followTo(lastLayer.lastPoly.center(true), wipeDist));
}
}
}
}

View file

@ -480,6 +480,8 @@ kiri.lang['en-us'] = {
ad_rrat_s: "retract rate",
ad_rrat_l: "speed of filament\nretraction in mm/s",
ad_rdwl_s: "engage dwell",
ad_wpln_s: "retract wipe",
ad_wpln_l: "non-printing move\nafter retraction\nin millimeters",
ad_rdwl_l: "time between re-engaging\nfilament and movement\nin milliseconds",
ad_scst_s: "shell coast",
ad_scst_l: "non-printing end\nof perimeter shells\nin millimeters",