bless a poly simple algo
This commit is contained in:
parent
80e8f1c8e6
commit
5ef402b72d
2 changed files with 9 additions and 1 deletions
|
|
@ -1428,6 +1428,13 @@
|
||||||
return poly;
|
return poly;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* shortcut to de-rez poly
|
||||||
|
*/
|
||||||
|
PRO.simple = function() {
|
||||||
|
return this.clean(true, undefined, Math.min(CONF.clipper / 10, CONF.clipperClean * 5));
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* simplify and merge collinear. only works for single
|
* simplify and merge collinear. only works for single
|
||||||
* non-nested polygons. used primarily in slicer/connectLines.
|
* non-nested polygons. used primarily in slicer/connectLines.
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,8 @@
|
||||||
}
|
}
|
||||||
// add simple (low rez poly) where less accuracy is OK
|
// add simple (low rez poly) where less accuracy is OK
|
||||||
for (let top of nutops) {
|
for (let top of nutops) {
|
||||||
top.simple = top.poly.clean(true, undefined, CONF.clipper / 10);
|
// top.simple = top.poly.clean(true, undefined, CONF.clipper / 10);
|
||||||
|
top.simple = top.poly.simple();
|
||||||
}
|
}
|
||||||
data.tops = nutops;
|
data.tops = nutops;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue