add polygon.simplify(), xray for sla
This commit is contained in:
parent
6608d9d3d2
commit
9085b88380
6 changed files with 84 additions and 60 deletions
|
|
@ -82,7 +82,7 @@
|
|||
let last = slices[slices.length-1];
|
||||
// remove empty slices
|
||||
slices = widget.slices = slices.filter(slice => slice.tops.length);
|
||||
if (!process.slaOpenTop) {
|
||||
if (!process.slaOpenTop && !process.xray) {
|
||||
// re-add last empty slice for open top
|
||||
slices.push(last);
|
||||
}
|
||||
|
|
@ -212,7 +212,11 @@
|
|||
SLICER.sliceWidget(widget, {
|
||||
height: height,
|
||||
add: !process.slaOpenTop,
|
||||
concurrent: isConcurrent
|
||||
union: controller.healMesh,
|
||||
concurrent: isConcurrent,
|
||||
indices: process.indices || process.xray,
|
||||
debug: process.xray,
|
||||
xray: process.xray
|
||||
}, function(slices) {
|
||||
onSliceDone(slices).then(ondone);
|
||||
}, function(update) {
|
||||
|
|
@ -225,7 +229,6 @@
|
|||
const render = slice.output();
|
||||
|
||||
if (slice.unioned) {
|
||||
// console.log('solid', slice.index)
|
||||
slice.unioned.forEach(poly => {
|
||||
poly = poly.clone(true);//.move(widget.track.pos);
|
||||
render
|
||||
|
|
@ -233,7 +236,6 @@
|
|||
.addAreas([poly], { outline: true });
|
||||
});
|
||||
} else if (slice.tops) {
|
||||
// console.log('top', slice.index)
|
||||
slice.tops.forEach(top => {
|
||||
let poly = top.poly;//.clone(true).move(widget.track.pos);
|
||||
render
|
||||
|
|
@ -243,7 +245,6 @@
|
|||
}
|
||||
|
||||
if (slice.supports) {
|
||||
// console.log('support', slice.index)
|
||||
slice.supports.forEach(poly => {
|
||||
render
|
||||
.setLayer("support", { line: 0x010101, face: 0xfcba03, opacity: 0.2 })
|
||||
|
|
|
|||
Loading…
Reference in a new issue