optimize fill movements for better surface finish. remove old fdm process fields
This commit is contained in:
parent
4276214a7e
commit
1e8bd12afd
4 changed files with 24 additions and 15 deletions
|
|
@ -114,7 +114,7 @@ var gs_kiri_fdm = exports;
|
||||||
) && !spro.sliceVase;
|
) && !spro.sliceVase;
|
||||||
slice.doShells(spro.sliceShells, firstOffset, shellOffset, fillOffset, {
|
slice.doShells(spro.sliceShells, firstOffset, shellOffset, fillOffset, {
|
||||||
vase: spro.sliceVase,
|
vase: spro.sliceVase,
|
||||||
thin: spro.detectThinWalls
|
thin: false && spro.detectThinWalls
|
||||||
});
|
});
|
||||||
if (solid) slice.doSolidLayerFill(fillSpacing, sliceFillAngle);
|
if (solid) slice.doSolidLayerFill(fillSpacing, sliceFillAngle);
|
||||||
sliceFillAngle += 90.0;
|
sliceFillAngle += 90.0;
|
||||||
|
|
|
||||||
|
|
@ -570,6 +570,7 @@ var gs_kiri_print = exports;
|
||||||
var p, p1, p2, dist, len, found, group, mindist, t1, t2,
|
var p, p1, p2, dist, len, found, group, mindist, t1, t2,
|
||||||
marked = 0,
|
marked = 0,
|
||||||
start = 0,
|
start = 0,
|
||||||
|
skip = false,
|
||||||
lastIndex = -1;
|
lastIndex = -1;
|
||||||
|
|
||||||
while (lines && marked < lines.length) {
|
while (lines && marked < lines.length) {
|
||||||
|
|
@ -611,17 +612,18 @@ var gs_kiri_print = exports;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set next starting point
|
|
||||||
lastIndex = p1.index;
|
|
||||||
|
|
||||||
// mark as used (temporary)
|
|
||||||
p1.del = true;
|
|
||||||
p2.del = true;
|
|
||||||
marked += 2;
|
|
||||||
|
|
||||||
dist = startPoint.distTo2D(p1);
|
dist = startPoint.distTo2D(p1);
|
||||||
len = p1.distTo2D(p2);
|
len = p1.distTo2D(p2);
|
||||||
|
|
||||||
|
// go back to start when dist > retractDist
|
||||||
|
if (!skip && dist > retractDist) {
|
||||||
|
skip = true;
|
||||||
|
start = 0;
|
||||||
|
lastIndex = -1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
skip = false;
|
||||||
|
|
||||||
// if dist to new segment is less than thinWall
|
// if dist to new segment is less than thinWall
|
||||||
// and segment length is less than thinWall then
|
// and segment length is less than thinWall then
|
||||||
// just extrude to midpoint of next segment. this is
|
// just extrude to midpoint of next segment. this is
|
||||||
|
|
@ -650,8 +652,15 @@ var gs_kiri_print = exports;
|
||||||
addOutput(preout, p2, fillMult, fillSpeed);
|
addOutput(preout, p2, fillMult, fillSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// mark as used (temporarily)
|
||||||
|
p1.del = true;
|
||||||
|
p2.del = true;
|
||||||
|
|
||||||
|
lastIndex = p1.index;
|
||||||
startPoint = p2;
|
startPoint = p2;
|
||||||
|
marked += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// clear delete marks so we can re-print later
|
// clear delete marks so we can re-print later
|
||||||
if (lines) lines.forEach(function(p) { p.del = false });
|
if (lines) lines.forEach(function(p) { p.del = false });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -408,7 +408,7 @@ var gs_kiri_slice = exports;
|
||||||
last = [top.poly].clone(true);
|
last = [top.poly].clone(true);
|
||||||
top.traces = last;
|
top.traces = last;
|
||||||
} else {
|
} else {
|
||||||
if (false && opt.thin) {
|
if (opt.thin) {
|
||||||
var on1s2 = offset1 * 2,
|
var on1s2 = offset1 * 2,
|
||||||
on2s2 = offsetN * 2;
|
on2s2 = offsetN * 2;
|
||||||
POLY.expand2(
|
POLY.expand2(
|
||||||
|
|
|
||||||
10
js/kiri.js
10
js/kiri.js
|
|
@ -99,12 +99,12 @@ self.kiri.license = exports.LICENSE;
|
||||||
outputShortFactor: 1,
|
outputShortFactor: 1,
|
||||||
outputFinishFactor: 1,
|
outputFinishFactor: 1,
|
||||||
outputCooling: 1,
|
outputCooling: 1,
|
||||||
detectThinWalls: 1,
|
// detectThinWalls: 1,
|
||||||
antiBacklash: 1,
|
antiBacklash: 1,
|
||||||
outputClockwise: 1,
|
// outputClockwise: 1,
|
||||||
outputOriginCenter: 1,
|
// outputOriginCenter: 1,
|
||||||
outputInvertX: 1,
|
// outputInvertX: 1,
|
||||||
outputInvertY: 1
|
// outputInvertY: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cam:{
|
cam:{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue