add CAM pocket option to ignore interior features (outline only)

This commit is contained in:
Stewart Allen 2022-10-05 12:22:53 -04:00
commit 798ee85d23
5 changed files with 14 additions and 1 deletions

View file

@ -17,6 +17,7 @@ Full docs @ https://docs.grid.space/projects/kiri-moto
* add bridging option in CAM contouring
* add option to force z max routing in CAM
* add option to ignore z bottom in CAM contouring
* add CAM pocket option to ignore interior features (outline only)
* add CAM Z bottom visualization, make it relative to stock instead of part
* extend url loading of workspaces to all formats
* alert when healing is enabled and non-manifold geometries are detected

View file

@ -1067,7 +1067,8 @@ CAM.init = function(kiri, api) {
down: 'camPocketDown',
rate: 'camPocketSpeed',
plunge: 'camPocketPlunge',
expand: 'camPocketExpand'
expand: 'camPocketExpand',
outline: 'cmaPocketOutline'
}).inputs = {
tool: UC.newSelect(LANG.cc_tool, {}, "tools"),
sep: UC.newBlank({class:"pop-sep"}),
@ -1076,7 +1077,9 @@ CAM.init = function(kiri, api) {
down: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, units:true}),
rate: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, units:true}),
plunge: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toInt, units:true}),
sep: UC.newBlank({class:"pop-sep"}),
expand: UC.newInput(LANG.cp_xpnd_s, {title:LANG.cp_xpnd_l, convert:UC.toFloat, units:true}),
outline: UC.newBoolean(LANG.cp_outl_s, undefined, {title:LANG.cp_outl_l}),
sep: UC.newBlank({class:"pop-sep"}),
menu: UC.newRow([
UC.newButton(undefined, func.surfaceAdd, {icon:'<i class="fas fa-plus"></i>'}),

View file

@ -1027,6 +1027,12 @@ class OpPocket extends CamOp {
if (outline.length === 0) {
continue;
}
// option to skip interior features (holes, pillars)
if (op.outline) {
for (let p of outline) {
p.inner = undefined;
}
}
if (false) newSliceOut(zmin).output()
.setLayer("pocket area", {line: 0x1188ff}, false)
.addPolys(outline)

View file

@ -507,6 +507,7 @@ const conf = exports({
camPocketSpeed: 250,
camPocketPlunge: 200,
camPocketExpand: 0,
cmaPocketOutline: false,
camDrillTool: 1000,
camDrillSpindle: 1000,
camDrillDownSpeed: 250,

View file

@ -512,6 +512,8 @@ self.kiri.lang['en-us'] = {
// CNC POCKET
cp_xpnd_s: "expand",
cp_xpnd_l: ["grow selected area to","encompass corners"],
cp_outl_s: "outline only",
cp_outl_l: ["ignore interior voids and features"],
// CNC DRILLING
cd_menu: "drill",