From 44df978a6721a7202e4628cf0656fc922b9ec3d4 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Sat, 28 Nov 2020 10:52:54 -0500 Subject: [PATCH] fix double inset. bump rev 2.4.D7 --- notes.md | 11 ++++------- package.json | 2 +- src/license.js | 2 +- src/mode/cam/slice.js | 20 ++++++++++++++++++-- 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/notes.md b/notes.md index e9a6b72b..5740cdd9 100644 --- a/notes.md +++ b/notes.md @@ -26,17 +26,15 @@ * `F` mesh / stl export (like w/ images, rotate, scale, future cleanup ops) * `F` detect and report slow framerates * `F` right click / context menu (object deletion, etc) -* `P` improve decimation speed by avoiding in/out of Point? * `P` duplicate objects should share same slice data unless rotated or scaled -* `P` worker state cache cleanup and organization -* `P` client/worker interface normalization -* `P` optimize object import to vertices + indexes to save memory * `P` allow selection to me decimated on demand (context menu?) +* `P` improve decimation speed by avoiding in/out of Point? +* `P` optimize object import to vertices + indexes to save memory +* `P` client/worker interface normalization # FDM * `B` sparse infill should follow polys between intersect points -* `B` expand > 0 producing artifacts with manual supports * `B` fix adaptive slicing with multi-extruder * `B` fix supports with grouped parts * `B` multi-extruder rendering of raft fails to offset the rest of the print @@ -51,7 +49,7 @@ * `F` first layer segment large flat areas for better fill reliability * `F` enable purge blocks when quick layers are detected * `F` apply finish speed to exposed top and underside flat areas -* `F` expand internal supporting flats +* `F` expand internal supporting flats / solids before projection * `F` first layer support speed should be same as shell speed * `F` trim support offset from layer below * `F` option to support interior bridges when 0% infill @@ -68,7 +66,6 @@ * `B` climb vs conventional not fully consistent after refactor * `B` outside cutting direction in roughing mode inverted -* `B` clear voids has double interior pass because wrong offset shadow used * `B` top clearing operations should use linear, not offset, passes * `F` animation should clear the mesh in areas where the cuts go through the stock? * `F` switch z top offset to an z anchor (top/bottom) + offset diff --git a/package.json b/package.json index 69d6acb8..b620fccc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grid-apps", - "version": "2.4.6D", + "version": "2.4.7D", "description": "grid.space 3d slice & modeling tools", "author": "Stewart Allen ", "license": "MIT", diff --git a/src/license.js b/src/license.js index b24639ce..5e0a0b3b 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.D6" + VERSION: "2.4.D7" }; if (typeof(module) === 'object') { diff --git a/src/mode/cam/slice.js b/src/mode/cam/slice.js index f93435c0..6638a6be 100644 --- a/src/mode/cam/slice.js +++ b/src/mode/cam/slice.js @@ -266,7 +266,8 @@ if (proc.camRoughVoid) { return undefined; } - let po = POLY.offset([p], -(roughToolDiam + camRoughStock)); + // let po = POLY.offset([p], -(roughToolDiam + camRoughStock)); + let po = POLY.offset([p], -(roughToolDiam / 2 + camRoughStock + 0.001)); return po ? po[0] : undefined; } else { return p; @@ -276,7 +277,8 @@ shadow = POLY.nest(shadow); // expand shadow by half tool diameter + stock to leave - const sadd = procRoughIn ? roughToolDiam / 4 : roughToolDiam / 2; + // const sadd = procRoughIn ? roughToolDiam / 4 : roughToolDiam / 2; + const sadd = procRoughIn ? roughToolDiam / 2 : roughToolDiam / 2; const shell = POLY.offset(shadow, sadd + camRoughStock); nextOp(); @@ -318,6 +320,20 @@ if (!offset) return; + // elimate double inset on inners + offset.forEach(op => { + if (op.inner) { + let operim = op.perimeter(); + let newinner = []; + op.inner.forEach(oi => { + if (Math.abs(oi.perimeter() - operim) > 0.01) { + newinner.push(oi); + } + }); + op.inner = newinner; + } + }); + slice.camLines = offset; if (true) slice.output() .setLayer("slice", {line: 0xaaaa00}, true)