add slicing comments. comment out potentially unused xray() function in slice

This commit is contained in:
Stewart Allen 2022-09-16 22:12:27 -04:00
commit cde8745e7b
3 changed files with 14 additions and 13 deletions

View file

@ -572,6 +572,9 @@ FDM.slice = function(settings, widget, onupdate, ondone) {
} }
// calculations only relevant when solid layers are used // calculations only relevant when solid layers are used
// layer boolean diffs need to be computed to find flat areas to fill
// and overhangs that need to be supported. these are stored in flats
// and bridges, projected up/down, and merged into an array of solids
if (solidLayers && !vaseMode && !isSynth) { if (solidLayers && !vaseMode && !isSynth) {
profileStart("delta"); profileStart("delta");
forSlices(0.2, 0.34, slice => { forSlices(0.2, 0.34, slice => {
@ -609,8 +612,9 @@ FDM.slice = function(settings, widget, onupdate, ondone) {
profileEnd(); profileEnd();
} }
// for "real" objects, fill the remaining voids with sparse fill
// sparse layers only present when non-vase mose and sparse % > 0
if (!isSynth && !vaseMode) { if (!isSynth && !vaseMode) {
// sparse layers only present when non-vase mose and sparse % > 0
let lastType; let lastType;
// disabled until memory issue tracked down // disabled until memory issue tracked down
let promises = false && isConcurrent ? [] : undefined; let promises = false && isConcurrent ? [] : undefined;

View file

@ -174,16 +174,15 @@ class Slice {
return min; return min;
}; };
xray(dash = 3) { // xray(dash = 3) {
// console.log('xray', this); // // console.log('xray', this);
this.output().setLayer(`xp`, 0x888800).addPolys(this.topPolys()); // this.output().setLayer(`xp`, 0x888800).addPolys(this.topPolys());
this.lines.forEach((line, i) => { // this.lines.forEach((line, i) => {
const group = i % dash; // const group = i % dash;
const color = [ 0xff0000, 0x00ff00, 0x0000ff, 0xffff00, 0xff00ff ][group]; // const color = [ 0xff0000, 0x00ff00, 0x0000ff, 0xffff00, 0xff00ff ][group];
this.output().setLayer(`xl-${group}`, color).addLine(line.p1, line.p2); // this.output().setLayer(`xl-${group}`, color).addLine(line.p1, line.p2);
}); // });
} // }
} }
/** /**

View file

@ -262,8 +262,6 @@ function createPhongMaterial(color, flat) {
function createLambertMaterial(color, flat) { function createLambertMaterial(color, flat) {
return new THREE.MeshLambertMaterial({ return new THREE.MeshLambertMaterial({
// shininess,
// specular,
transparent: color.opacity != 1, transparent: color.opacity != 1,
opacity: color.opacity || 1, opacity: color.opacity || 1,
color: color.face, color: color.face,