add drill marking

This commit is contained in:
Stewart Allen 2022-01-31 10:37:01 -05:00
commit f1ea39f786
4 changed files with 19 additions and 5 deletions

View file

@ -976,7 +976,8 @@
down: 'camDrillDown',
rate: 'camDrillDownSpeed',
dwell: 'camDrillDwell',
lift: 'camDrillLift'
lift: 'camDrillLift',
mark: 'camDrillMark'
}).inputs = {
tool: UC.newSelect(LANG.cc_tool, {}, "tools"),
sep: UC.newBlank({class:"pop-sep"}),
@ -984,7 +985,8 @@
down: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, units:true}),
rate: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toInt, units:true}),
dwell: UC.newInput(LANG.cd_dwll_s, {title:LANG.cd_dwll_l, convert:UC.toFloat}),
lift: UC.newInput(LANG.cd_lift_s, {title:LANG.cd_lift_l, convert:UC.toFloat, units:true})
lift: UC.newInput(LANG.cd_lift_s, {title:LANG.cd_lift_l, convert:UC.toFloat, units:true, show:() => !poppedRec.mark}),
mark: UC.newBoolean(LANG.cd_mark_s, undefined, {title:LANG.cd_mark_l}),
};
createPopOp('register', {

View file

@ -924,7 +924,7 @@
drillToolDiam = drillTool.fluteDiameter(),
centerDiff = drillToolDiam * 0.1,
area = (drillToolDiam/2) * (drillToolDiam/2) * Math.PI,
areaDelta = area * 0.05,
areaDelta = op.mark ? Infinity : area * 0.05,
sliceOut = this.sliceOut = [];
updateToolDiams(drillToolDiam);
@ -961,6 +961,15 @@
drills.forEach(function(drill) {
let center = drill.center(true),
slice = newSlice(0,null);
if (op.mark) {
// replace points with single mark
let points = drill.points;
points = [
points[0],
points[0].clone().sub({x:0, y:0, z:op.down})
];
drill.points = points;
}
drill.points.forEach(function(point) {
point.x = center.x;
point.y = center.y;

View file

@ -506,6 +506,7 @@
camDrillDown: 5,
camDrillDwell: 250,
camDrillLift: 2,
camDrillMark: false,
camDrillingOn: false,
camRegisterSpeed: 1000,
camFlipAxis: "X",

View file

@ -496,14 +496,16 @@ kiri.lang['en-us'] = {
cd_menu: "drill",
cd_axis: "axis",
cd_points: "points",
cd_plpr_s: "plunge per",
cd_plpr_l: ["max plunge between","dwell periods","in workspace units","0 to disable"],
// cd_plpr_s: "plunge per",
// cd_plpr_l: ["max plunge between","dwell periods","in workspace units","0 to disable"],
cd_dwll_s: "dwell time",
cd_dwll_l: ["dwell time","between plunges in","in milliseconds"],
cd_lift_s: "drill lift",
cd_lift_l: ["lift between plunges","after dwell period","in workspace units","0 to disable"],
cd_regi_s: "register",
cd_regi_l: ["drill registration holes","for double-sided parts","independent of enable","drilling but uses same","tool and settings"],
cd_mark_s: "marking",
cd_mark_l: ["only mark holes, do not drill out","the step down setting is used","to determine how deep to mark"],
// CNC CUTOUT TABS
ct_menu: "tabs",