annotate widget with filename, when available
This commit is contained in:
parent
94ba119543
commit
21b0e2b9d5
4 changed files with 20 additions and 6 deletions
2
notes.md
2
notes.md
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
* `B` fix adaptive slicing with multi-extruder
|
* `B` fix adaptive slicing with multi-extruder
|
||||||
* `B` fix supports with grouped parts
|
* `B` fix supports with grouped parts
|
||||||
|
* `F` speculative background preview generation
|
||||||
* `F` control for size of purge block (with 0=disabled)
|
* `F` control for size of purge block (with 0=disabled)
|
||||||
* `F` add separate fill speed control
|
* `F` add separate fill speed control
|
||||||
* `F` manual support addition / control
|
* `F` manual support addition / control
|
||||||
|
|
@ -46,6 +47,7 @@
|
||||||
* `B` fails in pancaking (clone) when there are no sliced layers (like z bottom too high)
|
* `B` fails in pancaking (clone) when there are no sliced layers (like z bottom too high)
|
||||||
* `B` contouring should extend beyond part boundaries by tool radius
|
* `B` contouring should extend beyond part boundaries by tool radius
|
||||||
* `B` outside cutting direction in roughing mode inverted
|
* `B` outside cutting direction in roughing mode inverted
|
||||||
|
* `B` widen outside cuts to prevent chatter on deep (metal) features
|
||||||
* `F` z bounded slices (extension of z bottom offset feature)
|
* `F` z bounded slices (extension of z bottom offset feature)
|
||||||
* `F` use arcs to connect hard angles
|
* `F` use arcs to connect hard angles
|
||||||
* `F` lead-in milling
|
* `F` lead-in milling
|
||||||
|
|
|
||||||
|
|
@ -1140,16 +1140,19 @@
|
||||||
} else {
|
} else {
|
||||||
ajax(url, function(vertices) {
|
ajax(url, function(vertices) {
|
||||||
vertices = js2o(vertices).toFloat32();
|
vertices = js2o(vertices).toFloat32();
|
||||||
platform.add(newWidget().loadVertices(vertices));
|
let widget = newWidget().loadVertices(vertices);
|
||||||
if (onload) onload(vertices);
|
platform.add(widget);
|
||||||
|
if (onload) onload(vertices, widget);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function platformLoadSTL(url, onload) {
|
function platformLoadSTL(url, onload) {
|
||||||
new MOTO.STL().load(url, function(vertices) {
|
new MOTO.STL().load(url, function(vertices, filename) {
|
||||||
platform.add(newWidget().loadVertices(vertices));
|
let widget = newWidget().loadVertices(vertices);
|
||||||
if (onload) onload(vertices);
|
widget.filename = filename;
|
||||||
|
platform.add(widget);
|
||||||
|
if (onload) onload(vertices, widget);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -295,6 +295,7 @@
|
||||||
PRO.saveToCatalog = function(filename) {
|
PRO.saveToCatalog = function(filename) {
|
||||||
let widget = this;
|
let widget = this;
|
||||||
let time = UTIL.time();
|
let time = UTIL.time();
|
||||||
|
widget.filename = filename;
|
||||||
KIRI.catalog.putFile(filename, this.getGeoVertices(), function(vertices) {
|
KIRI.catalog.putFile(filename, this.getGeoVertices(), function(vertices) {
|
||||||
if (vertices && vertices.length) {
|
if (vertices && vertices.length) {
|
||||||
console.log("saving decimated mesh ["+vertices.length+"] time ["+(UTIL.time()-time)+"]");
|
console.log("saving decimated mesh ["+vertices.length+"] time ["+(UTIL.time()-time)+"]");
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,15 @@
|
||||||
function onloaded (event) {
|
function onloaded (event) {
|
||||||
if (event.target.status === 200 || event.target.status === 0) {
|
if (event.target.status === 200 || event.target.status === 0) {
|
||||||
stl.parse(event.target.response || event.target.responseText);
|
stl.parse(event.target.response || event.target.responseText);
|
||||||
if (callback) callback(stl.vertices);
|
let cd = xhr.getResponseHeader('Content-Disposition');
|
||||||
|
if (cd) {
|
||||||
|
cd = cd.split(';').map(v => v.trim()).filter(v => {
|
||||||
|
return v.indexOf('filename=') === 0;
|
||||||
|
}).map(v => {
|
||||||
|
return v.substring(10,v.length-1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (callback) callback(stl.vertices, cd ? cd[0] : undefined);
|
||||||
} else {
|
} else {
|
||||||
if (callback) callback(null, event.target.statusText);
|
if (callback) callback(null, event.target.statusText);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue