alt approach to fixing miter render bug
This commit is contained in:
parent
9073a5789e
commit
401577943c
2 changed files with 4 additions and 3 deletions
|
|
@ -85,6 +85,9 @@
|
|||
}
|
||||
|
||||
addPolys(polys, options) {
|
||||
if (options && options.clean) {
|
||||
polys = polys.map(p => p.clean());
|
||||
}
|
||||
if (options && options.flat) {
|
||||
return this.addFlats(polys, options);
|
||||
}
|
||||
|
|
@ -200,8 +203,6 @@
|
|||
const contour = [];
|
||||
poly = poly.debur(0.05);
|
||||
if (!poly) return;
|
||||
poly = poly.clean();
|
||||
if (!poly) return;
|
||||
poly = poly.miter();
|
||||
poly.points.forEach(p => {
|
||||
contour.push(new THREE.Vector2(p.x, p.y));
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@
|
|||
|
||||
if (top.shells) output
|
||||
.setLayer("shells", isSynth ? COLOR.support : COLOR.shell)
|
||||
.addPolys(top.shells, vopt({ offset, height }));
|
||||
.addPolys(top.shells, vopt({ offset, height, clean: true }));
|
||||
|
||||
if (top.gaps) output
|
||||
.setLayer("gaps", COLOR.gaps)
|
||||
|
|
|
|||
Loading…
Reference in a new issue