fix 0 brim offset/merge bug
This commit is contained in:
parent
c74224ef06
commit
6448181870
1 changed files with 9 additions and 14 deletions
|
|
@ -44,11 +44,9 @@
|
|||
layerno = 0,
|
||||
zoff = 0,
|
||||
layerout = [],
|
||||
slices = [],
|
||||
// slices = [],
|
||||
print = self.worker.print = KIRI.newPrint(settings, widgets),
|
||||
beltYoff = device.bedDepth / 2,
|
||||
beltfact = Math.cos(Math.PI/4),
|
||||
invbfact = 1 / beltfact;
|
||||
beltfact = Math.cos(Math.PI/4);
|
||||
|
||||
// compute bounds if missing
|
||||
if (!bounds) {
|
||||
|
|
@ -97,7 +95,7 @@
|
|||
brims = POLY.union(brims, undefined, true);
|
||||
|
||||
// if brim is offset, over-expand then shrink to induce brims to merge
|
||||
if (offset && brims.length) {
|
||||
if (brims.length) {
|
||||
let extra = process.sliceSupportExtra + 2;
|
||||
let zheight = brims[0].getZ();
|
||||
brims = POLY.expand(brims, extra, zheight, null, 1);
|
||||
|
|
@ -158,15 +156,13 @@
|
|||
let polys = [],
|
||||
preout = [];
|
||||
|
||||
// expand specified # of brims
|
||||
brims.forEach(function(brim) {
|
||||
POLY.offset([brim], nozzle, {
|
||||
// offset specified # of brims
|
||||
POLY.offset(brims, nozzle, {
|
||||
outs: polys,
|
||||
flat: true,
|
||||
count: process.outputBrimCount,
|
||||
z: firstLayerHeight / 2
|
||||
});
|
||||
});
|
||||
|
||||
// output brim points
|
||||
let brimStart = offset < nozzle * 2 ? newPoint(-bedWidth, -bedDepth, 0) : printPoint;
|
||||
|
|
@ -449,7 +445,6 @@
|
|||
layerout.layer = layerno++;
|
||||
update((layerno / cake.length) * 0.5, "prepare");
|
||||
|
||||
slices = [];
|
||||
layerout = [];
|
||||
lastOut = undefined;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue