fixes to allow cam processing with engine.html

This commit is contained in:
Stewart Allen 2021-09-27 11:28:07 -04:00
commit 7ea9f2a7ef
4 changed files with 30 additions and 4 deletions

View file

@ -82,6 +82,21 @@ class Engine {
return this;
}
setTools(tools) {
this.settings.tools = tools;
return this;
}
setStock(stock) {
this.settings.stock = stock;
return this;
}
setOrigin(x,y,z) {
this.settings.origin = { x, y, z };
return this;
}
moveTo(x, y, z) {
this.widget.move(x, y, z, true);
return this;

View file

@ -761,6 +761,16 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
return this.bounds;
};
PRO.getPositionBox = function() {
let bounds = this.getBoundingBox().clone();
let pos = this.track.pos;
bounds.min.x += pos.x;
bounds.max.x += pos.x;
bounds.min.y += pos.y;
bounds.max.y += pos.y;
return bounds;
};
PRO.isModified = function() {
return this.modified;
};