zBottom updates specific to A axis indexing
This commit is contained in:
parent
d6a0ac46ef
commit
1369edb8f3
4 changed files with 7 additions and 5 deletions
|
|
@ -1544,10 +1544,12 @@ function createPopOp(type, map) {
|
|||
function createTabBox(iw, ic, n) {
|
||||
const { track } = iw;
|
||||
const { stock, bounds, process } = API.conf.get();
|
||||
const { camTabsWidth, camTabsHeight, camTabsDepth, camTabsMidline, camZBottom } = process;
|
||||
const { camTabsWidth, camTabsHeight, camTabsDepth, camTabsMidline } = process;
|
||||
const { camZBottom, camStockOn, camStockIndexed } = process;
|
||||
const isIndexed = camStockOn && camStockIndexed;
|
||||
const sz = stock.z || bounds.max.z;
|
||||
const zto = sz - iw.track.top;
|
||||
const zp = (camZBottom ? camZBottom : sz - track.box.d - zto) + (camTabsMidline ? 0 : camTabsHeight / 2);
|
||||
const zp = (camZBottom || isIndexed ? 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
|
||||
|
|
|
|||
|
|
@ -480,7 +480,7 @@ class OpOutline extends CamOp {
|
|||
let shadow = [];
|
||||
let slices = [];
|
||||
let intopt = {
|
||||
down: true, min: Math.max(0, zBottom), fit: true, off: 0.01,
|
||||
down: true, min: zBottom, fit: true, off: 0.01,
|
||||
max: op.top ? zMax + ztOff : undefined
|
||||
};
|
||||
let indices = slicer.interval(op.down, intopt);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ CAM.slice = function(settings, widget, onupdate, ondone) {
|
|||
zbOff = isIndexed ? 0 : (hasStock ? wztop - track.box.d : 0),
|
||||
// defined z bottom offset by distance to stock bottom
|
||||
// keeps the z bottom relative to the part when z align changes
|
||||
zBottom = isIndexed ? proc.camZBottom || bounds.min.z : proc.camZBottom - zbOff,
|
||||
zBottom = isIndexed ? proc.camZBottom : proc.camZBottom - zbOff,
|
||||
// greater of widget bottom and z bottom
|
||||
zMin = isIndexed ? bounds.min.z : Math.max(bounds.min.z, zBottom),
|
||||
zMax = bounds.max.z,
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ class Slicer {
|
|||
bounds = this.bounds,
|
||||
boff = opt.boff || opt.off || 0, // bottom offset
|
||||
toff = opt.toff || opt.off || 0, // top offset
|
||||
zmin = (opt.min || this.bounds.min.z) + boff,
|
||||
zmin = opt.min !== undefined ? opt.min : this.bounds.min.z + boff,
|
||||
zmax = (opt.max || this.bounds.max.z) - toff,
|
||||
steps = (zmax - zmin) / step,
|
||||
rem = steps % 1 != 0 ? 0 : 1,
|
||||
|
|
|
|||
Loading…
Reference in a new issue