fix type 1 thin wall
This commit is contained in:
parent
bf5f783c7a
commit
382e0cd5d7
3 changed files with 5 additions and 1 deletions
|
|
@ -111,17 +111,21 @@ function thin_type_1(params) {
|
|||
let { z, top, count, top_poly, offsetN, last, gaps } = params;
|
||||
top.thin_fill = [];
|
||||
top.fill_sparse = [];
|
||||
|
||||
let layers = POLY.inset(top_poly, offsetN, count, z, true);
|
||||
last = layers.last().mid;
|
||||
top.shells = layers.map(r => r.mid).flat();
|
||||
top.gaps = layers.map(r => r.gap).flat();
|
||||
|
||||
let off = offsetN;
|
||||
let min = off * 0.75;
|
||||
let max = off * 4;
|
||||
|
||||
for (let poly of layers.map(r => r.gap).flat()) {
|
||||
let centers = poly.centers(off/2, z, min, max, {lines:false});
|
||||
top.fill_sparse.appendAll(centers);
|
||||
}
|
||||
|
||||
return { last, gaps };
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue