fix shadow skip logic bug (filter vs map) and added vertex threshold
This commit is contained in:
parent
1c9be01acd
commit
ec574248c5
3 changed files with 7 additions and 6 deletions
1
notes.md
1
notes.md
|
|
@ -59,6 +59,7 @@
|
||||||
* `B` outside cutting direction in roughing mode inverted
|
* `B` outside cutting direction in roughing mode inverted
|
||||||
* `B` on rotation, tabs dissociate from parts whose center changes with rotation
|
* `B` on rotation, tabs dissociate from parts whose center changes with rotation
|
||||||
|
|
||||||
|
* `F` new registration style: offset cutout
|
||||||
* `F` z thru should apply to any thru hole
|
* `F` z thru should apply to any thru hole
|
||||||
* `F` update analyzer to detect overhangs
|
* `F` update analyzer to detect overhangs
|
||||||
* `F` add linear clearing strategy option for roughing / pocket
|
* `F` add linear clearing strategy option for roughing / pocket
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@
|
||||||
track = v.track || undefined,
|
track = v.track || undefined,
|
||||||
widget = KIRI.newWidget(id, KIRI.Widget.Groups.forid(group));
|
widget = KIRI.newWidget(id, KIRI.Widget.Groups.forid(group));
|
||||||
widget.loadVertices(v.json ? v.geo.toFloat32() : v.geo);
|
widget.loadVertices(v.json ? v.geo.toFloat32() : v.geo);
|
||||||
widget.saved = time();
|
widget.saved = Date.now();
|
||||||
if (track && track.pos) {
|
if (track && track.pos) {
|
||||||
widget.track = track;
|
widget.track = track;
|
||||||
widget.move(track.pos.x, track.pos.y, track.pos.z, true);
|
widget.move(track.pos.x, track.pos.y, track.pos.z, true);
|
||||||
|
|
|
||||||
|
|
@ -925,11 +925,11 @@
|
||||||
|
|
||||||
slice(progress) {
|
slice(progress) {
|
||||||
let state = this.state;
|
let state = this.state;
|
||||||
let { ops, slicer } = state;
|
let { ops, slicer, widget } = state;
|
||||||
|
|
||||||
let real = ops.map(rec => rec.op).filter(op => op);
|
let real = ops.map(rec => rec.op).filter(op => op);
|
||||||
let rough = real.map(op => op.type === 'rough').length > 0;
|
let rough = real.filter(op => op.type === 'rough').length > 0;
|
||||||
let outlineIn = real.map(op => op.type === 'outline' && op.inside).length > 0;
|
let outlineIn = real.filter(op => op.type === 'outline' && op.inside).length > 0;
|
||||||
|
|
||||||
let minStepDown = real
|
let minStepDown = real
|
||||||
.map(op => (op.down || 3) / 3)
|
.map(op => (op.down || 3) / 3)
|
||||||
|
|
@ -938,10 +938,10 @@
|
||||||
let tslices = [];
|
let tslices = [];
|
||||||
let tshadow = [];
|
let tshadow = [];
|
||||||
let tzindex = slicer.interval(minStepDown, { fit: true, off: 0.01, down: true, flats: true });
|
let tzindex = slicer.interval(minStepDown, { fit: true, off: 0.01, down: true, flats: true });
|
||||||
let skipTerrain = !(rough || outlineIn) && tzindex.length > 50;
|
let skipTerrain = !(rough || outlineIn) && (tzindex.length > 50 || widget.vertices.length > 1000000);
|
||||||
|
|
||||||
if (skipTerrain) {
|
if (skipTerrain) {
|
||||||
console.log("skipping terrain generation for speed");
|
console.log("skipping terrain generation");
|
||||||
tzindex = [ tzindex.pop() ];
|
tzindex = [ tzindex.pop() ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue