added helical to UIs
This commit is contained in:
parent
cf35717a6b
commit
b014d694b2
6 changed files with 68 additions and 14 deletions
|
|
@ -54,6 +54,16 @@
|
||||||
"camDrillLift": 2,
|
"camDrillLift": 2,
|
||||||
"camDrillingOn": false,
|
"camDrillingOn": false,
|
||||||
"camRegisterSpeed": 1000,
|
"camRegisterSpeed": 1000,
|
||||||
|
"camHelicalTool": 1000,
|
||||||
|
"camHelicalSpindle": 1000,
|
||||||
|
"camHelicalDownSpeed": 250,
|
||||||
|
"camHelicalSpeed": 1000,
|
||||||
|
"camHelicalDown": 5,
|
||||||
|
"camHelicalThru": 0,
|
||||||
|
"camHelicalOffset": "auto",
|
||||||
|
"camHelicalForceStartAngle": false,
|
||||||
|
"camHelicalStartAngle": 0,
|
||||||
|
"camHelicalOffsetOverride": 0,
|
||||||
"camFlipAxis": "X",
|
"camFlipAxis": "X",
|
||||||
"camFlipOther": "",
|
"camFlipOther": "",
|
||||||
"camTabsWidth": 20,
|
"camTabsWidth": 20,
|
||||||
|
|
|
||||||
|
|
@ -1838,25 +1838,34 @@ CAM.init = function(kiri, api) {
|
||||||
|
|
||||||
createPopOp('helical', {
|
createPopOp('helical', {
|
||||||
tool: 'camHelicalTool',
|
tool: 'camHelicalTool',
|
||||||
mode: 'camHelicalMode',
|
|
||||||
offset: 'camHelicalOffset',
|
|
||||||
spindle: 'camHelicalSpindle',
|
spindle: 'camHelicalSpindle',
|
||||||
down: 'camHelicalDown',
|
|
||||||
rate: 'camHelicalDownSpeed',
|
rate: 'camHelicalDownSpeed',
|
||||||
feed: 'camHelicalSpeed',
|
feed: 'camHelicalSpeed',
|
||||||
thru: 'camRegisterThru'
|
down: 'camHelicalDown',
|
||||||
|
thru: 'camHelicalThru',
|
||||||
|
offset: 'camHelicalOffset',
|
||||||
|
forceStartAng:'camHelicalForceStartAngle',
|
||||||
|
startAng:'camHelicalStartAngle',
|
||||||
|
offOver: 'camHelicalOffsetOverride',
|
||||||
|
fromTop: 'camHelicalFromStockTop',
|
||||||
}).inputs = {
|
}).inputs = {
|
||||||
tool: UC.newSelect(LANG.cc_tool, {}, "tools"),
|
tool: UC.newSelect(LANG.cc_tool, {}, "tools"),
|
||||||
mode: UC.newSelect(LANG.cc_offs_s, {title: LANG.cc_offs_l,}, "helicalmode"),
|
|
||||||
offset: UC.newSelect(LANG.cc_offs_s, {title: LANG.cc_offs_l,}, "helicaloff"),
|
offset: UC.newSelect(LANG.cc_offs_s, {title: LANG.cc_offs_l,}, "helicaloff"),
|
||||||
sep: UC.newBlank({class:"pop-sep"}),
|
sep: UC.newBlank({class:"pop-sep"}),
|
||||||
spindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, show:hasSpindle}),
|
spindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, show:hasSpindle}),
|
||||||
rate: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toInt, units:true}),
|
rate: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toFloat, units:true}),
|
||||||
feed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, units:true}),
|
feed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toFloat, units:true}),
|
||||||
|
down: UC.newInput(LANG.ch_sdwn_s, {title:LANG.ch_sdwn_l, convert:UC.toFloat, units:true}),
|
||||||
|
startAng: UC.newInput(LANG.ch_stra_s, {title:LANG.ch_stra_l, convert:UC.toDegsFloat, bound:UC.bound(-360,360),show:() => poppedRec.forceStartAng}),
|
||||||
|
offOver: UC.newInput(LANG.cc_offd_s, {title:LANG.cc_offd_l, convert:UC.toFloat, units:true, bound:UC.bound(0,Infinity)}),
|
||||||
sep: UC.newBlank({class:"pop-sep"}),
|
sep: UC.newBlank({class:"pop-sep"}),
|
||||||
down: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, units:true}),
|
forceStartAng: UC.newBoolean(LANG.ch_fsta_s, undefined, {title:LANG.ch_fsta_l, }),
|
||||||
|
fromTop: UC.newBoolean(LANG.cd_ftop_s,undefined, {title:LANG.cd_ftop_l}),
|
||||||
sep: UC.newBlank({class:"pop-sep"}),
|
sep: UC.newBlank({class:"pop-sep"}),
|
||||||
thru: UC.newInput(LANG.cd_thru_s, {title:LANG.cd_thru_l, convert:UC.toFloat, units:true}),
|
thru: UC.newInput(LANG.cd_thru_s, {title:LANG.cd_thru_l, convert:UC.toFloat, units:true}),
|
||||||
|
actions: UC.newRow([
|
||||||
|
UC.newButton(LANG.select, ()=>func.selectHoles(true), {title:LANG.cd_seli_l}),
|
||||||
|
], {class:"ext-buttons f-col"})
|
||||||
};
|
};
|
||||||
|
|
||||||
createPopOp('flip', {
|
createPopOp('flip', {
|
||||||
|
|
|
||||||
|
|
@ -525,6 +525,16 @@ const conf = exports({
|
||||||
camDrillingOn: false,
|
camDrillingOn: false,
|
||||||
camRegisterSpeed: 1000,
|
camRegisterSpeed: 1000,
|
||||||
camRegisterThru: 5,
|
camRegisterThru: 5,
|
||||||
|
camHelicalTool: 1000,
|
||||||
|
camHelicalSpindle: 1000,
|
||||||
|
camHelicalDownSpeed: 250,
|
||||||
|
camHelicalSpeed: 1000,
|
||||||
|
camHelicalDown: 5,
|
||||||
|
camHelicalThru: 0,
|
||||||
|
camHelicalOffset: "auto",
|
||||||
|
camHelicalForceStartAngle: false,
|
||||||
|
camHelicalStartAngle: 0,
|
||||||
|
camHelicalOffsetOverride: 0,
|
||||||
camFlipAxis: "X",
|
camFlipAxis: "X",
|
||||||
camFlipOther: "",
|
camFlipOther: "",
|
||||||
camLaserEnable: ["M321"],
|
camLaserEnable: ["M321"],
|
||||||
|
|
|
||||||
|
|
@ -89,16 +89,13 @@ const LISTS = {
|
||||||
{ name: "follow" },
|
{ name: "follow" },
|
||||||
{ name: "clear" }
|
{ name: "clear" }
|
||||||
],
|
],
|
||||||
helicalmode: [
|
|
||||||
{ name: "clear" },
|
|
||||||
{ name: "threadCutting" }
|
|
||||||
],
|
|
||||||
traceoff: [
|
traceoff: [
|
||||||
{ name: "none" },
|
{ name: "none" },
|
||||||
{ name: "inside" },
|
{ name: "inside" },
|
||||||
{ name: "outside" }
|
{ name: "outside" }
|
||||||
],
|
],
|
||||||
helicaloff:[
|
helicaloff:[
|
||||||
|
{ name: "auto" },
|
||||||
{ name: "inside" },
|
{ name: "inside" },
|
||||||
{ name: "outside" },
|
{ name: "outside" },
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ gapp.register("kiri.ui", [], (root, exports) => {
|
||||||
bound,
|
bound,
|
||||||
toInt,
|
toInt,
|
||||||
toFloat,
|
toFloat,
|
||||||
|
toDegsFloat,
|
||||||
isSticky,
|
isSticky,
|
||||||
setSticky,
|
setSticky,
|
||||||
newBoolean,
|
newBoolean,
|
||||||
|
|
@ -342,6 +343,18 @@ gapp.register("kiri.ui", [], (root, exports) => {
|
||||||
return nv;
|
return nv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toDegsFloat(){
|
||||||
|
let nv = this.value !== '' ? parseFloat(this.value) : null;
|
||||||
|
if (nv !== null && this.bound) nv = this.bound(nv);
|
||||||
|
nv = (nv+360)% 360; // bound the val to 0-359.99
|
||||||
|
if (this.setv) {
|
||||||
|
return this.setv(nv);
|
||||||
|
} else {
|
||||||
|
this.value = nv;
|
||||||
|
}
|
||||||
|
return nv;
|
||||||
|
}
|
||||||
|
|
||||||
function raw() {
|
function raw() {
|
||||||
return this.value !== '' ? this.value : null;
|
return this.value !== '' ? this.value : null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -608,6 +608,17 @@ self.kiri.lang['en-us'] = {
|
||||||
cd_sela_s: "Select Matching Diameter",
|
cd_sela_s: "Select Matching Diameter",
|
||||||
cd_sela_l: ["select all holes that", "match selected tool diameter"],
|
cd_sela_l: ["select all holes that", "match selected tool diameter"],
|
||||||
|
|
||||||
|
// CNC HELICAL tolpath
|
||||||
|
ch_menu: "helical",
|
||||||
|
ch_sdwn_s: "step down (pitch)",
|
||||||
|
ch_sdwn_l: ["z-distance","per revolution","in workspace units","(inverse of threads per unit)", "0 to disable"],
|
||||||
|
ch_fsta_s: "force start angle",
|
||||||
|
ch_fsta_l: ["override start angle","defaults to closest point to tool"],
|
||||||
|
ch_stra_s: "start angle",
|
||||||
|
ch_stra_l: ["start angle of helix","in degrees ccw of +x axis"],
|
||||||
|
ch_selc_l: ["select a cylinder face", "inner holes that are too small","will be ignored."],
|
||||||
|
|
||||||
|
|
||||||
// CNC FLIP
|
// CNC FLIP
|
||||||
cf_menu: "flip",
|
cf_menu: "flip",
|
||||||
cf_nvrt_s: "z bottom",
|
cf_nvrt_s: "z bottom",
|
||||||
|
|
@ -643,6 +654,10 @@ self.kiri.lang['en-us'] = {
|
||||||
cl_maxz_s: "max z height",
|
cl_maxz_s: "max z height",
|
||||||
cl_maxz_l: ["highest Z band position. when set to 0, uses the highest Z point of the workspace"],
|
cl_maxz_l: ["highest Z band position. when set to 0, uses the highest Z point of the workspace"],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// CNC CUTOUT TABS
|
// CNC CUTOUT TABS
|
||||||
ct_menu: "tabs",
|
ct_menu: "tabs",
|
||||||
ct_angl_s: "angle",
|
ct_angl_s: "angle",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue