connect sparse infill in some cases. rename .b64 to .km
This commit is contained in:
parent
3738750ba3
commit
f3231e4420
3 changed files with 18 additions and 8 deletions
|
|
@ -503,7 +503,7 @@
|
|||
}
|
||||
|
||||
function deviceExport(exp, name) {
|
||||
name = (name || "kiridev")
|
||||
name = (name || "device")
|
||||
.toLowerCase()
|
||||
.replace(/ /g,'_')
|
||||
.replace(/\./g,'_');
|
||||
|
|
@ -511,7 +511,7 @@
|
|||
if (name) {
|
||||
let blob = new Blob([exp], {type: "octet/stream"}),
|
||||
url = WIN.URL.createObjectURL(blob);
|
||||
$('mod-any').innerHTML = `<a id="sexport" href="${url}" download="${name}.b64">x</a>`;
|
||||
$('mod-any').innerHTML = `<a id="sexport" href="${url}" download="${name}.km">x</a>`;
|
||||
$('sexport').click();
|
||||
}
|
||||
});
|
||||
|
|
@ -529,14 +529,14 @@
|
|||
" </div>",
|
||||
"</div>"
|
||||
]};
|
||||
UC.confirm("Export Filename", {ok:true, cancel: false}, "km_conf", opt).then(name => {
|
||||
UC.confirm("Export Filename", {ok:true, cancel: false}, "profile", opt).then(name => {
|
||||
if (name) {
|
||||
let work = $('incwork').checked,
|
||||
json = API.conf.export({work}),
|
||||
blob = new Blob([json], {type: "octet/stream"}),
|
||||
url = WIN.URL.createObjectURL(blob);
|
||||
$('mod-any').innerHTML = [
|
||||
`<a id="sexport" href="${url}" download="${name}.b64">x</a>`
|
||||
`<a id="sexport" href="${url}" download="${name}.km">x</a>`
|
||||
].join('');
|
||||
$('sexport').click();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1605,7 +1605,7 @@
|
|||
isstl = lower.indexOf(".stl") > 0,
|
||||
issvg = lower.indexOf(".svg") > 0,
|
||||
isgcode = lower.indexOf(".gcode") > 0 || lower.indexOf(".nc") > 0,
|
||||
isset = lower.indexOf(".b64") > 0;
|
||||
isset = lower.indexOf(".b64") > 0 || lower.indexOf(".km") > 0;
|
||||
reader.file = files[i];
|
||||
reader.onloadend = function (e) {
|
||||
if (israw) platform.add(
|
||||
|
|
|
|||
|
|
@ -475,11 +475,21 @@
|
|||
poly.reverse();
|
||||
}
|
||||
poly.forEachPoint(function(p, i) {
|
||||
let dist = lp.distTo2D(p);
|
||||
let rdst = dist > retractDist;
|
||||
let itop = rdst && intersectsTop(lp,p);
|
||||
let emit = extrude;
|
||||
// retract if dist trigger and crosses a slice top polygon
|
||||
if (i === 0 && lp && lp.distTo2D(p) > retractDist && intersectsTop(lp,p)) {
|
||||
retract();
|
||||
if (i === 0) {
|
||||
if (itop) {
|
||||
retract();
|
||||
emit = 0;
|
||||
} else if (rdst) {
|
||||
emit = 0;
|
||||
}
|
||||
}
|
||||
addOutput(preout, p, i === 0 ? 0 : extrude, speed || printSpeed, extruder);
|
||||
// let emit = i === 0 ? 0 : extrude;
|
||||
addOutput(preout, p, emit, speed || printSpeed, extruder);
|
||||
lp = p;
|
||||
});
|
||||
return lp;
|
||||
|
|
|
|||
Loading…
Reference in a new issue