mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-12-23 03:23:48 +01:00
prettify
This commit is contained in:
parent
fdff42b4a5
commit
c34be4595a
@ -15,5 +15,7 @@ export default function addBrim(slices, settings) {
|
||||
brimOffset /= PRECISION;
|
||||
|
||||
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);
|
||||
|
||||
const y = layerIndex * layerHeight;
|
||||
let x, z;
|
||||
|
||||
let x, z;
|
||||
if (line.start.y === line.end.y) {
|
||||
x = line.start.x;
|
||||
z = line.start.z;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
const alpha = (y - line.start.y) / (line.end.y - line.start.y);
|
||||
x = line.end.x * alpha + line.start.x * (1 - alpha);
|
||||
z = line.end.z * alpha + line.start.z * (1 - alpha);
|
||||
|
Loading…
Reference in New Issue
Block a user