add drill marking
This commit is contained in:
parent
d29ba1dc9e
commit
f1ea39f786
4 changed files with 19 additions and 5 deletions
|
|
@ -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', {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue