mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-19 04:27:55 +01:00
fix isFlat check
This commit is contained in:
parent
65f1e96ed8
commit
83f543b62b
@ -9,9 +9,9 @@ export default function calculateLayersIntersections(lines, settings) {
|
||||
const layerIntersectionPoints = Array.from(Array(numLayers)).map(() => []);
|
||||
|
||||
for (let lineIndex = 0; lineIndex < lines.length; lineIndex ++) {
|
||||
const line = lines[lineIndex].line;
|
||||
const { line, isFlat } = lines[lineIndex];
|
||||
|
||||
if (line.isFlat) continue;
|
||||
if (isFlat) continue;
|
||||
|
||||
const min = Math.ceil(Math.min(line.start.y, line.end.y) / layerHeight);
|
||||
const max = Math.floor(Math.max(line.start.y, line.end.y) / layerHeight);
|
||||
|
@ -25,7 +25,7 @@ export default function createLines(geometry, settings) {
|
||||
const lookupB = lineLookup[`${face.c}_${face.b}`];
|
||||
const lookupC = lineLookup[`${face.a}_${face.c}`];
|
||||
|
||||
const isFlat = face.normal.y !== 1 && face.normal.y !== -1;
|
||||
const isFlat = face.normal.y > 0.999 || face.normal.y < -0.999;
|
||||
|
||||
// only add unique lines
|
||||
// returns index of said line
|
||||
|
Loading…
Reference in New Issue
Block a user