public virtual IMoveableSection GetBottomSliceSection(double PlaneOffset, SlicingPlaneOffsetType OffsetType)
        {
            if (PlaneOffset >= this.YMax - YMin)
            {
                return(null);
            }

            List <Point2D> rectPoints = null;

            switch (OffsetType)
            {
            case SlicingPlaneOffsetType.Top:
                rectPoints = new List <Point2D>
                {
                    new Point2D(XMin_c, YMax - PlaneOffset),
                    new Point2D(XMin_c, YMin_c),
                    new Point2D(XMax_c, YMin_c),
                    new Point2D(XMax_c, YMax - PlaneOffset)
                };
                break;

            case SlicingPlaneOffsetType.Centroid:

                Point2D Centroid = GetElasticCentroidCoordinate();
                rectPoints = new List <Point2D>
                {
                    new Point2D(XMin_c, Centroid.Y - PlaneOffset),
                    new Point2D(XMin_c, YMin_c),
                    new Point2D(XMax_c, YMin_c),
                    new Point2D(XMax_c, Centroid.Y - PlaneOffset)
                };
                break;

            case SlicingPlaneOffsetType.Bottom:
                rectPoints = new List <Point2D>
                {
                    new Point2D(XMin_c, YMin - PlaneOffset),
                    new Point2D(XMin_c, YMin_c),
                    new Point2D(XMax_c, YMin_c),
                    new Point2D(XMax_c, YMin - PlaneOffset)
                };
                break;

            default:
                break;
            }

            return(GetCutPolygon(rectPoints));
        }
        private double GetYPlane(double PlaneOffset, SlicingPlaneOffsetType OffsetType)
        {
            double YPlane = 0;

            switch (OffsetType)
            {
            case SlicingPlaneOffsetType.Top:
                YPlane = YMax - PlaneOffset;
                break;

            case SlicingPlaneOffsetType.Centroid:
                YPlane = this.Centroid.Y + PlaneOffset;
                break;

            case SlicingPlaneOffsetType.Bottom:
                YPlane = YMin + PlaneOffset;
                break;

            default:
                break;
            }

            return(YPlane);
        }
        private double GetYPlane(double PlaneOffset, SlicingPlaneOffsetType OffsetType)
        {
            double YPlane = 0;

            switch (OffsetType)
            {
                case SlicingPlaneOffsetType.Top:
                    YPlane = YMax - PlaneOffset;
                    break;
                case SlicingPlaneOffsetType.Centroid:
                    YPlane = this.Centroid.Y + PlaneOffset;
                    break;
                case SlicingPlaneOffsetType.Bottom:
                    YPlane = YMin + PlaneOffset;
                    break;
                default:
                    break;
            }

            return YPlane;
        }
 public IMoveableSection GetBottomSliceSection(double PlaneOffset, SlicingPlaneOffsetType OffsetType)
 {
     double YPlane = GetYPlane(PlaneOffset, OffsetType);
     return getSliceAtCoordinate(YPlane, SliceType.Bottom);
 }
        public IMoveableSection GetBottomSliceSection(double PlaneOffset, SlicingPlaneOffsetType OffsetType)
        {
            double YPlane = GetYPlane(PlaneOffset, OffsetType);

            return(getSliceAtCoordinate(YPlane, SliceType.Bottom));
        }
        public virtual IMoveableSection GetBottomSliceSection(double PlaneOffset, SlicingPlaneOffsetType OffsetType)
        {
            List<Point2D> rectPoints = null;
            switch (OffsetType)
            {
                case SlicingPlaneOffsetType.Top:
                    rectPoints = new List<Point2D>
                        {
                            new Point2D(XMin_c, YMax-PlaneOffset),
                            new Point2D(XMin_c, YMin_c),
                            new Point2D(XMax_c, YMin_c),
                            new Point2D(XMax_c, YMax-PlaneOffset)
                        };
                    break;
                case SlicingPlaneOffsetType.Centroid:

                    Point2D Centroid = GetElasticCentroidCoordinate();
                    rectPoints = new List<Point2D>
                        {
                            new Point2D(XMin_c, Centroid.Y-PlaneOffset),
                            new Point2D(XMin_c, YMin_c),
                            new Point2D(XMax_c, YMin_c),
                            new Point2D(XMax_c, Centroid.Y-PlaneOffset)
                        };
                    break;
                case SlicingPlaneOffsetType.Bottom:
                    rectPoints = new List<Point2D>
                        {
                            new Point2D(XMin_c, YMin-PlaneOffset),
                            new Point2D(XMin_c, YMin_c),
                            new Point2D(XMax_c, YMin_c),
                            new Point2D(XMax_c, YMin-PlaneOffset)
                        };
                    break;
                default:
                    break;
            }

            return GetCutPolygon(rectPoints);
        }