Merge branch 'rel-4.3' into dev-4.3-thinwall
This commit is contained in:
commit
099c0ea0f9
4 changed files with 25 additions and 4 deletions
|
|
@ -1323,7 +1323,8 @@ function init_one() {
|
|||
yr = ((tl && yc) || (!tl && yt) ? ra : 1),
|
||||
zr = ((tl && zc) || (!tl && zt) ? ra : 1);
|
||||
// prevent null scale
|
||||
if (xr * yr * zr === 0) {
|
||||
if (xv * xr < 0.1 || yv * yr < 0.1 || zv * zr < 0.1) {
|
||||
api.alerts.show('invalid scale value');
|
||||
return;
|
||||
}
|
||||
selection.scale(xr,yr,zr);
|
||||
|
|
@ -1350,7 +1351,11 @@ function init_one() {
|
|||
xr = ((tl && xc) || (!tl && xt) ? ra : 1),
|
||||
yr = ((tl && yc) || (!tl && yt) ? ra : 1),
|
||||
zr = ((tl && zc) || (!tl && zt) ? ra : 1);
|
||||
|
||||
// prevent null scale
|
||||
if (xv * xr < 0.1 || yv * yr < 0.1 || zv * zr < 0.1) {
|
||||
api.alerts.show('invalid scale value');
|
||||
return;
|
||||
}
|
||||
selection.scale(xr,yr,zr);
|
||||
ui.scaleX.was = ui.scaleX.value = xv * xr;
|
||||
ui.scaleY.was = ui.scaleY.value = yv * yr;
|
||||
|
|
@ -1362,6 +1367,7 @@ function init_one() {
|
|||
e.target.value = val;
|
||||
}
|
||||
|
||||
// on enter but not on blur
|
||||
space.event.onEnterKey([
|
||||
ui.scaleX, selectionScale,
|
||||
ui.scaleY, selectionScale,
|
||||
|
|
@ -1369,6 +1375,9 @@ function init_one() {
|
|||
ui.sizeX, selectionSize,
|
||||
ui.sizeY, selectionSize,
|
||||
ui.sizeZ, selectionSize,
|
||||
]);
|
||||
// on enter and blur
|
||||
space.event.onEnterKey([
|
||||
ui.toolName, updateTool,
|
||||
ui.toolNum, updateTool,
|
||||
ui.toolFluteDiam, updateTool,
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ export function createTabBox(iw, ic, n) {
|
|||
const { camZBottom, camStockIndexed } = process;
|
||||
const sz = stock.z || bounds.max.z;
|
||||
const zto = sz - iw.track.top;
|
||||
const zp = (env.camZBottom || camStockIndexed ? env.camZBottom : sz - track.box.d - zto) + (camTabsMidline ? 0 : camTabsHeight / 2);
|
||||
const zp = (camZBottom || camStockIndexed ? camZBottom : sz - track.box.d - zto) + (camTabsMidline ? 0 : camTabsHeight / 2);
|
||||
ic.x += n.x * camTabsDepth / 2; // offset from part
|
||||
ic.z -= n.y * camTabsDepth / 2; // offset swap z,y
|
||||
ic.y = zp; // offset swap in world space y,z
|
||||
|
|
|
|||
|
|
@ -100,6 +100,11 @@ class OpOutline extends CamOp {
|
|||
// extend cut thru (only when z bottom is 0)
|
||||
if (workarea.bottom_z < 0) {
|
||||
let last = slices[slices.length-1];
|
||||
// when step down > full cut depth, clear slices and
|
||||
// leave only the cut-thru pass(es)
|
||||
if (op.down > workarea.top_stock - workarea.bottom_part) {
|
||||
slices.length = 0;
|
||||
}
|
||||
for (let zneg of base_util.lerp(0, -workarea.bottom_cut, op.down)) {
|
||||
if (!last) continue;
|
||||
let add = last.clone(true);
|
||||
|
|
|
|||
|
|
@ -32,11 +32,12 @@ class OpRough extends CamOp {
|
|||
let roughStock = op.all && isIndexed;
|
||||
let toolDiam = new Tool(settings, op.tool).fluteDiameter();
|
||||
let trueShadow = process.camTrueShadow === true;
|
||||
let cutThruBypass = op.down > workarea.top_stock - workarea.bottom_part;
|
||||
|
||||
updateToolDiams(toolDiam);
|
||||
|
||||
// clear the stock above the area to be roughed out
|
||||
if (workarea.top_z > workarea.top_part) {
|
||||
if (workarea.top_z > workarea.top_part && !cutThruBypass) {
|
||||
let shadow = state.shadow.base.clone();
|
||||
let step = toolDiam * op.step;
|
||||
let inset = roughStock ?
|
||||
|
|
@ -258,6 +259,12 @@ class OpRough extends CamOp {
|
|||
|
||||
let last = slices[slices.length-1];
|
||||
|
||||
// when step down > full cut depth, clear slices and
|
||||
// leave only the cut-thru pass(es)
|
||||
if (cutThruBypass) {
|
||||
slices.length = 0;
|
||||
}
|
||||
// add cut thru passes
|
||||
if (workarea.bottom_z < 0)
|
||||
for (let zneg of base_util.lerp(0, -workarea.bottom_cut, op.down)) {
|
||||
if (!last) continue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue