fix layer fingerprinting for some geometries. gyroid test options
This commit is contained in:
parent
4d697e1cd2
commit
fe8de60f58
3 changed files with 90 additions and 34 deletions
|
|
@ -834,6 +834,7 @@ var gs_base_polygons = exports;
|
|||
}).forEach(p => {
|
||||
finger.push(p.area());
|
||||
finger.push(p.perimeter());
|
||||
finger.push(p.bounds);
|
||||
});
|
||||
return finger;
|
||||
}
|
||||
|
|
@ -848,13 +849,19 @@ var gs_base_polygons = exports;
|
|||
if (a.length !== b.length) {
|
||||
return false;
|
||||
}
|
||||
for (let i=0; i<a.length; i += 2) {
|
||||
for (let i=0; i<a.length; i += 3) {
|
||||
if (Math.abs(a[i] - b[i]) > 0.001) {
|
||||
return false;
|
||||
}
|
||||
if (Math.abs(a[i+1] - b[i+1]) > 0.0001) {
|
||||
return false;
|
||||
}
|
||||
if (Math.abs(a[i+2].centerx() - b[i+2].centerx()) > 0.0001) {
|
||||
return false;
|
||||
}
|
||||
if (Math.abs(a[i+2].centery() - b[i+2].centery()) > 0.0001) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue