force support fill orientation on belt
This commit is contained in:
parent
3175151f7f
commit
dc241934d9
1 changed files with 7 additions and 7 deletions
|
|
@ -531,12 +531,12 @@
|
||||||
for (let top of slice.tops) {
|
for (let top of slice.tops) {
|
||||||
if (!outline) {
|
if (!outline) {
|
||||||
let offset = top.shells;
|
let offset = top.shells;
|
||||||
fillSupportPolys(promises, offset, lineWidth, density, slice.z);
|
fillSupportPolys(promises, offset, lineWidth, density, slice.z, isBelt);
|
||||||
resolve.push({top, offset});
|
resolve.push({top, offset});
|
||||||
} else {
|
} else {
|
||||||
let offset = [];
|
let offset = [];
|
||||||
POLY.expand(top.shells || [], -nozzleSize/4, slice.z, offset);
|
POLY.expand(top.shells || [], -nozzleSize/4, slice.z, offset);
|
||||||
fillSupportPolys(promises, offset, lineWidth, density, slice.z);
|
fillSupportPolys(promises, offset, lineWidth, density, slice.z, isBelt);
|
||||||
resolve.push({top, offset});
|
resolve.push({top, offset});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -597,7 +597,7 @@
|
||||||
profileStart("support-fill");
|
profileStart("support-fill");
|
||||||
promises = false && isConcurrent ? [] : undefined;
|
promises = false && isConcurrent ? [] : undefined;
|
||||||
forSlices(0.8, promises ? 0.88 : 0.9, slice => {
|
forSlices(0.8, promises ? 0.88 : 0.9, slice => {
|
||||||
doSupportFill(promises, slice, lineWidth, supportDensity, process.sliceSupportArea);
|
doSupportFill(promises, slice, lineWidth, supportDensity, process.sliceSupportArea, isBelt);
|
||||||
}, "support");
|
}, "support");
|
||||||
if (promises) {
|
if (promises) {
|
||||||
await tracker(promises, (i, t) => {
|
await tracker(promises, (i, t) => {
|
||||||
|
|
@ -1400,7 +1400,7 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function doSupportFill(promises, slice, linewidth, density, minArea) {
|
function doSupportFill(promises, slice, linewidth, density, minArea, isBelt) {
|
||||||
let supports = slice.supports,
|
let supports = slice.supports,
|
||||||
nsB = [],
|
nsB = [],
|
||||||
nsC = [],
|
nsC = [],
|
||||||
|
|
@ -1422,19 +1422,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (supports) {
|
if (supports) {
|
||||||
fillSupportPolys(promises, supports, linewidth, density, slice.z);
|
fillSupportPolys(promises, supports, linewidth, density, slice.z, isBelt);
|
||||||
}
|
}
|
||||||
|
|
||||||
// re-assign new supports back to slice
|
// re-assign new supports back to slice
|
||||||
slice.supports = supports;
|
slice.supports = supports;
|
||||||
};
|
};
|
||||||
|
|
||||||
function fillSupportPolys(promises, polys, linewidth, density, z) {
|
function fillSupportPolys(promises, polys, linewidth, density, z, isBelt) {
|
||||||
// calculate fill density
|
// calculate fill density
|
||||||
let spacing = linewidth * (1 / density);
|
let spacing = linewidth * (1 / density);
|
||||||
polys.forEach(function (poly) {
|
polys.forEach(function (poly) {
|
||||||
// angle based on width/height ratio
|
// angle based on width/height ratio
|
||||||
let angle = (poly.bounds.width() / poly.bounds.height() > 1) ? 90 : 0;
|
let angle = isBelt || (poly.bounds.width() / poly.bounds.height() > 1) ? 90 : 0;
|
||||||
// inset support poly for fill lines 33% of nozzle width
|
// inset support poly for fill lines 33% of nozzle width
|
||||||
let inset = POLY.offset([poly], -linewidth/3, {flat: true, z, wasm: true});
|
let inset = POLY.offset([poly], -linewidth/3, {flat: true, z, wasm: true});
|
||||||
// do the fill
|
// do the fill
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue