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