remove thin gap areas from fill inset areas
This commit is contained in:
parent
49cde21201
commit
08bc1d45e3
2 changed files with 12 additions and 2 deletions
|
|
@ -682,7 +682,7 @@
|
||||||
near = opt.near || false,
|
near = opt.near || false,
|
||||||
fast = opt.fast || false,
|
fast = opt.fast || false,
|
||||||
fill = opt.fill >= 0 ? opt.fill : fillMult,
|
fill = opt.fill >= 0 ? opt.fill : fillMult,
|
||||||
thinDist = near ? thinWall * 3 : thinWall;
|
thinDist = near ? thinWall : thinWall;
|
||||||
|
|
||||||
while (lines && marked < lines.length) {
|
while (lines && marked < lines.length) {
|
||||||
group = null;
|
group = null;
|
||||||
|
|
|
||||||
|
|
@ -376,7 +376,9 @@
|
||||||
// top.thinner = [];
|
// top.thinner = [];
|
||||||
top.traces = [];
|
top.traces = [];
|
||||||
top.inner = [];
|
top.inner = [];
|
||||||
let last = [], z = top.poly.getZ();
|
let last = [],
|
||||||
|
gaps = [],
|
||||||
|
z = top.poly.getZ();
|
||||||
|
|
||||||
if (count) {
|
if (count) {
|
||||||
// permit offset of 0 for laser and drag knife
|
// permit offset of 0 for laser and drag knife
|
||||||
|
|
@ -411,6 +413,7 @@
|
||||||
// fillArea(polys, 90, off, [], 0.05, off*4),
|
// fillArea(polys, 90, off, [], 0.05, off*4),
|
||||||
// fillArea(polys, 180, off, [], 0.05, off*4),
|
// fillArea(polys, 180, off, [], 0.05, off*4),
|
||||||
));
|
));
|
||||||
|
gaps = polys;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// standard wall offsetting strategy
|
// standard wall offsetting strategy
|
||||||
|
|
@ -442,7 +445,14 @@
|
||||||
|
|
||||||
// generate fill offset poly set from last offset to top.inner
|
// generate fill offset poly set from last offset to top.inner
|
||||||
if (fillOffset && last.length > 0) {
|
if (fillOffset && last.length > 0) {
|
||||||
|
// if gaps present, remove that area from fill inset
|
||||||
|
if (gaps.length) {
|
||||||
|
let nulast = [];
|
||||||
|
POLY.subtract(last, gaps, nulast);
|
||||||
|
last = nulast;
|
||||||
|
}
|
||||||
last.forEach(function(inner) {
|
last.forEach(function(inner) {
|
||||||
|
// TODO replace with new offset() function
|
||||||
POLY.trace2count(inner, top.inner, fillOffset, 1, 0);
|
POLY.trace2count(inner, top.inner, fillOffset, 1, 0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue