fix slice timing. fix slice ambiguity on edge lines
This commit is contained in:
parent
45b8ac8c2d
commit
3508dffdf2
6 changed files with 17 additions and 10 deletions
1
notes.md
1
notes.md
|
|
@ -10,7 +10,6 @@
|
||||||
* drag knife support
|
* drag knife support
|
||||||
* all
|
* all
|
||||||
* 2d image to 3d part
|
* 2d image to 3d part
|
||||||
* memory optimization (worker and client proactive cleanup)
|
|
||||||
* circular fit/layout when no-layout to prevent collisions
|
* circular fit/layout when no-layout to prevent collisions
|
||||||
|
|
||||||
## 2.5 roadmap
|
## 2.5 roadmap
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "grid-apps",
|
"name": "grid-apps",
|
||||||
"version": "2.4.4D",
|
"version": "2.4.5D",
|
||||||
"description": "grid.space 3d slice & modeling tools",
|
"description": "grid.space 3d slice & modeling tools",
|
||||||
"author": "Stewart Allen <sa@grid.space>",
|
"author": "Stewart Allen <sa@grid.space>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
||||||
|
|
@ -754,7 +754,7 @@
|
||||||
let segtimes = {},
|
let segtimes = {},
|
||||||
segNumber = 0,
|
segNumber = 0,
|
||||||
errored = false,
|
errored = false,
|
||||||
startTime,
|
startTime = Date.now(),
|
||||||
lastMsg,
|
lastMsg,
|
||||||
camOrLaser = mode === 'CAM' || mode === 'LASER',
|
camOrLaser = mode === 'CAM' || mode === 'LASER',
|
||||||
stack = STACKS.create(widget.id, widget.mesh);
|
stack = STACKS.create(widget.id, widget.mesh);
|
||||||
|
|
@ -802,7 +802,7 @@
|
||||||
alert2(error);
|
alert2(error);
|
||||||
}
|
}
|
||||||
}, function(update, msg) {
|
}, function(update, msg) {
|
||||||
if (msg !== lastMsg) {
|
if (msg && msg !== lastMsg) {
|
||||||
let mark = Date.now();
|
let mark = Date.now();
|
||||||
if (lastMsg) {
|
if (lastMsg) {
|
||||||
segtimes[`${segNumber++}_${lastMsg}`] = mark - startTime;
|
segtimes[`${segNumber++}_${lastMsg}`] = mark - startTime;
|
||||||
|
|
@ -862,7 +862,7 @@
|
||||||
if (layer) {
|
if (layer) {
|
||||||
output.push(KIRI.codec.decode(layer));
|
output.push(KIRI.codec.decode(layer));
|
||||||
}
|
}
|
||||||
if (message !== lastMsg) {
|
if (message && message !== lastMsg) {
|
||||||
let mark = Date.now();
|
let mark = Date.now();
|
||||||
if (lastMsg) {
|
if (lastMsg) {
|
||||||
segtimes[`${segNumber++}_${lastMsg}`] = mark - startTime;
|
segtimes[`${segNumber++}_${lastMsg}`] = mark - startTime;
|
||||||
|
|
|
||||||
|
|
@ -488,8 +488,12 @@
|
||||||
if (where.under.length === 3 || where.over.length === 3) {
|
if (where.under.length === 3 || where.over.length === 3) {
|
||||||
// does not intersect (all 3 above or below)
|
// does not intersect (all 3 above or below)
|
||||||
} else if (where.on.length === 2) {
|
} else if (where.on.length === 2) {
|
||||||
// one side of triangle is on the Z plane
|
// one side of triangle is on the Z plane and 3rd is below
|
||||||
lines.push(makeZLine(phash, where.on[0], where.on[1], false, true));
|
// 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) {
|
} else if (where.on.length === 3) {
|
||||||
// triangle is coplanar with Z
|
// triangle is coplanar with Z
|
||||||
// we drop these because this face is attached to 3 others
|
// we drop these because this face is attached to 3 others
|
||||||
|
|
|
||||||
|
|
@ -233,8 +233,12 @@
|
||||||
if (where.under.length === 3 || where.over.length === 3) {
|
if (where.under.length === 3 || where.over.length === 3) {
|
||||||
// does not intersect (all 3 above or below)
|
// does not intersect (all 3 above or below)
|
||||||
} else if (where.on.length === 2) {
|
} else if (where.on.length === 2) {
|
||||||
// one side of triangle is on the Z plane
|
// one side of triangle is on the Z plane and 3rd is below
|
||||||
lines.push(makeZLine(phash, where.on[0], where.on[1], false, true));
|
// 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) {
|
} else if (where.on.length === 3) {
|
||||||
// triangle is coplanar with Z
|
// triangle is coplanar with Z
|
||||||
// we drop these because this face is attached to 3 others
|
// we drop these because this face is attached to 3 others
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
let terms = {
|
let terms = {
|
||||||
COPYRIGHT: "Copyright (C) Stewart Allen <sa@grid.space> - All Rights Reserved",
|
COPYRIGHT: "Copyright (C) Stewart Allen <sa@grid.space> - All Rights Reserved",
|
||||||
LICENSE: "See the license.md file included with the source distribution",
|
LICENSE: "See the license.md file included with the source distribution",
|
||||||
VERSION: "2.4.D4"
|
VERSION: "2.4.D5"
|
||||||
};
|
};
|
||||||
|
|
||||||
if (typeof(module) === 'object') {
|
if (typeof(module) === 'object') {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue