mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-12-23 11:33:49 +01:00
prettify
This commit is contained in:
parent
785898f466
commit
2fc909c45d
@ -15,5 +15,7 @@ export default function addBrim(slices, settings) {
|
|||||||
brimOffset /= PRECISION;
|
brimOffset /= PRECISION;
|
||||||
|
|
||||||
const fistLayer = slices[0];
|
const fistLayer = slices[0];
|
||||||
fistLayer.brim = fistLayer.getOutline().offset(brimOffset, offsetOptions);
|
fistLayer.brim = fistLayer
|
||||||
|
.getOutline()
|
||||||
|
.offset(brimOffset, offsetOptions);
|
||||||
}
|
}
|
||||||
|
@ -26,13 +26,12 @@ export default function calculateLayersIntersections(lines, settings) {
|
|||||||
layerIntersectionIndexes[layerIndex].push(lineIndex);
|
layerIntersectionIndexes[layerIndex].push(lineIndex);
|
||||||
|
|
||||||
const y = layerIndex * layerHeight;
|
const y = layerIndex * layerHeight;
|
||||||
let x, z;
|
|
||||||
|
|
||||||
|
let x, z;
|
||||||
if (line.start.y === line.end.y) {
|
if (line.start.y === line.end.y) {
|
||||||
x = line.start.x;
|
x = line.start.x;
|
||||||
z = line.start.z;
|
z = line.start.z;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
const alpha = (y - line.start.y) / (line.end.y - line.start.y);
|
const alpha = (y - line.start.y) / (line.end.y - line.start.y);
|
||||||
x = line.end.x * alpha + line.start.x * (1 - alpha);
|
x = line.end.x * alpha + line.start.x * (1 - alpha);
|
||||||
z = line.end.z * alpha + line.start.z * (1 - alpha);
|
z = line.end.z * alpha + line.start.z * (1 - alpha);
|
||||||
|
Loading…
Reference in New Issue
Block a user