replace center average with geometric center. fixed #284

This commit is contained in:
Stewart Allen 2024-08-02 18:35:36 -04:00
commit 5d55cae92a

View file

@ -615,7 +615,8 @@ class Polygon {
* @returns {Polygon|Point} a new polygon centered on x=0, y=0, z=0
*/
center(point) {
throw "does not work";
return this.bounds.center(this.getZ());
// throw "does not work";
let ap = newPoint(0, 0, 0, null),
np = newPolygon(),
pa = this.points;