first pass at helical pop op

This commit is contained in:
bakedpotatolord 2025-06-28 10:51:58 -06:00
commit f1f584bbd1
3 changed files with 37 additions and 0 deletions

View file

@ -337,6 +337,7 @@ CAM.init = function(kiri, api) {
case "drill": return func.opAddDrill();
case "trace": return func.opAddTrace();
case "pocket": return func.opAddPocket();
case "helical": return func.opAddHelical();
case "flip":
// only one flip op permitted
for (let op of current.process.ops) {
@ -419,6 +420,10 @@ CAM.init = function(kiri, api) {
func.opAdd(popOp.flip.new());
};
func.opAddHelical = () => {
func.opAdd(popOp.helical.new());
};
// TAB/TRACE BUTTON HANDLERS
api.event.on("button.click", target => {
let process = API.conf.get().process;
@ -1830,6 +1835,29 @@ CAM.init = function(kiri, api) {
sep: UC.newBlank({class:"pop-sep"}),
thru: UC.newInput(LANG.cd_thru_s, {title:LANG.cd_thru_l, convert:UC.toFloat, units:true}),
};
createPopOp('helical', {
tool: 'camHelicalTool',
mode: 'camHelicalMode',
offset: 'camHelicalOffset',
spindle: 'camHelicalSpindle',
down: 'camHelicalDown',
rate: 'camHelicalDownSpeed',
feed: 'camHelicalSpeed',
thru: 'camRegisterThru'
}).inputs = {
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"),
sep: UC.newBlank({class:"pop-sep"}),
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}),
feed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, units:true}),
sep: UC.newBlank({class:"pop-sep"}),
down: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, units:true}),
sep: UC.newBlank({class:"pop-sep"}),
thru: UC.newInput(LANG.cd_thru_s, {title:LANG.cd_thru_l, convert:UC.toFloat, units:true}),
};
createPopOp('flip', {
axis: 'camFlipAxis',

View file

@ -89,11 +89,19 @@ const LISTS = {
{ name: "follow" },
{ name: "clear" }
],
helicalmode: [
{ name: "clear" },
{ name: "threadCutting" }
],
traceoff: [
{ name: "none" },
{ name: "inside" },
{ name: "outside" }
],
helicaloff:[
{ name: "inside" },
{ name: "outside" },
],
zanchor: [
{ name: "top" },
{ name: "middle" },

View file

@ -435,6 +435,7 @@
<div title="clean up after roughing&#13;or perform a part cutout">outline</div>
<div title="2.5D tracing along X or Y axis&#13;used for complex part features">contour</div>
<div title="clear areas above&#13;selected surfaces">pocket</div>
<div title="follow a helix&#13;around circular paths">helical</div>
</div>
</div>
</div>