remove dead tab code. clear tabs and supports on scale events

This commit is contained in:
Stewart Allen 2020-11-26 00:14:45 -05:00
commit d020a94b53
8 changed files with 14 additions and 126 deletions

View file

@ -60,7 +60,7 @@
newslices = [],
tabs = opt.tabs,
tabsMax = tabs ? Math.max(...tabs.map(tab => tab.dim.z)) : 0,
tabsOn = proc.camTabsOn || tabs,
tabsOn = tabs,
tabHeight = Math.max(proc.camTabsHeight + zBottom, tabsMax),
clipTab = tabsOn ? [] : null,
clipTo = inside ? shadow : POLY.expand(shadow, toolDiameter/2 + resolution * 3),
@ -77,22 +77,6 @@
clipTab.appendAll(tabs.map(tab => POLY.expand([tab.poly], toolDiameter/2)).flat());
}
if (proc.camTabsOn) {
CAM.createTabLines(
center,
toolDiameter,
proc.camTabsWidth,
proc.camTabsCount,
proc.camTabsAngle
).forEach(tab => {
const { o1, o2, c1, c2 } = tab;
const poly = newPolygon().addPoints([
o1, c1, c2, o2
]);
clipTab.push(poly);
});
}
// debug clipTab and clipTo
if (debug_clips) {
const debug = newSlice(-1);