checkpoint raft work
This commit is contained in:
parent
8b1a1fb014
commit
65f5244d6d
3 changed files with 19 additions and 12 deletions
|
|
@ -193,7 +193,8 @@ var gs_kiri_fdm = exports;
|
||||||
|
|
||||||
// create brim, skirt, raft if specificed in FDM mode (code shared by laser)
|
// create brim, skirt, raft if specificed in FDM mode (code shared by laser)
|
||||||
if (process.outputBrimCount || process.outputRaft) {
|
if (process.outputBrimCount || process.outputRaft) {
|
||||||
var brims = [];
|
var brims = [],
|
||||||
|
offset = process.outputBrimOffset || (process.outputRaft ? 4 : 0);
|
||||||
|
|
||||||
// compute first brim
|
// compute first brim
|
||||||
widgets.forEach(function(widget) {
|
widgets.forEach(function(widget) {
|
||||||
|
|
@ -204,7 +205,7 @@ var gs_kiri_fdm = exports;
|
||||||
});
|
});
|
||||||
// nest and offset tops
|
// nest and offset tops
|
||||||
POLY.nest(tops).forEach(function(poly) {
|
POLY.nest(tops).forEach(function(poly) {
|
||||||
poly.offset(-process.outputBrimOffset + nozzle / 2).forEach(function(brim) {
|
poly.offset(-offset + nozzle / 2).forEach(function(brim) {
|
||||||
brim.move(widget.mesh.position);
|
brim.move(widget.mesh.position);
|
||||||
brims.push(brim);
|
brims.push(brim);
|
||||||
});
|
});
|
||||||
|
|
@ -215,7 +216,7 @@ var gs_kiri_fdm = exports;
|
||||||
brims = POLY.union(brims);
|
brims = POLY.union(brims);
|
||||||
|
|
||||||
// if brim is offset, the expand and shrink to cause brims to merge
|
// if brim is offset, the expand and shrink to cause brims to merge
|
||||||
if (process.outputBrimOffset && brims.length) {
|
if (offset && brims.length) {
|
||||||
var extra = process.sliceSupportExtra + 2;
|
var extra = process.sliceSupportExtra + 2;
|
||||||
brims = POLY.expand(brims, extra, 0, null, 1);
|
brims = POLY.expand(brims, extra, 0, null, 1);
|
||||||
brims = POLY.expand(brims, -extra, 0, null, 1);
|
brims = POLY.expand(brims, -extra, 0, null, 1);
|
||||||
|
|
@ -226,9 +227,14 @@ var gs_kiri_fdm = exports;
|
||||||
var offset = newPoint(0,0,0),
|
var offset = newPoint(0,0,0),
|
||||||
height = nozzle;
|
height = nozzle;
|
||||||
|
|
||||||
|
// cause first point of raft to be used
|
||||||
|
printPoint = null;
|
||||||
|
|
||||||
var raft = function(height, angle, spacing, speed, extrude) {
|
var raft = function(height, angle, spacing, speed, extrude) {
|
||||||
var slice = kiri.newSlice(zoff + height / 2);
|
var slice = kiri.newSlice(zoff + height / 2);
|
||||||
brims.forEach(function(brim) {
|
brims.forEach(function(brim) {
|
||||||
|
// use first point of first brim as start point
|
||||||
|
if (printPoint === null) printPoint = brim.first();
|
||||||
var t = slice.addTop(brim);
|
var t = slice.addTop(brim);
|
||||||
t.traces = [ brim ];
|
t.traces = [ brim ];
|
||||||
t.inner = POLY.expand(t.traces, -nozzle * 0.5, 0, null, 1);
|
t.inner = POLY.expand(t.traces, -nozzle * 0.5, 0, null, 1);
|
||||||
|
|
@ -241,14 +247,15 @@ var gs_kiri_fdm = exports;
|
||||||
});
|
});
|
||||||
layerout.height = height;
|
layerout.height = height;
|
||||||
output.append(layerout);
|
output.append(layerout);
|
||||||
|
|
||||||
layerout = [];
|
layerout = [];
|
||||||
zoff += height;
|
zoff += height;
|
||||||
};
|
};
|
||||||
|
|
||||||
raft(nozzle/1, process.sliceFillAngle + 90, nozzle * 3.5, process.firstLayerRate / 3, 3.5);
|
raft(nozzle/1, process.sliceFillAngle + 90, nozzle * 4.0, process.firstLayerRate / 3, 3.5);
|
||||||
raft(nozzle/1, process.sliceFillAngle + 90, nozzle * 3.5, process.firstLayerRate / 3, 3.5);
|
// raft(nozzle/1, process.sliceFillAngle + 90, nozzle * 3.5, process.firstLayerRate / 3, 3.5);
|
||||||
raft(nozzle/3, process.sliceFillAngle + 22.5, nozzle * 0.5, process.firstLayerRate / 1, 0.5);
|
raft(nozzle/3, process.sliceFillAngle + 22.5, nozzle * 0.6, process.firstLayerRate / 2, 0.5);
|
||||||
raft(nozzle/3, process.sliceFillAngle + 22.5, nozzle * 0.5, process.firstLayerRate / 1, 0.5);
|
raft(nozzle/3, process.sliceFillAngle + 22.5, nozzle * 0.6, process.firstLayerRate / 2, 0.5);
|
||||||
|
|
||||||
// raise first layer off raft slightly to lessen adhesion
|
// raise first layer off raft slightly to lessen adhesion
|
||||||
firstLayerHeight += nozzle / 6;
|
firstLayerHeight += nozzle / 6;
|
||||||
|
|
@ -332,7 +339,9 @@ var gs_kiri_fdm = exports;
|
||||||
layerout,
|
layerout,
|
||||||
{
|
{
|
||||||
// wipe after last layer or between widgets
|
// wipe after last layer or between widgets
|
||||||
wipeAfter: (found > 1 && slices.length > 1) || (found === 1 && layer == maxLayers-1)
|
wipeAfter: (found > 1 && slices.length > 1) || (found === 1 && layer == maxLayers-1),
|
||||||
|
// only use first layer settings in the absence of a raft
|
||||||
|
first: closest.slice.index === 0 && !process.outputRaft
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
lastIndex = minidx;
|
lastIndex = minidx;
|
||||||
|
|
|
||||||
|
|
@ -387,9 +387,6 @@ var gs_kiri_print = exports;
|
||||||
if (lastPoint && point.x == lastPoint.x && point.y == lastPoint.y && point.z == lastPoint.z && lastEmit == emit) {
|
if (lastPoint && point.x == lastPoint.x && point.y == lastPoint.y && point.z == lastPoint.z && lastEmit == emit) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// if (lastPoint && UTIL.round(point.x,4) == UTIL.round(lastPoint.x,4) && UTIL.round(point.y,4) == UTIL.round(lastPoint.y,4)) {
|
|
||||||
// console.log(({dup:point, last:lastPoint, emit: emit, le: lastEmit}));
|
|
||||||
// }
|
|
||||||
lastPoint = point;
|
lastPoint = point;
|
||||||
lastEmit = emit;
|
lastEmit = emit;
|
||||||
array.push(new Output(point, emit, speed, tool));
|
array.push(new Output(point, emit, speed, tool));
|
||||||
|
|
@ -483,7 +480,7 @@ var gs_kiri_print = exports;
|
||||||
settings = this.settings,
|
settings = this.settings,
|
||||||
process = settings.process,
|
process = settings.process,
|
||||||
nozzle = settings.device.nozzleSize,
|
nozzle = settings.device.nozzleSize,
|
||||||
firstLayer = slice.index === 0,
|
firstLayer = opt.first || false,
|
||||||
minSeek = nozzle * 1.5,
|
minSeek = nozzle * 1.5,
|
||||||
thinWall = nozzle * 1.75,
|
thinWall = nozzle * 1.75,
|
||||||
fillMult = opt.mult || process.outputFillMult,
|
fillMult = opt.mult || process.outputFillMult,
|
||||||
|
|
|
||||||
1
notes.md
1
notes.md
|
|
@ -59,6 +59,7 @@
|
||||||
|
|
||||||
# FDM todo
|
# FDM todo
|
||||||
|
|
||||||
|
* fix slow seek to first point (raft) and wrong first point in general (all modes)
|
||||||
* add lay-flat auto-rotation or from selected face
|
* add lay-flat auto-rotation or from selected face
|
||||||
* determine start point from gcode preamble
|
* determine start point from gcode preamble
|
||||||
* add rafts, manual supports
|
* add rafts, manual supports
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue