2020-06-03 22:39:30 -04:00
|
|
|
/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
2017-04-18 17:09:33 -04:00
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
(function() {
|
|
|
|
|
|
2020-06-03 22:39:30 -04:00
|
|
|
const KIRI = self.kiri,
|
2017-04-18 17:09:33 -04:00
|
|
|
BASE = self.base,
|
2017-12-15 08:54:39 -05:00
|
|
|
DBUG = BASE.debug,
|
2017-04-18 17:09:33 -04:00
|
|
|
UTIL = BASE.util,
|
|
|
|
|
POLY = BASE.polygons,
|
2020-03-11 20:28:28 -04:00
|
|
|
FDM = KIRI.driver.FDM = {
|
2020-11-05 18:29:04 -05:00
|
|
|
// init, // src/mode/fdm/client.js
|
|
|
|
|
// slice, // src/mode/fdm/slice.js
|
2020-11-08 16:44:32 -05:00
|
|
|
// prepare, // src/mode/fdm/prepare.js
|
2020-11-05 18:29:04 -05:00
|
|
|
// printExport, // src/mode/fdm/export.js
|
|
|
|
|
fixExtruders
|
|
|
|
|
};
|
2020-04-11 16:33:10 -04:00
|
|
|
|
2020-04-12 22:25:00 -04:00
|
|
|
function fixExtruders(settings) {
|
|
|
|
|
Object.entries(settings.widget).forEach(arr => {
|
|
|
|
|
let [wid,val] = arr;
|
|
|
|
|
let dext = settings.device.extruders[val.extruder];
|
|
|
|
|
if (!dext) {
|
|
|
|
|
settings.widget[wid].extruder = 0;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return settings;
|
|
|
|
|
}
|
|
|
|
|
|
2020-11-05 18:29:04 -05:00
|
|
|
// customer gcode post function for XYZ daVinci Mini W
|
|
|
|
|
self.kiri_fdm_xyz_mini_w = function(gcode, options) {
|
|
|
|
|
return btoa("; filename = kirimoto.gcode\n; machine = dv1MW0A000\n" + gcode);
|
2017-04-18 17:09:33 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
})();
|