improvements to retract limiting routing. moving back to experimental

This commit is contained in:
Stewart Allen 2021-04-29 12:50:30 -04:00
commit 26179279f1
2 changed files with 38 additions and 6 deletions

View file

@ -106,6 +106,22 @@
return this.tops.map(top => top.poly);
};
// FDM top intersect optimization
PRO.topPolysFlat = function() {
if (this.topFlatPolys) {
return this.topFlatPolys;
}
return this.topFlatPolys = POLY.flatten(this.topPolys()).clone(true);
};
// FDM retract path routing using first shell
PRO.topRouteFlat = function() {
if (this.topFlatRoutes) {
return this.topFlatRoutes;
}
return this.topFlatRoutes = POLY.flatten(this.tops.map(top => top.shells[0]).clone(true), [], true);
}
// CAM only
PRO.topPolyInners = function() {
return this.tops.map(top => top.poly.inner).flat().filter(poly => poly);