a few simple SLA fixes

This commit is contained in:
Stewart Allen 2021-06-24 12:39:47 -04:00
commit abbfd27b6b
3 changed files with 5 additions and 5 deletions

View file

@ -665,9 +665,9 @@
* @param {number} fillOffset * @param {number} fillOffset
* @param {Obejct} options * @param {Obejct} options
*/ */
function doShells(slice, count, offsetN, fillOffset, opt = {}) { function doShells(slice, count, offset1, offsetN, fillOffset, opt = {}) {
for (let top of slice.tops) { for (let top of slice.tops) {
doTopShells(slice.z, top, count, offsetN / 2, offsetN, fillOffset, opt); doTopShells(slice.z, top, count, offset1, offsetN, fillOffset, opt);
} }
} }

View file

@ -528,7 +528,7 @@
let slice = widget.slices[index]; let slice = widget.slices[index];
if (slice) { if (slice) {
if (slice.synth) count++; if (slice.synth) count++;
let polys = slice.solids.unioned; let polys = slice.unioned;
if (!polys) polys = slice.tops.map(t => t.poly); if (!polys) polys = slice.tops.map(t => t.poly);
if (slice.supports) polys.appendAll(slice.supports); if (slice.supports) polys.appendAll(slice.supports);
array.appendAll(polys.map(poly => { array.appendAll(polys.map(poly => {
@ -576,7 +576,7 @@
if (slice) { if (slice) {
// prevent premature exit on empty synth slice // prevent premature exit on empty synth slice
if (slice.synth) count++; if (slice.synth) count++;
let polys = slice.solids.unioned; let polys = slice.unioned;
if (!polys) polys = slice.tops.map(t => t.poly); if (!polys) polys = slice.tops.map(t => t.poly);
if (slice.supports) polys.appendAll(slice.supports); if (slice.supports) polys.appendAll(slice.supports);
polys.forEach(poly => { polys.forEach(poly => {

View file

@ -160,7 +160,7 @@
let trims = slice.solids || []; let trims = slice.solids || [];
traces.appendAll(trims); traces.appendAll(trims);
let union = POLY.union(traces, undefined, true); let union = POLY.union(traces, undefined, true);
slice.unioned = union; slice.unioned = POLY.setZ(union, slice.z);
}, "solid"); }, "solid");
} else { } else {
forSlices(slices, 10, (slice) => { forSlices(slices, 10, (slice) => {