Example #1
0
        private double GetBottomElevation()
        {
            var maxY = Math.Min(Pline.StartPoint.Y, Pline.EndPoint.Y);

            return(Section.GetEleFromY(maxY));

            //
            var segms = SlopeData.Combine(_slopes, _platforms, sort: false);

            if (segms.Count == 0)
            {
                var bottomPt = _isFill
                    ? Pline.GetLineSegment2dAt(Pline.NumberOfVertices - 2).EndPoint
                    : Pline.GetLineSegment2dAt(0).StartPoint;
                return(Section.GetEleFromY(bottomPt.Y));
            }
            else
            {
                var bottomS = _isFill ? segms[segms.Count - 1] : segms[0];
                if (bottomS is Slope)
                {
                    return(Section.GetEleFromY((bottomS as Slope).BottomPoint.Y));
                }
                else
                {
                    return(Section.GetEleFromY((bottomS as Platform).MiddlePoint.Y));
                }
            }
        }