From 6e0c755a18419ebd0a0d1780847f0c2efda6d580 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Mon, 22 Mar 2021 22:24:50 -0400 Subject: [PATCH] improve outline routing by forcing inside then outside without size/dist weight hack. bump rev 2.8.D4 --- notes.md | 1 - package.json | 2 +- src/kiri.js | 2 +- src/license.js | 2 +- src/mode/cam/prepare.js | 8 +++++--- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/notes.md b/notes.md index 24c6b0cd..e8d5d55d 100644 --- a/notes.md +++ b/notes.md @@ -56,7 +56,6 @@ # FDM - BELT * `B` auto bed resizing leaves the origin in the wrong place at first -* `B` ranges don't work with anchors * `B` multiple parts with one angled against origin "floats" in preview * `B` re-add progress calls for all work units diff --git a/package.json b/package.json index bd843455..37f2f9d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grid-apps", - "version": "2.8.3D", + "version": "2.8.4D", "description": "grid.space 3d slice & modeling tools", "author": "Stewart Allen ", "license": "MIT", diff --git a/src/kiri.js b/src/kiri.js index 5dc102eb..0930d039 100644 --- a/src/kiri.js +++ b/src/kiri.js @@ -6,7 +6,7 @@ if (!self.kiri) { self.kiri = { - beta: 2803, + beta: 2804, driver: {}, // driver modules loader: [] // module loading: array of functions }; diff --git a/src/license.js b/src/license.js index 2f16a3c6..2d8589e4 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.8.D3" + VERSION: "2.8.D4" }; if (typeof(module) === 'object') { diff --git a/src/mode/cam/prepare.js b/src/mode/cam/prepare.js index 8ccc7d52..a51e8b74 100644 --- a/src/mode/cam/prepare.js +++ b/src/mode/cam/prepare.js @@ -437,7 +437,7 @@ return start; } - function depthOutlinePath(start, depth, levels, radius, emitter, clr, ease) { + function depthOutlinePath(start, depth, levels, radius, emitter, dir, ease) { let bottm = depth < levels.length - 1 ? levels[levels.length - 1] : null; let above = levels[depth-1]; let level = levels[depth]; @@ -462,6 +462,8 @@ // } return true; }); + // limit level search to polys matching winding (inside vs outside) + level = level.filter(p => p.isClockwise() === dir); // omit polys that match bottom level polys unless level above is cleared start = poly2polyEmit(level, start, (poly, index, count, fromPoint) => { poly.level_emit = true; @@ -472,9 +474,9 @@ if (ease) { fromPoint.z += ease; } - fromPoint = depthOutlinePath(fromPoint, depth + 1, levels, radius, emitter, clr, ease); + fromPoint = depthOutlinePath(fromPoint, depth + 1, levels, radius, emitter, dir, ease); return fromPoint; - }, {weight: true}); + }, {weight: false}); return start; }