fix slice timing. fix slice ambiguity on edge lines

This commit is contained in:
Stewart Allen 2020-11-26 09:42:12 -05:00
commit 3508dffdf2
6 changed files with 17 additions and 10 deletions

View file

@ -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

View file

@ -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 <sa@grid.space>",
"license": "MIT",

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -3,7 +3,7 @@
let terms = {
COPYRIGHT: "Copyright (C) Stewart Allen <sa@grid.space> - 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') {