fix polygon perimeter() and restore gyroid filter
This commit is contained in:
parent
e45d177cf8
commit
f12b3f2e9f
2 changed files with 2 additions and 2 deletions
|
|
@ -1338,7 +1338,7 @@
|
||||||
* @returns {number} perimeter length (sum of all segment lengths)
|
* @returns {number} perimeter length (sum of all segment lengths)
|
||||||
*/
|
*/
|
||||||
PRO.perimeter = function() {
|
PRO.perimeter = function() {
|
||||||
if (this.perim !== 0.0) {
|
if (this.perim) {
|
||||||
return this.perim;
|
return this.perim;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
polys = connectOpenPolys(polys);
|
polys = connectOpenPolys(polys);
|
||||||
for (let poly of polys) {
|
for (let poly of polys.filter(p => p.perimeter() > 2)) {
|
||||||
target.newline();
|
target.newline();
|
||||||
for (let point of poly.points) {
|
for (let point of poly.points) {
|
||||||
target.emit(point.x, point.y);
|
target.emit(point.x, point.y);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue