comment out zThru and rework zBottom
This commit is contained in:
parent
dca7c03bd7
commit
161cd06daa
6 changed files with 12 additions and 19 deletions
|
|
@ -610,7 +610,7 @@ export const conf = {
|
|||
camZBottom: 0,
|
||||
camZClearance: 1,
|
||||
camZOffset: 0,
|
||||
camZThru: 0,
|
||||
// camZThru: 0,
|
||||
camZTop: 0,
|
||||
op2: [], // flip ops
|
||||
ops: [], // current ops
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ export function menu() {
|
|||
camZOffset: newInput(LANG.ou_ztof_s, {title:LANG.ou_ztof_l, convert:toFloat, units}),
|
||||
camZTop: newInput(LANG.ou_ztop_s, {title:LANG.ou_ztop_l, convert:toFloat, units, trigger}),
|
||||
camZBottom: newInput(LANG.ou_zbot_s, {title:LANG.ou_zbot_l, convert:toFloat, units, trigger}),
|
||||
camZThru: newInput(LANG.ou_ztru_s, {title:LANG.ou_ztru_l, convert:toFloat, bound:bound(0.0,100), units }),
|
||||
// camZThru: newInput(LANG.ou_ztru_s, {title:LANG.ou_ztru_l, convert:toFloat, bound:bound(0.0,100), units }),
|
||||
camZClearance: newInput(LANG.ou_zclr_s, {title:LANG.ou_zclr_l, convert:toFloat, bound:bound(0.01,100), units }),
|
||||
separator: newBlank({ class:"set-sep", driven }),
|
||||
camFastFeed: newInput(LANG.cc_rapd_s, {title:LANG.cc_rapd_l, convert:toFloat, units}),
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class OpArea extends CamOp {
|
|||
let toolDiam = areaTool.fluteDiameter();
|
||||
let toolOver = areaTool.getStepSize(over);
|
||||
let zTop = workarea.top_z;
|
||||
let zBottom = Math.max(workarea.bottom_z, workarea.bottom_part);
|
||||
let zBottom = workarea.bottom_z;
|
||||
let shadowBase = state.shadow.base;
|
||||
let thruHoles = state.shadow.holes;
|
||||
let roundSharps = settings.process.camRoundCorners;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class OpRegister extends CamOp {
|
|||
|
||||
async slice(progress) {
|
||||
let { op, state } = this;
|
||||
let { addSlices, bounds, color, settings, widget, zThru } = state;
|
||||
let { addSlices, bounds, color, settings, widget } = state;
|
||||
let { updateToolDiams } = state;
|
||||
|
||||
let tool = new Tool(settings, op.tool);
|
||||
|
|
@ -33,7 +33,7 @@ class OpRegister extends CamOp {
|
|||
toolOffset = tool.fluteDiameter() * 2,
|
||||
centerX = (boundMinX + boundMaxX) / 2,
|
||||
centerY = (boundMinY + boundMaxY) / 2,
|
||||
cutDepth = op.thru || zThru || 0,
|
||||
cutDepth = op.thru || 0,
|
||||
pathPoints = [],
|
||||
stockToSurfaceOffset = stock.z - bounds.max.z,
|
||||
startZ = bounds.max.z + stockToSurfaceOffset + toolZ,
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@ export async function cam_slice(settings, widget, onupdate, ondone) {
|
|||
let axisRotation, axisIndex,
|
||||
bounds, dark, color, stock, tabs, track, tool, unsafe, units, workarea,
|
||||
camZTop, camZBottom, camZThru, minToolDiam, maxToolDiam,
|
||||
bottom_gap, bottom_part, bottom_stock, bottom_thru, bottom_z,
|
||||
bottom_gap, bottom_part, bottom_stock, bottom_z,
|
||||
top_stock, top_part, top_gap, top_z,
|
||||
zBottom, zMin, zMax, zThru, zTop,
|
||||
zBottom, zMin, zMax, zTop,
|
||||
ztOff, zbOff, wztop;
|
||||
|
||||
axisRotation = axisIndex = undefined;
|
||||
|
|
@ -108,15 +108,13 @@ export async function cam_slice(settings, widget, onupdate, ondone) {
|
|||
zBottom = isIndexed ? camZBottom : camZBottom - zbOff;
|
||||
zMin = isIndexed ? bounds.min.z : Math.max(bounds.min.z, zBottom);
|
||||
zMax = bounds.max.z;
|
||||
zThru = camZThru;
|
||||
zTop = zMax + ztOff;
|
||||
bottom_gap = zbOff;
|
||||
bottom_part = 0;
|
||||
bottom_stock = -bottom_gap;
|
||||
bottom_thru = zThru;
|
||||
bottom_z = isIndexed ? zBottom : Math.max(
|
||||
(camZBottom ? bottom_stock + camZBottom : bottom_part) - bottom_thru,
|
||||
(camZBottom ? bottom_stock + camZBottom : bottom_stock - bottom_thru)
|
||||
(camZBottom ? bottom_stock + camZBottom : bottom_part),
|
||||
(camZBottom ? bottom_stock + camZBottom : bottom_stock)
|
||||
);
|
||||
top_stock = zTop;
|
||||
top_part = zMax;
|
||||
|
|
@ -124,7 +122,7 @@ export async function cam_slice(settings, widget, onupdate, ondone) {
|
|||
top_z = camZTop ? bottom_stock + camZTop : top_stock;
|
||||
workarea = util.round({
|
||||
top_stock, top_part, top_gap, top_z,
|
||||
bottom_stock, bottom_part, bottom_gap, bottom_z
|
||||
bottom_stock, bottom_part, bottom_gap, bottom_z,
|
||||
}, 3);
|
||||
|
||||
// console.log({ bounds, stock, track, workarea });
|
||||
|
|
@ -205,7 +203,6 @@ export async function cam_slice(settings, widget, onupdate, ondone) {
|
|||
widget,
|
||||
zBottom,
|
||||
zMax,
|
||||
zThru,
|
||||
ztOff,
|
||||
zTop
|
||||
};
|
||||
|
|
@ -354,9 +351,6 @@ export async function cam_slice(settings, widget, onupdate, ondone) {
|
|||
if (ov_botz) {
|
||||
workover.bottom_z = isIndexed ? ov_botz : bottom_stock + ov_botz;
|
||||
}
|
||||
if (-zThru > workover.bottom_z) {
|
||||
alert("Z Thru should be below Z Bottom");
|
||||
}
|
||||
if (valz.tool) {
|
||||
tool = new Tool(settings, valz.tool);
|
||||
}
|
||||
|
|
@ -368,7 +362,6 @@ export async function cam_slice(settings, widget, onupdate, ondone) {
|
|||
stock,
|
||||
tool,
|
||||
zBottom,
|
||||
zThru,
|
||||
ztOff,
|
||||
zMax,
|
||||
zTop,
|
||||
|
|
|
|||
Loading…
Reference in a new issue