fix use of flatness to drop points in gpu contour
This commit is contained in:
parent
df72bb8996
commit
15acdcfcba
1 changed files with 2 additions and 2 deletions
|
|
@ -252,11 +252,11 @@ export class Topo {
|
||||||
for (let i=2; i<points.length; i++) {
|
for (let i=2; i<points.length; i++) {
|
||||||
let np = points[i];
|
let np = points[i];
|
||||||
let ndz = np.z - lp.z;
|
let ndz = np.z - lp.z;
|
||||||
if (Math.abs(dz - ndz) > epsilon) {
|
if (Math.abs(dz - ndz) > flatness) {
|
||||||
// slope changed
|
// slope changed
|
||||||
merged.push(lp);
|
merged.push(lp);
|
||||||
dz = ndz;
|
dz = ndz;
|
||||||
} else if (curvesOnly && Math.abs(ndz) < epsilon) {
|
} else if (curvesOnly && Math.abs(ndz) < flatness) {
|
||||||
// add empty points as path separators
|
// add empty points as path separators
|
||||||
merged.push(undefined);
|
merged.push(undefined);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue