release, device utility updates

This commit is contained in:
Stewart Allen 2022-02-24 13:07:53 -05:00
commit adc38d3697
4 changed files with 38 additions and 33 deletions

View file

@ -1,4 +1,4 @@
# Grid:Apps TODOs and Notes # Grid:Apps Future Notes
## `C` cosmetic, `F` functional, `P` performance, `B` bug fix ## `C` cosmetic, `F` functional, `P` performance, `B` bug fix
@ -21,6 +21,8 @@
* `F` warn if part hanging in negative Z space or off bed in general * `F` warn if part hanging in negative Z space or off bed in general
* `F` date column and sorting in recent files list * `F` date column and sorting in recent files list
* `C` reflow device dialog to add bottom tabbing, vertical macro list
# FDM # FDM
* `B` fix support projection/end with grouped parts * `B` fix support projection/end with grouped parts
@ -129,11 +131,5 @@
* fix mirror to work with groups (just models currently) * fix mirror to work with groups (just models currently)
* bounding box toggle should be global, not selection * bounding box toggle should be global, not selection
* add analyze results dialog * add analyze results dialog
* rename analyze > patch * rename analyze > patch
* remove repair function? * remove auto-repair function
## Links
* libtess https://www.npmjs.com/package/libtess ... earcut sometimes wrong
* https://stackoverflow.com/questions/52818307/determine-whether-one-polygon-contains-another

View file

@ -10,20 +10,20 @@
* `C` refactor main into supporting classes (part of a larger ui re-org) * `C` refactor main into supporting classes (part of a larger ui re-org)
* `C` group "main" entry points under "kiri-run" * `C` group "main" entry points under "kiri-run"
* `C` extract and group utilities from print and other modules * `C` extract and group utilities from print and other modules
* `P` refactor slicers to use single improved slice core (cnc tbd)
* `C` add thin wall pull-down & allow for newer strategies * `C` add thin wall pull-down & allow for newer strategies
* `C` extract preview render engine from FDM * `C` extract preview render engine from FDM
* `C` allow loading of workspaces from url on page load * `C` allow loading of workspaces from url on page load
* `C` properly import profiles attached to devices * `C` properly import profiles attached to devices
* `C` improved routing on "fast" layers & layers with multiple islands * `C` improved routing on "fast" layers & layers with multiple islands
* `P` refactor slicers to use single improved slice core (cnc tbd)
* `P` template vars: nozzles used and layers until next use (IDEX) * `P` template vars: nozzles used and layers until next use (IDEX)
* `-` start/stop minions depending on whether threading enabled * `-` start/stop minions depending on whether threading enabled
* `-` workflow to edit in and bounce back / reload * `-` workflow to edit in M:T and bounce back / replace vertices
* `-` abstract file loading (onshape import, mesh replace, etc) * `-` abstract file loading (onshape import, mesh replace, etc)
* `-` tighten export dialogs (reduce size for smaller screens) * `-` tighten export dialogs (reduce size for smaller screens)
## Mesh:Tool ## Mesh:Tool
* `-` face selection and pref * `-` face selection and matchinbg preferences
* `-` prefs like normal length * `-` add prefs for normal length, maybe color picker
* `-` svg and image import conversion (share code with Kiri:Moto) * `-` svg and image import conversion (share code with Kiri:Moto)

View file

@ -97,6 +97,7 @@ function device_v1_to_v2(device) {
function device_from_code(code,mode) { function device_from_code(code,mode) {
// presence of internal field indicates already converted // presence of internal field indicates already converted
if (code.internal >= 0) return code; if (code.internal >= 0) return code;
// if (self.navigator) console.log({mode, convert: code}); // if (self.navigator) console.log({mode, convert: code});
let cmd = code.cmd || {}, let cmd = code.cmd || {},
set = code.settings || {}, set = code.settings || {},

View file

@ -1,24 +1,32 @@
let fs = require('fs'); // device legacy format converter
var clone = Object.clone = function(o) {
return JSON.parse(JSON.stringify(o));
};
var self = { kiri: { api: { clone } } };
const arg = process.argv.slice(2);
const mode = arg.shift();
const umode = mode.toUpperCase();
const lmode = mode.toLowerCase();
const fs = require('fs');
const self = {};
eval( fs.readFileSync("src/main/gapp.js").toString() );
const gapp = self.gapp;
eval( fs.readFileSync("src/add/array.js").toString() );
eval( fs.readFileSync("src/data/local.js").toString() );
eval( fs.readFileSync("src/kiri/conf.js").toString() ); eval( fs.readFileSync("src/kiri/conf.js").toString() );
let arg = process.argv.slice(2); gapp.main(undefined, undefined, root => {
let mode = arg.shift(); let kiri = root.kiri;
let umode = mode.toUpperCase(); let conf = kiri.conf;
let lmode = mode.toLowerCase();
let kiri = self.kiri; for (let file of arg) {
let conf = kiri.conf; let code = JSON.parse(fs.readFileSync(file).toString());
for (let file of arg) { let devi = conf.device_from_code(code, umode);
let code = JSON.parse(fs.readFileSync(file).toString()); conf.fill_cull_once(devi, conf.defaults[lmode].d);
let devi = conf.device_from_code(code, umode); delete devi.new;
conf.fill_cull_once(devi, conf.defaults[lmode].d); delete devi.internal;
delete devi.new; delete devi.deviceName;
delete devi.internal; // console.log(JSON.stringify(code, undefined, 4));
delete devi.deviceName; console.log(JSON.stringify([code, "-----", devi], undefined, 2));
// console.log({code, devi}); }
console.log(JSON.stringify(code,undefined,4)); });
}