add brims on interior gaps. fixes #153
This commit is contained in:
parent
ed8f9c4787
commit
2be3daf1a2
2 changed files with 30 additions and 2 deletions
|
|
@ -500,7 +500,7 @@
|
||||||
// console.log({process, output});
|
// console.log({process, output});
|
||||||
// }
|
// }
|
||||||
|
|
||||||
let thresh = firstLayerHeight * 1.05;
|
let thresh = firstLayerHeight * 0.25;
|
||||||
let seqn = 0;
|
let seqn = 0;
|
||||||
|
|
||||||
// iterate over layers, find extrusion on belt and
|
// iterate over layers, find extrusion on belt and
|
||||||
|
|
@ -515,6 +515,7 @@
|
||||||
let minz = Infinity, maxy = -Infinity, minx = Infinity, maxx = -Infinity;
|
let minz = Infinity, maxy = -Infinity, minx = Infinity, maxx = -Infinity;
|
||||||
let mins = Infinity;
|
let mins = Infinity;
|
||||||
let miny = Infinity;
|
let miny = Infinity;
|
||||||
|
let pads = [];
|
||||||
|
|
||||||
for (let rec of layer) {
|
for (let rec of layer) {
|
||||||
let point = rec.point;
|
let point = rec.point;
|
||||||
|
|
@ -531,6 +532,10 @@
|
||||||
first = rec;
|
first = rec;
|
||||||
// find length of shortest bed-facing segment
|
// find length of shortest bed-facing segment
|
||||||
mins = Math.min(mins, lastout.point.distTo2D(rec.point));
|
mins = Math.min(mins, lastout.point.distTo2D(rec.point));
|
||||||
|
// add to pads list if > 1mm long
|
||||||
|
if (point.x - lastout.point.x > 1) {
|
||||||
|
pads.push([lastout.point.x, point.x]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
lastout = rec;
|
lastout = rec;
|
||||||
}
|
}
|
||||||
|
|
@ -551,6 +556,28 @@
|
||||||
layer.last().retract = true;
|
layer.last().retract = true;
|
||||||
print.addOutput(tmpout, newPoint(maxx + b, y, z), 0, firstLayerSeek, tool);
|
print.addOutput(tmpout, newPoint(maxx + b, y, z), 0, firstLayerSeek, tool);
|
||||||
print.addOutput(tmpout, newPoint(maxx + g, y, z), emit, firstLayerRate, tool).retract = true;
|
print.addOutput(tmpout, newPoint(maxx + g, y, z), emit, firstLayerRate, tool).retract = true;
|
||||||
|
|
||||||
|
if (pads.length > 1) {
|
||||||
|
let gaps = [];
|
||||||
|
let lpad = pads[0];
|
||||||
|
for (let pad of pads.slice(1)) {
|
||||||
|
let x0 = lpad[1];
|
||||||
|
let x1 = pad[0];
|
||||||
|
lpad = pad;
|
||||||
|
if (x1 - x0 > b * 2) {
|
||||||
|
// over 2x brim so emit two segments
|
||||||
|
print.addOutput(tmpout, newPoint(x1 - g, y, z), 0, firstLayerSeek, tool);
|
||||||
|
print.addOutput(tmpout, newPoint(x1 - b, y, z), emit, firstLayerRate, tool).retract = true;
|
||||||
|
print.addOutput(tmpout, newPoint(x0 + b, y, z), 0, firstLayerSeek, tool);
|
||||||
|
print.addOutput(tmpout, newPoint(x0 + g, y, z), emit, firstLayerRate, tool).retract = true;
|
||||||
|
} else if (x1 - x0 > b / 3) {
|
||||||
|
// over 1/3rd brim length emit single segment
|
||||||
|
print.addOutput(tmpout, newPoint(x1 - g, y, z), 0, firstLayerSeek, tool);
|
||||||
|
print.addOutput(tmpout, newPoint(x0 + g, y, z), emit, firstLayerRate, tool).retract = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print.addOutput(tmpout, newPoint(minx - b, y, z), 0, firstLayerSeek, tool);
|
print.addOutput(tmpout, newPoint(minx - b, y, z), 0, firstLayerSeek, tool);
|
||||||
print.addOutput(tmpout, newPoint(minx - g, y, z), emit, firstLayerRate, tool).retract = false;
|
print.addOutput(tmpout, newPoint(minx - g, y, z), emit, firstLayerRate, tool).retract = false;
|
||||||
if (firstLayerBrimComb) {
|
if (firstLayerBrimComb) {
|
||||||
|
|
|
||||||
|
|
@ -530,11 +530,12 @@ th, tr, td, label {
|
||||||
}
|
}
|
||||||
|
|
||||||
.dev-buttons {
|
.dev-buttons {
|
||||||
margin: 5px 15px 0 15px;
|
margin: 1px -1px 0 -1px;
|
||||||
}
|
}
|
||||||
.dev-buttons button {
|
.dev-buttons button {
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
margin-right: 2px;
|
margin-right: 2px;
|
||||||
|
padding-bottom: 2px;
|
||||||
}
|
}
|
||||||
#dg .ext-buttons button {
|
#dg .ext-buttons button {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue