fix export to grid.print. disable support merge in SLA mode
This commit is contained in:
parent
9d092ad3fe
commit
b090d6f2f5
2 changed files with 27 additions and 27 deletions
|
|
@ -484,29 +484,29 @@ let gs_kiri_sla = exports;
|
|||
return track;
|
||||
}
|
||||
|
||||
let close = [];
|
||||
for (let i=0; i<slice.pillars.length; i++) {
|
||||
let p = slice.pillars[i].point;
|
||||
let d = point.distTo2D(p);
|
||||
// terminate if we're inside another pillar
|
||||
if (d < inc) {
|
||||
track.merged = true;
|
||||
return track;
|
||||
}
|
||||
if (d <= process.slaSupportSize * 1.5) {
|
||||
close.push(p);
|
||||
}
|
||||
}
|
||||
if (close.length) {
|
||||
let newp = point.clone();
|
||||
close.forEach(p => {
|
||||
newp.x += p.x;
|
||||
newp.y += p.y;
|
||||
});
|
||||
newp.x /= (close.length + 1);
|
||||
newp.y /= (close.length + 1);
|
||||
nextpoint = point.offsetPointTo(newp, inc);
|
||||
}
|
||||
// let close = [];
|
||||
// for (let i=0; i<slice.pillars.length; i++) {
|
||||
// let p = slice.pillars[i].point;
|
||||
// let d = point.distTo2D(p);
|
||||
// // terminate if we're inside another pillar
|
||||
// if (d < inc) {
|
||||
// track.merged = true;
|
||||
// return track;
|
||||
// }
|
||||
// if (d <= process.slaSupportSize * 1.5) {
|
||||
// close.push(p);
|
||||
// }
|
||||
// }
|
||||
// if (close.length) {
|
||||
// let newp = point.clone();
|
||||
// close.forEach(p => {
|
||||
// newp.x += p.x;
|
||||
// newp.y += p.y;
|
||||
// });
|
||||
// newp.x /= (close.length + 1);
|
||||
// newp.y /= (close.length + 1);
|
||||
// nextpoint = point.offsetPointTo(newp, inc);
|
||||
// }
|
||||
|
||||
slice.supports.push(pillar);
|
||||
slice.pillars.push({point, pillar, size});
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ let gs_kiri_export = exports;
|
|||
ajax.onreadystatechange = function() {
|
||||
if (ajax.readyState === 4) {
|
||||
let status = ajax.status;
|
||||
STATS.add(`ua_${getModeLower()}_print_octo_${status}`);
|
||||
STATS.add(`ua_${API.mode.get_lower()}_print_octo_${status}`);
|
||||
if (status >= 200 && status < 300) {
|
||||
API.modal.hide();
|
||||
} else {
|
||||
|
|
@ -229,11 +229,11 @@ let gs_kiri_export = exports;
|
|||
)
|
||||
.then(t => t.text())
|
||||
.then(t => {
|
||||
STATS.add(`ua_${getModeLower()}_print_local_ok`);
|
||||
STATS.add(`ua_${API.mode.get_lower()}_print_local_ok`);
|
||||
console.log({grid_spool_said: t});
|
||||
})
|
||||
.catch(e => {
|
||||
STATS.add(`ua_${getModeLower()}_print_local_err`);
|
||||
STATS.add(`ua_${API.mode.get_lower()}_print_local_err`);
|
||||
console.log({grid_local_spool_error: e});
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
@ -345,7 +345,7 @@ let gs_kiri_export = exports;
|
|||
xhtr.onreadystatechange = function() {
|
||||
if (xhtr.readyState === 4) {
|
||||
let status = xhtr.status;
|
||||
STATS.add(`ua_${getModeLower()}_print_grid_${status}`);
|
||||
STATS.add(`ua_${API.mode.get_lower()}_print_grid_${status}`);
|
||||
if (status >= 200 && status < 300) {
|
||||
let json = js2o(xhtr.responseText);
|
||||
gridhost_tracker(host,json.key);
|
||||
|
|
|
|||
Loading…
Reference in a new issue