diff --git a/notes.md b/notes.md index 6febadc0..d18a1ba0 100644 --- a/notes.md +++ b/notes.md @@ -10,7 +10,6 @@ * drag knife support * all * 2d image to 3d part -* memory optimization (worker and client proactive cleanup) * circular fit/layout when no-layout to prevent collisions ## 2.5 roadmap diff --git a/package.json b/package.json index 43574725..c3c662b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grid-apps", - "version": "2.4.4D", + "version": "2.4.5D", "description": "grid.space 3d slice & modeling tools", "author": "Stewart Allen ", "license": "MIT", diff --git a/src/kiri/main.js b/src/kiri/main.js index 638ce614..9720450c 100644 --- a/src/kiri/main.js +++ b/src/kiri/main.js @@ -754,7 +754,7 @@ let segtimes = {}, segNumber = 0, errored = false, - startTime, + startTime = Date.now(), lastMsg, camOrLaser = mode === 'CAM' || mode === 'LASER', stack = STACKS.create(widget.id, widget.mesh); @@ -802,7 +802,7 @@ alert2(error); } }, function(update, msg) { - if (msg !== lastMsg) { + if (msg && msg !== lastMsg) { let mark = Date.now(); if (lastMsg) { segtimes[`${segNumber++}_${lastMsg}`] = mark - startTime; @@ -862,7 +862,7 @@ if (layer) { output.push(KIRI.codec.decode(layer)); } - if (message !== lastMsg) { + if (message && message !== lastMsg) { let mark = Date.now(); if (lastMsg) { segtimes[`${segNumber++}_${lastMsg}`] = mark - startTime; diff --git a/src/kiri/slicer.js b/src/kiri/slicer.js index 6164b5bf..b71f1ea3 100644 --- a/src/kiri/slicer.js +++ b/src/kiri/slicer.js @@ -488,8 +488,12 @@ if (where.under.length === 3 || where.over.length === 3) { // does not intersect (all 3 above or below) } else if (where.on.length === 2) { - // one side of triangle is on the Z plane - lines.push(makeZLine(phash, where.on[0], where.on[1], false, true)); + // one side of triangle is on the Z plane and 3rd is below + // drop lines with 3rd above because that leads to ambiguities + // with complex nested polygons on flat surface + if (where.under.length === 1) { + lines.push(makeZLine(phash, where.on[0], where.on[1], false, true)); + } } else if (where.on.length === 3) { // triangle is coplanar with Z // we drop these because this face is attached to 3 others diff --git a/src/kiri/slicer2.js b/src/kiri/slicer2.js index 0d094cfc..12f19a32 100644 --- a/src/kiri/slicer2.js +++ b/src/kiri/slicer2.js @@ -233,8 +233,12 @@ if (where.under.length === 3 || where.over.length === 3) { // does not intersect (all 3 above or below) } else if (where.on.length === 2) { - // one side of triangle is on the Z plane - lines.push(makeZLine(phash, where.on[0], where.on[1], false, true)); + // one side of triangle is on the Z plane and 3rd is below + // drop lines with 3rd above because that leads to ambiguities + // with complex nested polygons on flat surface + if (where.under.length === 1) { + lines.push(makeZLine(phash, where.on[0], where.on[1], false, true)); + } } else if (where.on.length === 3) { // triangle is coplanar with Z // we drop these because this face is attached to 3 others diff --git a/src/license.js b/src/license.js index 3ed8b333..afb368bd 100644 --- a/src/license.js +++ b/src/license.js @@ -3,7 +3,7 @@ let terms = { COPYRIGHT: "Copyright (C) Stewart Allen - All Rights Reserved", LICENSE: "See the license.md file included with the source distribution", - VERSION: "2.4.D4" + VERSION: "2.4.D5" }; if (typeof(module) === 'object') {