fix double inset. bump rev 2.4.D7
This commit is contained in:
parent
0842d235a3
commit
44df978a67
4 changed files with 24 additions and 11 deletions
|
|
@ -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.D6"
|
||||
VERSION: "2.4.D7"
|
||||
};
|
||||
|
||||
if (typeof(module) === 'object') {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue