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) {
|
addPolys(polys, options) {
|
||||||
|
if (options && options.clean) {
|
||||||
|
polys = polys.map(p => p.clean());
|
||||||
|
}
|
||||||
if (options && options.flat) {
|
if (options && options.flat) {
|
||||||
return this.addFlats(polys, options);
|
return this.addFlats(polys, options);
|
||||||
}
|
}
|
||||||
|
|
@ -200,8 +203,6 @@
|
||||||
const contour = [];
|
const contour = [];
|
||||||
poly = poly.debur(0.05);
|
poly = poly.debur(0.05);
|
||||||
if (!poly) return;
|
if (!poly) return;
|
||||||
poly = poly.clean();
|
|
||||||
if (!poly) return;
|
|
||||||
poly = poly.miter();
|
poly = poly.miter();
|
||||||
poly.points.forEach(p => {
|
poly.points.forEach(p => {
|
||||||
contour.push(new THREE.Vector2(p.x, p.y));
|
contour.push(new THREE.Vector2(p.x, p.y));
|
||||||
|
|
|
||||||
|
|
@ -484,7 +484,7 @@
|
||||||
|
|
||||||
if (top.shells) output
|
if (top.shells) output
|
||||||
.setLayer("shells", isSynth ? COLOR.support : COLOR.shell)
|
.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
|
if (top.gaps) output
|
||||||
.setLayer("gaps", COLOR.gaps)
|
.setLayer("gaps", COLOR.gaps)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue