add separate first layer extrusion multiplier

This commit is contained in:
Stewart Allen 2018-01-19 19:23:02 -05:00
commit 8914b900b2
3 changed files with 15 additions and 8 deletions

View file

@ -492,13 +492,20 @@ var gs_kiri_print = exports;
finishSpeed = opt.speed || process.outputFinishrate,
firstShellSpeed = process.firstLayerRate,
firstFillSpeed = process.firstLayerFillRate,
firstPrintMult = process.firstLayerPrintMult,
printSpeed = opt.speed || (firstLayer ? firstShellSpeed : process.outputFeedrate),
fillSpeed = opt.speed || opt.fillSpeed || (firstLayer ? firstFillSpeed || firstShellSpeed : process.outputFeedrate),
moveSpeed = process.outputSeekrate,
outerFirst = process.outputOuterFirst,
origin = startPoint.add(offset),
z = slice.z;
// apply first layer extrusion multipliers
if (firstLayer) {
fillMult *= firstPrintMult;
shellMult *= firstPrintMult;
sparseMult *= firstPrintMult;
}
function retract() {
if (preout.length) preout.last().retract = true;
}
@ -647,12 +654,11 @@ var gs_kiri_print = exports;
next = array[i];
if (!next) continue;
poly = fnp ? fnp(next) : next;
if (outerFirst && newTop && poly.depth !== 0) continue;
find = poly.findClosestPointTo(startPoint);
order.push({
i: i,
n: next,
d: find.distance - (poly.depth * thinWall * (outerFirst?0:1)),
d: find.distance - (poly.depth * thinWall),
});
}
newTop = false;

View file

@ -74,6 +74,7 @@ self.kiri.license = exports.LICENSE;
firstSliceHeight: 1,
firstLayerRate: 1,
firstLayerFillRate: 1,
firstLayerPrintMult: 1,
outputRaft: 1,
outputTemp: 1,
outputFanMax: 1,
@ -95,7 +96,6 @@ self.kiri.license = exports.LICENSE;
outputShortFactor: 1,
outputFinishFactor: 1,
outputCooling: 1,
outputOuterFirst: 1,
detectThinWalls: 1,
outputClockwise: 1,
outputOriginCenter: 1,
@ -278,6 +278,7 @@ self.kiri.license = exports.LICENSE;
firstSliceHeight: 0.25,
firstLayerRate: 30,
firstLayerFillRate: 40,
firstLayerPrintMult: 1.0,
outputRaft: false,
outputTemp: 220,
@ -299,7 +300,6 @@ self.kiri.license = exports.LICENSE;
outputShortDistance: 5.0,
outputShortFactor: 0.2,
outputFinishFactor: 0,
outputOuterFirst: false,
detectThinWalls: false,
outputCooling: true,
@ -1121,7 +1121,7 @@ self.kiri.license = exports.LICENSE;
ajax(host+"/api/wait?key="+json.key, function(data) {
data = js2o(data);
DBUG.log(data);
alert("print to "+target+" @ "+host+" : "+data.status);
alert("print to "+target+": "+data.status);
});
} else {
alert("grid:print error\nstatus: "+status+"\nmessage: "+xhtr.responseText);
@ -2455,6 +2455,7 @@ self.kiri.license = exports.LICENSE;
firstSliceHeight: UC.newInput("slice height", {title:"in millimeters\nshould be >= slice height", convert:UC.toFloat, modes:FDM}),
firstLayerRate: UC.newInput("shell speed", {title:"print move max speed\nmillimeters / minute", convert:UC.toFloat, modes:FDM}),
firstLayerFillRate: UC.newInput("fill speed", {title:"fill move max speed\nmillimeters / minute", convert:UC.toFloat, modes:FDM}),
firstLayerPrintMult: UC.newInput("print factor", {title:"extrusion multiplier\n0.0 - 2.0", convert:UC.toFloat, modes:FDM}),
outputBrimCount: UC.newInput("skirt count", {title:"number of skirts", convert:UC.toInt, modes:FDM}),
outputBrimOffset: UC.newInput("skirt offset", {title:"millimeters", convert:UC.toFloat, modes:FDM}),
@ -2467,7 +2468,6 @@ self.kiri.license = exports.LICENSE;
outputShortDistance: UC.newInput("short segment", {title:"segment length cutoff\nfor short segments\nin millimeters", bound:UC.bound(0,200), convert:UC.toFloat, modes:FDM}),
outputShortFactor: UC.newInput("short factor", {title:"max speed reduction factor\nfor short segments\nas % of print speed", bound:UC.bound(0.05,1), convert:UC.toFloat, modes:FDM}),
outputFinishFactor: UC.newInput("finish factor", {title:"% of nozzle diameter to\nshorten finish path by\nvalues of 0-1", bound:UC.bound(0.0,1), convert:UC.toFloat, modes:FDM}),
outputOuterFirst: UC.newBoolean("outer first", onBooleanClick, {title: "output outermost shell first", modes:FDM}),
detectThinWalls: UC.newBoolean("thin wall fill", onBooleanClick, {title: "detect and fill thin openings\nbetween shells walls", modes:FDM})
});

View file

@ -1,7 +1,7 @@
{
"pre":[
"M221 T0 S100.00",
"M140 S{bed_temp}",
"M221 T0 S100.00",
"M104 T0 S{temp}",
"M109 T0 S{temp}",
"M190 S{bed_temp}",
@ -11,6 +11,7 @@
"M107",
"G28 X0 Y0",
"G28 Z0",
"T0",
"G1 Z0.05 F6000.00",
"G92 E0",
"G1 F140 E29",