use entirely different selector for single line traces. fixes #111
This commit is contained in:
parent
e21ab63d36
commit
50d95e6077
1 changed files with 10 additions and 7 deletions
|
|
@ -242,6 +242,13 @@
|
|||
let traces = [];
|
||||
// find and trim polys (including open) to shadow
|
||||
let oneach = (data, index, total) => {
|
||||
if (single) {
|
||||
for (let line of data.lines) {
|
||||
if (line.p1.distTo2D(line.p2) > 1) {
|
||||
traces.push(newPolygon().append(line.p1).append(line.p2).setOpen());
|
||||
}
|
||||
}
|
||||
} else
|
||||
BASE.polygons.flatten(data.tops,null,true).forEach(poly => {
|
||||
poly.inner = null;
|
||||
poly.parent = null;
|
||||
|
|
@ -257,13 +264,9 @@
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (single) {
|
||||
poly.forEachSegment((p1, p2) => {
|
||||
traces.push(newPolygon().append(p1).append(p2).setOpen());
|
||||
}, poly.open);
|
||||
} else {
|
||||
traces.push(poly);
|
||||
}
|
||||
poly.forEachSegment((p1, p2) => {
|
||||
traces.push(newPolygon().append(p1).append(p2).setOpen());
|
||||
}, poly.open);
|
||||
});
|
||||
};
|
||||
let opts = { each: oneach, over: false, flatoff: 0, edges: true, openok: true };
|
||||
|
|
|
|||
Loading…
Reference in a new issue