public Anchor GetBestAnchor(PointT input, int exitAngleMod8 = -1)
{
var candidates =
from shape in _doc.Shapes
let anchor = shape.GetNearestAnchor(input, exitAngleMod8)
where anchor != null && anchor.Point.Sub(input).Quadrance() <= MathEx.Square(AnchorSnapDistance)
select anchor;
return candidates.MinOrDefault(a => a.Point.Sub(input).Quadrance());
}