add process origin offsets

This commit is contained in:
Stewart Allen 2023-01-06 22:25:37 -05:00
commit b657f66770
5 changed files with 37 additions and 11 deletions

View file

@ -70,7 +70,7 @@ function prepEach(widget, settings, print, firstPoint, update) {
slices = widget.slices,
hasStock = stock.x && stock.y && stock.z && process.camStockOn,
isIndexed = hasStock && process.camStockIndexed,
startCenter = process.outputOriginCenter,
startCenter = process.camOriginCenter,
alignTop = settings.controller.alignTop,
zclear = (process.camZClearance || 1),
zmax_force = process.camForceZMax || false,
@ -80,12 +80,12 @@ function prepEach(widget, settings, print, firstPoint, update) {
bounds = widget.getBoundingBox(),
boundsz = bounds.max.z + ztOff,
zadd = hasStock && !isIndexed ? stock.z - boundsz : alignTop ? outerz - boundsz : 0,
zmax = outerz + zclear,
zmax = outerz + zclear + process.camOriginOffZ,
wmpos = widget.track.pos,
wmx = wmpos.x,
wmy = wmpos.y,
originx = startCenter ? 0 : hasStock ? -stock.x / 2 : bounds.min.x,
originy = startCenter ? 0 : hasStock ? -stock.y / 2 : bounds.min.y,
originx = (startCenter ? 0 : hasStock ? -stock.x / 2 : bounds.min.x) + process.camOriginOffX,
originy = (startCenter ? 0 : hasStock ? -stock.y / 2 : bounds.min.y) + process.camOriginOffY,
origin = newPoint(originx + wmx, originy + wmy, zmax),
output = print.output,
easeDown = process.camEaseDown,