weight poly2poly movements by polygon area
This commit is contained in:
parent
cbfb92a462
commit
9f819e8398
2 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
var exports = {
|
||||
COPYRIGHT:"Copyright (C) 2014-2019 Stewart Allen <sa@grid.space> - All Rights Reserved",
|
||||
LICENSE:"See the license.md file included with the source distribution",
|
||||
VERSION:"1.5.4"
|
||||
VERSION:"1.5.5"
|
||||
};
|
||||
if (!module) var module = {};
|
||||
module.exports = exports;
|
||||
|
|
|
|||
Loading…
Reference in a new issue