Merge branch 'rel-4.2' of https://github.com/GridSpace/grid-apps into rel-4.2

This commit is contained in:
bakedpotatolord 2025-06-24 12:23:31 -06:00
commit 4695406d8d
85 changed files with 987 additions and 298 deletions

View file

@ -520,6 +520,7 @@ const conf = exports({
camDrillDwell: 250,
camDrillLift: 2,
camDrillMark: false,
camDrillFromStockTop: false,
camDrillThru: 5,
camDrillPrecision: 1,
camDrillingOn: false,

View file

@ -7,11 +7,8 @@
gapp.register("kiri.slice", [], (root, exports) => {
const { base, kiri } = root;
const { key, polygons } = base;
const { util } = base;
const POLY = base.polygons;
const NOKEY = key.NONE;
let tracker;

View file

@ -355,6 +355,27 @@ class Widget {
}
}
getVisualState() {
return {
edges: this.outline ? true : false,
wires: this.wire ? true : false,
opacity: this.getMaterial().opacity
};
}
setVisualState({ edges, wires, opacity}) {
this.cache.vizstate = this.getVisualState();
this.setEdges(edges ?? false);
this.setWireframe(wires ?? false);
this.setOpacity(opacity ?? 1);
}
restoreVisualState() {
if (this.cache.vizstate) {
this.setVisualState(this.cache.vizstate);
}
}
/**
* @param {number} value
*/
@ -451,6 +472,7 @@ class Widget {
let rad = deg * (Math.PI / 180);
if (rad !== this.track.indexRad) {
this.track.indexRad = rad;
this.setModified();
this._updateMeshPosition();
}
}
@ -815,7 +837,8 @@ class Widget {
let drv = driver[settings.mode.toUpperCase()];
if (drv) {
drv.slice(settings, widget, catchupdate, catchdone);
let promise = drv.slice(settings, widget, catchupdate, catchdone);
if (promise) promise.catch(error => ondone(error));
} else {
console.log('invalid mode: '+settings.mode);
ondone('invalid mode: '+settings.mode);