weight poly2poly movements by polygon area

This commit is contained in:
Stewart Allen 2020-02-08 13:09:54 -05:00
commit 9f819e8398
2 changed files with 3 additions and 2 deletions

View file

@ -872,8 +872,9 @@ var gs_kiri_print = exports;
}
return;
}
let area = poly.area();
poly.forEachPoint(function(point, index) {
dist = startPoint.distTo3D(point);
dist = startPoint.distTo3D(point) * area * area;
if (dist < mindist) {
found = {poly:poly, index:index, point:point};
mindist = dist;