fix origin for offset widgets
This commit is contained in:
parent
da3b63e2d3
commit
fb3b007270
2 changed files with 6 additions and 8 deletions
|
|
@ -1143,13 +1143,15 @@ var gs_kiri_cam = exports;
|
||||||
startCenter = process.outputOriginCenter,
|
startCenter = process.outputOriginCenter,
|
||||||
alignTop = settings.controller.alignTop,
|
alignTop = settings.controller.alignTop,
|
||||||
zclear = (process.camZClearance || 1) * units,
|
zclear = (process.camZClearance || 1) * units,
|
||||||
// zadd_outer = hasStock ? stock.z - outerz : alignTop ? outerz : 0,
|
|
||||||
zmax_outer = hasStock ? stock.z + zclear : outerz + zclear,
|
zmax_outer = hasStock ? stock.z + zclear : outerz + zclear,
|
||||||
zadd = hasStock ? stock.z - boundsz : alignTop ? outerz - boundsz : 0,
|
zadd = hasStock ? stock.z - boundsz : alignTop ? outerz - boundsz : 0,
|
||||||
zmax = outerz + zclear,//hasStock ? stock.z + zclear : boundsz + zclear,
|
zmax = outerz + zclear,
|
||||||
|
wmpos = widget.mesh.position,
|
||||||
|
wmx = wmpos.x,
|
||||||
|
wmy = wmpos.y,
|
||||||
originx = startCenter ? 0 : hasStock ? -stock.x / 2 : bounds.min.x,
|
originx = startCenter ? 0 : hasStock ? -stock.x / 2 : bounds.min.x,
|
||||||
originy = startCenter ? 0 : hasStock ? -stock.y / 2 : bounds.min.y,
|
originy = startCenter ? 0 : hasStock ? -stock.y / 2 : bounds.min.y,
|
||||||
origin = newPoint(originx, originy, zmax),
|
origin = newPoint(originx + wmx, originy + wmy, zmax),
|
||||||
output = print.output,
|
output = print.output,
|
||||||
modes = CPRO,
|
modes = CPRO,
|
||||||
depthFirst = process.camDepthFirst,
|
depthFirst = process.camDepthFirst,
|
||||||
|
|
@ -1284,9 +1286,6 @@ var gs_kiri_cam = exports;
|
||||||
}
|
}
|
||||||
|
|
||||||
function camOut(point, cut) {
|
function camOut(point, cut) {
|
||||||
let wmx = widget.mesh.position.x;
|
|
||||||
let wmy = widget.mesh.position.y;
|
|
||||||
|
|
||||||
point = point.clone();
|
point = point.clone();
|
||||||
point.x += wmx;
|
point.x += wmx;
|
||||||
point.y += wmy;
|
point.y += wmy;
|
||||||
|
|
@ -1595,7 +1594,6 @@ var gs_kiri_cam = exports;
|
||||||
// deferred linear y finishing
|
// deferred linear y finishing
|
||||||
if (depthData.lineary.length > 0) {
|
if (depthData.lineary.length > 0) {
|
||||||
// force start at lower left corner
|
// force start at lower left corner
|
||||||
// printPoint = newPoint(bounds.min.x,bounds.min.y,zmax);
|
|
||||||
printPoint = tip2tipEmit(depthData.lineary, printPoint, function(el, point, count) {
|
printPoint = tip2tipEmit(depthData.lineary, printPoint, function(el, point, count) {
|
||||||
let poly = el.poly;
|
let poly = el.poly;
|
||||||
if (poly.last() === point) poly.reverse();
|
if (poly.last() === point) poly.reverse();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
var exports = {
|
var exports = {
|
||||||
COPYRIGHT:"Copyright (C) Stewart Allen <sa@grid.space> - All Rights Reserved",
|
COPYRIGHT:"Copyright (C) Stewart Allen <sa@grid.space> - All Rights Reserved",
|
||||||
LICENSE:"See the license.md file included with the source distribution",
|
LICENSE:"See the license.md file included with the source distribution",
|
||||||
VERSION:"2.0.1"
|
VERSION:"2.0.2"
|
||||||
};
|
};
|
||||||
if (!module) var module = {};
|
if (!module) var module = {};
|
||||||
module.exports = exports;
|
module.exports = exports;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue