allow outside only outlines to omit thru inner holes - fixes #103
This commit is contained in:
parent
c17769be4b
commit
cdb0051ebd
4 changed files with 18 additions and 1 deletions
|
|
@ -431,6 +431,7 @@
|
|||
camOutlinePlunge: 250,
|
||||
camOutlineWide: false,
|
||||
camOutlineDogbone: false,
|
||||
camOutlineOmitThru: false,
|
||||
camOutlineOut: true,
|
||||
camOutlineIn: false,
|
||||
camOutlineOn: true,
|
||||
|
|
|
|||
|
|
@ -768,6 +768,7 @@
|
|||
rate: 'camOutlineSpeed',
|
||||
plunge: 'camOutlinePlunge',
|
||||
dogbones: 'camOutlineDogbone',
|
||||
omitthru: 'camOutlineOmitThru',
|
||||
outside: 'camOutlineOut',
|
||||
inside: 'camOutlineIn',
|
||||
wide: 'camOutlineWide'
|
||||
|
|
@ -783,6 +784,7 @@
|
|||
dogbones: UC.newBoolean(LANG.co_dogb_s, undefined, {title:LANG.co_dogb_l, show:(op) => { return !op.inputs.wide.checked }}),
|
||||
inside: UC.newBoolean(LANG.co_olin_s, undefined, {title:LANG.co_olin_l, show:(op) => { return !op.inputs.outside.checked }}),
|
||||
outside: UC.newBoolean(LANG.co_olot_s, undefined, {title:LANG.co_olot_l, show:(op) => { return !op.inputs.inside.checked }}),
|
||||
omitthru: UC.newBoolean(LANG.co_omit_s, undefined, {title:LANG.co_omit_l, show:(op) => { return op.inputs.outside.checked }}),
|
||||
wide: UC.newBoolean(LANG.co_wide_s, undefined, {title:LANG.co_wide_l, show:(op) => { return !op.inputs.inside.checked }})
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@
|
|||
|
||||
slice(progress) {
|
||||
let { op, state } = this;
|
||||
let { settings, widget, slicer, sliceAll, tshadow } = state;
|
||||
let { settings, widget, slicer, sliceAll, tshadow, thruHoles } = state;
|
||||
let { updateToolDiams, zThru, zBottom, shadowTop, tabs, cutTabs } = state;
|
||||
|
||||
let toolDiam = this.toolDiam = new CAM.Tool(settings, op.tool).fluteDiameter();
|
||||
|
|
@ -441,6 +441,18 @@
|
|||
tops = tshadow;
|
||||
}
|
||||
|
||||
if (op.omitthru) {
|
||||
// eliminate thru holes from shadow
|
||||
for (let hole of thruHoles) {
|
||||
for (let top of tops) {
|
||||
if (!top.inner) continue;
|
||||
top.inner = top.inner.filter(innr => {
|
||||
return !innr.isEquivalent(hole);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let offset = POLY.expand(tops, toolDiam / 2, slice.z);
|
||||
if (!(offset && offset.length)) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -304,6 +304,8 @@ kiri.lang['en-us'] = {
|
|||
co_olin_l: "limit cutting to\ninside part boundaries",
|
||||
co_olot_s: "outside only",
|
||||
co_olot_l: "limit cutting to\exterior part boundaries\nwhich can be thought of\nas the shadow outline",
|
||||
co_omit_s: "omit through",
|
||||
co_omit_l: "eliminate thru holes",
|
||||
co_olen_s: "enable",
|
||||
co_olen_l: "enabled outline cutting",
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue