output outer poly first
This commit is contained in:
parent
d6a72f3b5a
commit
adc095b853
3 changed files with 63 additions and 3 deletions
|
|
@ -541,7 +541,9 @@ var gs_kiri_print = exports;
|
|||
shorten: finishShell && !firstLayer ? nozzle * finishFactor : 0,
|
||||
extrude: shellMult,
|
||||
onfirst: function(firstPoint) {
|
||||
if (startPoint.distTo2D(firstPoint) > retractDist) retract();
|
||||
if (startPoint.distTo2D(firstPoint) > retractDist) {
|
||||
retract();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -724,7 +726,24 @@ var gs_kiri_print = exports;
|
|||
} else {
|
||||
// top object
|
||||
var bounds = POLY.flatten(next.gatherOuter([]));
|
||||
outputTraces([].appendAll(next.traces).appendAll(next.innerTraces() || []), bounds);
|
||||
// outputTraces([].appendAll(next.traces).appendAll(next.innerTraces() || []), bounds);
|
||||
|
||||
// outside in
|
||||
(next.traces || []).sort(function(a,b) {
|
||||
return a.perimeter() > b.perimeter() ? -1 : 1;
|
||||
}).forEach(function(poly, index) {
|
||||
outputTraces(poly, bounds);
|
||||
});
|
||||
// outputTraces([].appendAll(next.traces) || []), bounds); // outer first
|
||||
|
||||
// inside out
|
||||
// (next.innerTraces() || []).sort(function(a,b) {
|
||||
// return a.perimeter() > b.perimeter() ? 1 : -1;
|
||||
// }).forEach(function(poly, index) {
|
||||
// outputTraces(poly, bounds);
|
||||
// });
|
||||
outputTraces([].appendAll(next.innerTraces() || []), bounds); // inner last
|
||||
|
||||
outputFills(next.fill_lines, bounds);
|
||||
outputSparse(next.fill_sparse, bounds);
|
||||
lastTop = next;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
var exports = {
|
||||
COPYRIGHT:"Copyright (C) 2014-2019 Stewart Allen <sa@grid.space> - All Rights Reserved",
|
||||
LICENSE:"See the license.md file included with the source distribution",
|
||||
VERSION:"1.2.8"
|
||||
VERSION:"1.2.9"
|
||||
};
|
||||
if (!module) var module = {};
|
||||
module.exports = exports;
|
||||
|
|
|
|||
Loading…
Reference in a new issue