tweak palette start offset, belt home. bump rev 3.1.D4
This commit is contained in:
parent
987876a61f
commit
98a24c2792
7 changed files with 21 additions and 13 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "grid-apps",
|
||||
"version": "3.1.3D",
|
||||
"version": "3.1.4D",
|
||||
"description": "grid.space 3d slice & modeling tools",
|
||||
"author": "Stewart Allen <sa@grid.space>",
|
||||
"license": "MIT",
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
"extrude_abs": true,
|
||||
"bed_belt": true,
|
||||
"bed_width": 220,
|
||||
"bed_depth": 300,
|
||||
"bed_depth": 350,
|
||||
"build_height": 170
|
||||
},
|
||||
"profiles":[{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
if (!self.kiri) {
|
||||
let kiri = self.kiri = {
|
||||
beta: 3103,
|
||||
beta: 3104,
|
||||
driver: {}, // driver modules
|
||||
loader: [], // module loading: array of functions
|
||||
load: (fn) => kiri.loader.push(fn)
|
||||
|
|
|
|||
|
|
@ -472,17 +472,20 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
|||
let length = {};
|
||||
// clean up and round pings
|
||||
pings.forEach(p => {
|
||||
p.length = p.length.round(2);
|
||||
p.extrusion = p.extrusion.round(2);
|
||||
p.length = p.length.round(3);
|
||||
// p.length = (p.length - pinfo.offset).round(2);
|
||||
// p.length = (p.length + pinfo.offset).round(2);
|
||||
p.extrusion = p.extrusion.round(3);
|
||||
});
|
||||
// add length of push filament to the last segment
|
||||
segments.peek().emitted += pinfo.push;
|
||||
let lastEmit = 0;
|
||||
let ratioVolume = (0.4 * 0.4) / (1.75 * 1.75);
|
||||
for (let seg of segments) {
|
||||
let seginfo = driveInfo[seg.tool] = driveInfo[seg.tool] || { length: 0, volume: 0 };
|
||||
seg.emitted += pinfo.offset;
|
||||
seginfo.length += seg.emitted - lastEmit;
|
||||
seginfo.volume = seginfo.length * Math.PI;
|
||||
seginfo.volume = seginfo.length * ratioVolume;
|
||||
volume[seg.tool+1] = seginfo.volume.round(2);
|
||||
length[seg.tool+1] = seginfo.length.round(2);
|
||||
lastEmit = seg.emitted;
|
||||
|
|
@ -501,7 +504,7 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
|||
time: info.time.round(1),
|
||||
volume,
|
||||
length,
|
||||
totalLength: info.distance.round(1),
|
||||
totalLength,
|
||||
totalVolume,
|
||||
inputsUsed: Object.keys(driveInfo).length,
|
||||
splices: segments.length,
|
||||
|
|
|
|||
|
|
@ -872,8 +872,12 @@
|
|||
|
||||
API.conf.save();
|
||||
|
||||
// API.const.SPACE.view.setHome(dev.bedBelt ? Math.PI/2 : 0, Math.PI / 2.5);
|
||||
API.const.SPACE.view.setHome(0, Math.PI / 2.5);
|
||||
if (isBelt()) {
|
||||
// API.const.SPACE.view.setHome(dev.bedBelt ? Math.PI/2 : 0, Math.PI / 2.5);
|
||||
API.const.SPACE.view.setHome(0, Math.PI / 2.5);
|
||||
} else {
|
||||
API.const.SPACE.view.setHome(0);
|
||||
}
|
||||
// when changing devices, update focus on widgets
|
||||
if (chgdev) {
|
||||
setTimeout(API.space.set_focus, 0);
|
||||
|
|
@ -2793,6 +2797,7 @@
|
|||
|
||||
// add palette3 edit button after filament source selector
|
||||
{
|
||||
let randomId = Math.round(Math.random() * 0xffffffffffff).toString(16);
|
||||
let fsp = UI.filamentSource.parentNode;
|
||||
let btn = UI.filamentSourceEdit = DOC.createElement('button');
|
||||
btn.setAttribute('id', 'fs-edit');
|
||||
|
|
@ -2807,7 +2812,7 @@
|
|||
UI.palette.parentNode.style.display = 'none';
|
||||
// save settings
|
||||
extra.palette = {
|
||||
printer: UI.paletteId.value,
|
||||
printer: UI.paletteId.value || randomId,
|
||||
ping: UI.palettePing.convert(),
|
||||
feed: UI.paletteFeed.convert(),
|
||||
push: UI.palettePush.convert(),
|
||||
|
|
@ -2823,7 +2828,7 @@
|
|||
let pinfo = extra.palette;
|
||||
if (!pinfo) {
|
||||
pinfo = extra.palette = {
|
||||
printer: Math.round(Math.random() * 0xffffffffffff).toString(16),
|
||||
printer: randomId,
|
||||
feed: 570,
|
||||
push: 600,
|
||||
heat: 0,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
let terms = {
|
||||
COPYRIGHT: "Copyright (C) Stewart Allen <sa@grid.space> - All Rights Reserved",
|
||||
LICENSE: "See the license.md file included with the source distribution",
|
||||
VERSION: "3.1.D3"
|
||||
VERSION: "3.1.D4"
|
||||
};
|
||||
|
||||
if (typeof(module) === 'object') {
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@
|
|||
// palette & ping data
|
||||
isPalette = device.filamentSource === 'palette3',
|
||||
paletteInfo = extras.palette || {},
|
||||
palettePingStart = paletteInfo.ping || 500,
|
||||
palettePingStart = Math.max(paletteInfo.ping, paletteInfo.feed, paletteInfo.push) || 500,
|
||||
palettePingSpace = paletteInfo.ping || 0,
|
||||
// track purges for palette3 pings
|
||||
purgePos,
|
||||
|
|
|
|||
Loading…
Reference in a new issue