mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-12-23 03:23:48 +01:00
Fix brim
brim now always prints the most outer layer first
This commit is contained in:
parent
1ebbe7fc6a
commit
eee2682f70
@ -27,10 +27,9 @@ export default function addBrim(slices, settings) {
|
||||
}))
|
||||
), new Shape([], true)).simplify('pftNonZero');
|
||||
|
||||
firstLayer.brim = new Shape([], true);
|
||||
|
||||
firstLayer.brim = [];
|
||||
for (let offset = 0; offset < brimSize; offset += nozzleDiameter) {
|
||||
const brimPart = brim.offset(offset, offsetOptions);
|
||||
firstLayer.brim = firstLayer.brim.join(brimPart);
|
||||
firstLayer.brim.unshift(brimPart);
|
||||
}
|
||||
}
|
||||
|
@ -7,9 +7,13 @@ export default function optimizePaths(slices, settings) {
|
||||
for (let layer = 0; layer < slices.length; layer ++) {
|
||||
const slice = slices[layer];
|
||||
|
||||
if (typeof slice.brim !== 'undefined' && slice.brim.paths.length > 0) {
|
||||
slice.brim = optimizeShape(slice.brim, start);
|
||||
start.copy(slice.brim.lastPoint(true));
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const parts = [];
|
||||
|
@ -25,7 +25,9 @@ export default function removePrecision(slices) {
|
||||
slice.support.scaleDown(inversePrecision);
|
||||
}
|
||||
if (typeof slice.brim !== 'undefined') {
|
||||
slice.brim.scaleDown(inversePrecision);
|
||||
for (let i = 0; i < slice.brim.length; i ++) {
|
||||
slice.brim[i].scaleDown(inversePrecision);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,9 @@ export default function slicesToGCode(slices, settings) {
|
||||
}, {});
|
||||
|
||||
if (typeof slice.brim !== 'undefined') {
|
||||
pathToGCode(null, false, gcode, slice.brim, true, true, z, profiles.brim);
|
||||
for (let i = 0; i < slice.brim.length; i ++) {
|
||||
pathToGCode(null, false, gcode, slice.brim[i], false, false, z, profiles.brim);
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = 0; i < slice.parts.length; i ++) {
|
||||
|
Loading…
Reference in New Issue
Block a user