Revert "Fix brim"

This reverts commit eee2682f70.
This commit is contained in:
casperlamboo 2018-01-17 23:53:49 +01:00
parent 082329b810
commit 0f7da85453
4 changed files with 8 additions and 15 deletions

View File

@ -27,9 +27,10 @@ export default function addBrim(slices, settings) {
}))
), new Shape([], true)).simplify('pftNonZero');
firstLayer.brim = [];
firstLayer.brim = new Shape([], true);
for (let offset = 0; offset < brimSize; offset += nozzleDiameter) {
const brimPart = brim.offset(offset, offsetOptions);
firstLayer.brim.unshift(brimPart);
firstLayer.brim = firstLayer.brim.join(brimPart);
}
}

View File

@ -7,13 +7,9 @@ export default function optimizePaths(slices, settings) {
for (let layer = 0; layer < slices.length; layer ++) {
const slice = slices[layer];
if (typeof slice.brim !== 'undefined') {
for (let i = 0; i < slice.brim.length; i ++) {
if (slice.brim[i].paths.length > 0) {
slice.brim[i] = optimizeShape(slice.brim[i], start);
start.copy(slice.brim[i].lastPoint(true));
}
}
if (typeof slice.brim !== 'undefined' && slice.brim.paths.length > 0) {
slice.brim = optimizeShape(slice.brim, start);
start.copy(slice.brim.lastPoint(true));
}
const parts = [];

View File

@ -25,9 +25,7 @@ export default function removePrecision(slices) {
slice.support.scaleDown(inversePrecision);
}
if (typeof slice.brim !== 'undefined') {
for (let i = 0; i < slice.brim.length; i ++) {
slice.brim[i].scaleDown(inversePrecision);
}
slice.brim.scaleDown(inversePrecision);
}
}
}

View File

@ -48,9 +48,7 @@ export default function slicesToGCode(slices, settings) {
}, {});
if (typeof slice.brim !== 'undefined') {
for (let i = 0; i < slice.brim.length; i ++) {
pathToGCode(null, false, gcode, slice.brim[i], false, false, z, profiles.brim);
}
pathToGCode(null, false, gcode, slice.brim, true, true, z, profiles.brim);
}
for (let i = 0; i < slice.parts.length; i ++) {