fix center calc for tabs in non-circle-like polygons

This commit is contained in:
Stewart Allen 2020-07-05 21:15:17 -04:00
commit 88f1b8cafd
2 changed files with 5 additions and 1 deletions

View file

@ -116,6 +116,10 @@
return this.maxy - this.miny;
};
PRO.center = function(z) {
return BASE.newPoint(this.centerx(), this.centery(), z);
};
PRO.centerx = function() {
return this.minx + this.width() / 2;
};

View file

@ -919,7 +919,7 @@
let count = proc.camTabsCount,
angle = proc.camTabsAngle,
angle_inc = 360 / count,
center = trace.circleCenter(),//BASE.newPoint(0,0,slice.z),
center = trace.bounds.center(slice.z),
offset = (tabWidth + toolDiam) / 2,
ints = [],
segs = [];