separate leave stock z from leave stock
This commit is contained in:
parent
25ba73681e
commit
2f81016793
4 changed files with 11 additions and 5 deletions
|
|
@ -1263,6 +1263,7 @@ CAM.init = function(kiri, api) {
|
|||
rate: 'camRoughSpeed',
|
||||
plunge: 'camRoughPlunge',
|
||||
leave: 'camRoughStock',
|
||||
leavez: 'camRoughStockZ',
|
||||
all: 'camRoughAll',
|
||||
voids: 'camRoughVoid',
|
||||
flats: 'camRoughFlat',
|
||||
|
|
@ -1278,6 +1279,7 @@ CAM.init = function(kiri, api) {
|
|||
down: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, units:true}),
|
||||
step: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.01,1.0)}),
|
||||
leave: UC.newInput(LANG.cr_lsto_s, {title:LANG.cr_lsto_l, convert:UC.toFloat, units:true}),
|
||||
leavez: UC.newInput(LANG.cr_lstz_s, {title:LANG.cr_lstz_l, convert:UC.toFloat, bound:UC.bound(0,10),units:true}),
|
||||
sep: UC.newBlank({class:"pop-sep"}),
|
||||
all: UC.newBoolean(LANG.cr_clst_s, undefined, {title:LANG.cr_clst_l, show:hasIndexing}),
|
||||
voids: UC.newBoolean(LANG.cr_clrp_s, undefined, {title:LANG.cr_clrp_l}),
|
||||
|
|
|
|||
|
|
@ -182,7 +182,8 @@ class OpRough extends CamOp {
|
|||
let roughIn = op.inside;
|
||||
let roughTop = op.top;
|
||||
let roughDown = op.down;
|
||||
let roughLeave = op.leave;
|
||||
let roughLeave = op.leave || 0;
|
||||
let roughLeaveZ = op.leavez || 0;
|
||||
let roughStock = op.all && isIndexed;
|
||||
let toolDiam = new CAM.Tool(settings, op.tool).fluteDiameter();
|
||||
let trueShadow = process.camTrueShadow === true;
|
||||
|
|
@ -210,7 +211,7 @@ class OpRough extends CamOp {
|
|||
for (let z = zstart; zsteps > 0; zsteps--) {
|
||||
let slice = shadowTop.slice.clone(false);
|
||||
slice.z = z;
|
||||
slice.camLines = POLY.setZ(facing.clone(true), slice.z);
|
||||
slice.camLines = POLY.setZ(facing.clone(true), slice.z + roughLeaveZ);
|
||||
slice.output()
|
||||
.setLayer("face", {face: color, line: color})
|
||||
.addPolys(slice.camLines);
|
||||
|
|
@ -383,10 +384,10 @@ class OpRough extends CamOp {
|
|||
});
|
||||
|
||||
slice.camLines = offset;
|
||||
if (roughLeave) {
|
||||
if (roughLeaveZ) {
|
||||
// offset roughing in Z as well to minimize
|
||||
// tool marks on curved surfaces
|
||||
const roughLeaveZ = 1 * Math.min(roughDown, roughLeave / 2);
|
||||
// const roughLeaveZ = 1 * Math.min(roughDown, roughLeave / 2);
|
||||
slice.camLines.forEach(p => {
|
||||
p.setZ(p.getZ() + roughLeaveZ);
|
||||
});
|
||||
|
|
@ -409,7 +410,7 @@ class OpRough extends CamOp {
|
|||
let add = last.clone(true);
|
||||
add.z -= zneg;
|
||||
add.camLines = last.camLines.clone(true);
|
||||
add.camLines.forEach(p => p.setZ(add.z));
|
||||
add.camLines.forEach(p => p.setZ(add.z + roughLeaveZ));
|
||||
// add.tops.forEach(top => top.poly.setZ(add.z));
|
||||
// add.shadow = last.shadow.clone(true);
|
||||
slices.push(add);
|
||||
|
|
|
|||
|
|
@ -470,6 +470,7 @@ const conf = exports({
|
|||
camRoughSpeed: 1000,
|
||||
camRoughPlunge: 250,
|
||||
camRoughStock: 0,
|
||||
camRoughStockZ: 0,
|
||||
camRoughAll: true,
|
||||
camRoughVoid: false,
|
||||
camRoughFlat: true,
|
||||
|
|
|
|||
|
|
@ -481,6 +481,8 @@ self.kiri.lang['en-us'] = {
|
|||
cr_menu: "rough",
|
||||
cr_lsto_s: "leave stock",
|
||||
cr_lsto_l: ["horizontal offset from vertical faces","stock to leave for finishing pass","in workspace units"],
|
||||
cr_lstz_s: "leave stock z",
|
||||
cr_lstz_l: ["vertical offset for roughing passes in workspace units. best for roughing curved surfaces."],
|
||||
cr_ease_s: "ease down",
|
||||
cr_ease_l: ["plunge cuts will","spiral down or ease","along a linear path"],
|
||||
cr_clst_s: "clear stock",
|
||||
|
|
|
|||
Loading…
Reference in a new issue