Example #1
0
        private ICurve CreatePipeCurve(EdgeType firstEdge, EdgeType secondEdge)
        {
            var firstPosition  = firstEdge.ToCoordinate().ToVector2();
            var secondPosition = secondEdge.ToCoordinate().ToVector2();

            if ((firstPosition + secondPosition).Magnitude.SmallerOrEqualTo(1.0))
            {
                return(new StraightLineCurve(firstPosition, secondPosition - firstPosition));
            }

            return(CreateRoundCurve(firstPosition, secondPosition));
        }