IntersectWith() private method

private IntersectWith ( Line other, bool mustBeBetweenStartAndEnd ) : Point?
other Line
mustBeBetweenStartAndEnd bool
return Point?
        private static Point? AutoPoint(Line toMid, Line edge)
        {
            var angleTo = toMid.Direction.AngleTo(edge.Direction);
            if (angleTo < 0)
            {
                return toMid.IntersectWith(edge, false)
                    ?.TrimToLine(edge);
            }

            return toMid.StartPoint.Closest(edge.StartPoint, edge.EndPoint);
        }
示例#2
0
        private static Point?AutoPoint(Line toMid, Line edge)
        {
            var angleTo = toMid.Direction.AngleTo(edge.Direction);

            if (angleTo < 0)
            {
                return(toMid.IntersectWith(edge, mustBeBetweenStartAndEnd: false)
                       ?.TrimToLine(edge));
            }

            return(toMid.StartPoint.Closest(edge.StartPoint, edge.EndPoint));
        }