add leave stock to cam contour
This commit is contained in:
parent
2271259a46
commit
0f3358aaee
6 changed files with 17 additions and 7 deletions
|
|
@ -27,6 +27,7 @@ Full docs @ https://docs.grid.space/projects/kiri-moto
|
||||||
* CAM add omit pocket option to outline op
|
* CAM add omit pocket option to outline op
|
||||||
* CAM add trace support for taper tip diameter
|
* CAM add trace support for taper tip diameter
|
||||||
* CAM add trace offset override
|
* CAM add trace offset override
|
||||||
|
* CAM add leave stock to contour
|
||||||
|
|
||||||
|
|
||||||
# Release 3.7 (2022-11-12)
|
# Release 3.7 (2022-11-12)
|
||||||
|
|
|
||||||
|
|
@ -1276,6 +1276,7 @@ CAM.init = function(kiri, api) {
|
||||||
step: 'camContourOver',
|
step: 'camContourOver',
|
||||||
rate: 'camContourSpeed',
|
rate: 'camContourSpeed',
|
||||||
angle: 'camContourAngle',
|
angle: 'camContourAngle',
|
||||||
|
leave: 'camContourLeave',
|
||||||
tolerance: 'camTolerance',
|
tolerance: 'camTolerance',
|
||||||
flatness: 'camFlatness',
|
flatness: 'camFlatness',
|
||||||
bridging: 'camContourBridge',
|
bridging: 'camContourBridge',
|
||||||
|
|
@ -1292,6 +1293,7 @@ CAM.init = function(kiri, api) {
|
||||||
sep: UC.newBlank({class:"pop-sep"}),
|
sep: UC.newBlank({class:"pop-sep"}),
|
||||||
step: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.01,2.0)}),
|
step: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.01,2.0)}),
|
||||||
angle: UC.newInput(LANG.cf_angl_s, {title:LANG.cf_angl_l, convert:UC.toFloat, bound:UC.bound(45,90)}),
|
angle: UC.newInput(LANG.cf_angl_s, {title:LANG.cf_angl_l, convert:UC.toFloat, bound:UC.bound(45,90)}),
|
||||||
|
leave: UC.newInput(LANG.cf_leav_s, {title:LANG.cf_leav_l, convert:UC.toFloat, bound:UC.bound(0,100)}),
|
||||||
sep: UC.newBlank({class:"pop-sep"}),
|
sep: UC.newBlank({class:"pop-sep"}),
|
||||||
flatness: UC.newInput(LANG.ou_flat_s, {title:LANG.ou_flat_l, convert:UC.toFloat, bound:UC.bound(0,1.0), units:true, round:4}),
|
flatness: UC.newInput(LANG.ou_flat_s, {title:LANG.ou_flat_l, convert:UC.toFloat, bound:UC.bound(0,1.0), units:true, round:4}),
|
||||||
tolerance: UC.newInput(LANG.ou_toll_s, {title:LANG.ou_toll_l, convert:UC.toFloat, bound:UC.bound(0,10.0), units:true, round:4}),
|
tolerance: UC.newInput(LANG.ou_toll_s, {title:LANG.ou_toll_l, convert:UC.toFloat, bound:UC.bound(0,10.0), units:true, round:4}),
|
||||||
|
|
|
||||||
|
|
@ -657,7 +657,7 @@ class OpOutline extends CamOp {
|
||||||
|
|
||||||
// project empty up and render
|
// project empty up and render
|
||||||
for (let slice of slices) {
|
for (let slice of slices) {
|
||||||
if (true) slice.output()
|
if (false) slice.output()
|
||||||
.setLayer("slice", {line: 0xaaaa00}, false)
|
.setLayer("slice", {line: 0xaaaa00}, false)
|
||||||
.addPolys(slice.topPolys())
|
.addPolys(slice.topPolys())
|
||||||
slice.output()
|
slice.output()
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ class Topo {
|
||||||
toolDiameter = tool.fluteDiameter(),
|
toolDiameter = tool.fluteDiameter(),
|
||||||
toolStep = toolDiameter * contour.step,
|
toolStep = toolDiameter * contour.step,
|
||||||
traceJoin = toolDiameter / 2,
|
traceJoin = toolDiameter / 2,
|
||||||
|
leave = contour.leave || 0,
|
||||||
maxangle = contour.angle,
|
maxangle = contour.angle,
|
||||||
curvesOnly = contour.curves,
|
curvesOnly = contour.curves,
|
||||||
bridge = contour.bridging || 0,
|
bridge = contour.bridging || 0,
|
||||||
|
|
@ -180,6 +181,7 @@ class Topo {
|
||||||
clipTab,
|
clipTab,
|
||||||
tabHeight,
|
tabHeight,
|
||||||
newslices,
|
newslices,
|
||||||
|
leave,
|
||||||
color
|
color
|
||||||
}, (i, l, p) => {
|
}, (i, l, p) => {
|
||||||
onupdate(l / 2 + i / 2, l, p);
|
onupdate(l / 2 + i / 2, l, p);
|
||||||
|
|
@ -302,7 +304,7 @@ class Topo {
|
||||||
|
|
||||||
const { minX, maxX, minY, maxY, boundsX, boundsY, stepsX, stepsY } = params;
|
const { minX, maxX, minY, maxY, boundsX, boundsY, stepsX, stepsY } = params;
|
||||||
const { gridDelta, resolution, partOff, toolStep, contourX, contourY } = params;
|
const { gridDelta, resolution, partOff, toolStep, contourX, contourY } = params;
|
||||||
const { clipTo, clipTab, tabHeight, newslices, color } = params;
|
const { clipTo, clipTab, tabHeight, newslices, color, leave } = params;
|
||||||
|
|
||||||
let stepsTaken = 0,
|
let stepsTaken = 0,
|
||||||
stepsTotal = 0;
|
stepsTotal = 0;
|
||||||
|
|
@ -325,6 +327,7 @@ class Topo {
|
||||||
|
|
||||||
trace.init({
|
trace.init({
|
||||||
box,
|
box,
|
||||||
|
leave,
|
||||||
clipTo,
|
clipTo,
|
||||||
clipTab,
|
clipTab,
|
||||||
tabHeight,
|
tabHeight,
|
||||||
|
|
@ -474,7 +477,7 @@ class Trace {
|
||||||
|
|
||||||
constructor(probe, params) {
|
constructor(probe, params) {
|
||||||
|
|
||||||
const { curvesOnly, maxangle, flatness, bridge, contourX } = params;
|
const { curvesOnly, maxangle, flatness, bridge, contourX, leave } = params;
|
||||||
|
|
||||||
this.params = params;
|
this.params = params;
|
||||||
this.probe = probe;
|
this.probe = probe;
|
||||||
|
|
@ -609,7 +612,7 @@ class Trace {
|
||||||
|
|
||||||
crossY_sync(params, then) {
|
crossY_sync(params, then) {
|
||||||
const { push_point, end_poly, newtrace, newslice, inClip } = this.object;
|
const { push_point, end_poly, newtrace, newslice, inClip } = this.object;
|
||||||
const { clipTab, tabHeight, clipTo, box, resolution } = this.cross;
|
const { clipTab, tabHeight, clipTo, box, resolution, leave } = this.cross;
|
||||||
const { toolAtZ } = this.probe;
|
const { toolAtZ } = this.probe;
|
||||||
let { from, to, x, gridx, gridy } = params;
|
let { from, to, x, gridx, gridy } = params;
|
||||||
const checkr = newPoint(0,0);
|
const checkr = newPoint(0,0);
|
||||||
|
|
@ -636,7 +639,7 @@ class Trace {
|
||||||
gridy++;
|
gridy++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
push_point(x, y, tv);
|
push_point(x, y, tv + leave);
|
||||||
gridy++;
|
gridy++;
|
||||||
}
|
}
|
||||||
end_poly();
|
end_poly();
|
||||||
|
|
@ -645,9 +648,10 @@ class Trace {
|
||||||
|
|
||||||
crossX_sync(params, then) {
|
crossX_sync(params, then) {
|
||||||
const { push_point, end_poly, newtrace, newslice, inClip } = this.object;
|
const { push_point, end_poly, newtrace, newslice, inClip } = this.object;
|
||||||
const { clipTab, tabHeight, clipTo, box, resolution } = this.cross;
|
const { clipTab, tabHeight, clipTo, box, resolution, leave } = this.cross;
|
||||||
const { toolAtZ } = this.probe;
|
const { toolAtZ } = this.probe;
|
||||||
let { from, to, y, gridx, gridy } = params;
|
let { from, to, y, gridx, gridy } = params;
|
||||||
|
|
||||||
const checkr = newPoint(0,0);
|
const checkr = newPoint(0,0);
|
||||||
newslice();
|
newslice();
|
||||||
newtrace();
|
newtrace();
|
||||||
|
|
@ -672,7 +676,7 @@ class Trace {
|
||||||
gridx++;
|
gridx++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
push_point(x, y, tv);
|
push_point(x, y, tv + leave);
|
||||||
gridx++;
|
gridx++;
|
||||||
}
|
}
|
||||||
end_poly();
|
end_poly();
|
||||||
|
|
|
||||||
|
|
@ -493,6 +493,7 @@ const conf = exports({
|
||||||
camContourOver: 0.5,
|
camContourOver: 0.5,
|
||||||
camContourSpeed: 1000,
|
camContourSpeed: 1000,
|
||||||
camContourAngle: 85,
|
camContourAngle: 85,
|
||||||
|
camContourLeave: 0,
|
||||||
camContourBottom: false,
|
camContourBottom: false,
|
||||||
camContourCurves: false,
|
camContourCurves: false,
|
||||||
camContourIn: false,
|
camContourIn: false,
|
||||||
|
|
|
||||||
|
|
@ -510,6 +510,8 @@ self.kiri.lang['en-us'] = {
|
||||||
cn_menu: "contour",
|
cn_menu: "contour",
|
||||||
cf_angl_s: "max angle",
|
cf_angl_s: "max angle",
|
||||||
cf_angl_l: ["angles greater than this","are considered vertical"],
|
cf_angl_l: ["angles greater than this","are considered vertical"],
|
||||||
|
cf_leav_s: "leave stock",
|
||||||
|
cf_leav_l: ["amount of stock to leave above part surface"],
|
||||||
cf_botm_s: "z bottom",
|
cf_botm_s: "z bottom",
|
||||||
cf_botm_l: ["obey z bottom limit"],
|
cf_botm_l: ["obey z bottom limit"],
|
||||||
cf_curv_s: "curves only",
|
cf_curv_s: "curves only",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue