fix lathe slice allocation
This commit is contained in:
parent
47bd68ca0b
commit
f5b90087d3
1 changed files with 4 additions and 2 deletions
|
|
@ -288,8 +288,9 @@ class Topo4 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let heights of recs[0].heights) {
|
count = recs[0].heights.length / 3;
|
||||||
let slice = newSlice();
|
while (count-- > 0) {
|
||||||
|
let slice = newSlice(count);
|
||||||
slice.camLines = [ newPolygon().setOpen() ];
|
slice.camLines = [ newPolygon().setOpen() ];
|
||||||
paths.push(slice);
|
paths.push(slice);
|
||||||
}
|
}
|
||||||
|
|
@ -304,6 +305,7 @@ class Topo4 {
|
||||||
for (let slice of paths) {
|
for (let slice of paths) {
|
||||||
const poly = slice.camLines[0];
|
const poly = slice.camLines[0];
|
||||||
if (!poly.length) {
|
if (!poly.length) {
|
||||||
|
console.log('empty', slice);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
slice.camLines[0].push(poly.points[0].clone());
|
slice.camLines[0].push(poly.points[0].clone());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue