set drill warning to emit on register

This commit is contained in:
bakedpotatolord 2025-06-26 09:11:35 -06:00
commit 8b74f61a98

View file

@ -1955,12 +1955,19 @@ function createPopOp(type, map) {
const settings = conf.get();
const {tool} = new CAM.Tool(settings,op.rec.tool); //get tool by id
const opType = op.rec.type
const drillOrRegister = opType == "drill" || opType == "register"
if ( !drillOrRegister && tool.type == "drill"){
alerts.show(`Warning: Drills should not be used for ${opType} operations.`)
const register = opType === "register";
const drillOp = opType === "drill";
const drillRegister = register && op.rec.axis !== '-'
console.log({drillRegister},op.rec)
const drillPath = drillOp || drillRegister;
if( !drillPath && tool.type == "drill"){
alerts.show(`Warning: Drills should not be used for non-drill operations.`)
}
else if ( drillOrRegister && tool.type != "drill"){
else if ( drillPath && tool.type != "drill"){
alerts.show(`Warning: Only drills should be used for drilling operations.`)
}