Exemplo n.º 1
0
        protected override void OnInitialized()
        {
            concMat = new DovConcMat()
            {
                Name = "25MPa", UnitWt = 25, Fck = 25, PoissonRatio = 0.2f, E = 29000
            };
            dovConcMatLibrary.Add(concMat);
            concMat = new DovConcMat()
            {
                Name = "15MPa", UnitWt = 25, Fck = 15, PoissonRatio = 0.2f, E = 29000
            };
            dovConcMatLibrary.Add(concMat);

            rebarMat = new DovRebarMat()
            {
                Name = "355MPa", UnitWt = 78.5f, Fyk = 355, PoissonRatio = 0.3f, E = 200000
            };
            dovRebarMatLibrary.Add(rebarMat);
            rebarMat = new DovRebarMat()
            {
                Name = "400MPa", UnitWt = 78.5f, Fyk = 400, PoissonRatio = 0.3f, E = 200000
            };
            dovRebarMatLibrary.Add(rebarMat);
            DovRebarLocation rLoc = new DovRebarLocation(1, 16, -67, -167);

            rebarLocLibrary.Add(rLoc);
            rLoc = new DovRebarLocation(2, 16, 67, -167);
            rebarLocLibrary.Add(rLoc);
        }
Exemplo n.º 2
0
        protected override void OnInitialized()
        {
            Point3 pt = new Point3();

            test5[0] = pt;
            concMat  = new DovConcMat()
            {
                Name = "25MPa", UnitWt = 25, Fck = 25, PoissonRatio = 0.2f, E = 29000
            };
            dovConcMatLibrary.Add(concMat);
            concMat = new DovConcMat()
            {
                Name = "15MPa", UnitWt = 25, Fck = 15, PoissonRatio = 0.2f, E = 29000
            };
            dovConcMatLibrary.Add(concMat);

            rebarMat = new DovRebarMat()
            {
                Name = "355MPa", UnitWt = 78.5f, Fyk = 355, PoissonRatio = 0.3f, E = 200000
            };
            dovRebarMatLibrary.Add(rebarMat);
            rebarMat = new DovRebarMat()
            {
                Name = "400MPa", UnitWt = 78.5f, Fyk = 400, PoissonRatio = 0.3f, E = 200000
            };
            dovRebarMatLibrary.Add(rebarMat);

            DovRebarLocation rLoc = new DovRebarLocation(1, 16, -67, -167);

            rebarLocLibrary.Add(rLoc);
            rLoc = new DovRebarLocation(2, 16, 67, -167);
            rebarLocLibrary.Add(rLoc);
            rLoc = new DovRebarLocation(3, 16, 67, -117);
            rebarLocLibrary.Add(rLoc);
            rLoc = new DovRebarLocation(4, 16, -67, -117);
            rebarLocLibrary.Add(rLoc);
            rLoc = new DovRebarLocation(5, 16, 67, -67);
            rebarLocLibrary.Add(rLoc);
            rLoc = new DovRebarLocation(6, 16, -67, -67);
            rebarLocLibrary.Add(rLoc);
            rLoc = new DovRebarLocation(7, 16, 67, 0);
            rebarLocLibrary.Add(rLoc);
            rLoc = new DovRebarLocation(8, 16, -67, 0);
            rebarLocLibrary.Add(rLoc);
            rLoc = new DovRebarLocation(9, 16, 67, 167);
            rebarLocLibrary.Add(rLoc);
            rLoc = new DovRebarLocation(10, 16, -67, 167);
            rebarLocLibrary.Add(rLoc);
            rLoc = new DovRebarLocation(11, 16, 67, 117);
            rebarLocLibrary.Add(rLoc);
            rLoc = new DovRebarLocation(12, 16, -67, 117);
            rebarLocLibrary.Add(rLoc);
            rLoc = new DovRebarLocation(13, 16, 67, 67);
            rebarLocLibrary.Add(rLoc);
            rLoc = new DovRebarLocation(14, 16, -67, 67);
            rebarLocLibrary.Add(rLoc);
        }
Exemplo n.º 3
0
        protected void InsertRebarRow()
        {
            rebarMaxRow++;
            DovRebarLocation reb = new DovRebarLocation(rebarMaxRow, 12, 0, 0);
            int n = 0;

            foreach (var rebar in rebarLocLibrary.ToList())
            {
                if (rebar.No == rebarActiveRow)
                {
                    rebarLocLibrary.Insert(n + 1, reb);
                }
                n++;
            }
        }
Exemplo n.º 4
0
        protected void DrawRebar(DovDrawings graphic, ChartStyle cs)
        {
            float  x;
            float  y;
            float  radius;
            float  limitXNeg = -secRec.Width * 0.5f;
            float  limitXPos = secRec.Width * 0.5f;
            float  limitYNeg = -secRec.Height * 0.5f;
            float  limitYPos = secRec.Height * 0.5f;
            PointF loc;

            rebarLocLibrary = rebarLocLibrary.OrderBy(reb => reb.LocY).ToList();
            DovRebarLocation lo = new DovRebarLocation();

            lo = rebarLocLibrary.First();
            rebarLowestLocation = lo.LocY;
            float locY  = 0;
            bool  start = true;

            RebarLocSorted.Clear();
            foreach (DovRebarLocation bars in rebarLocLibrary)
            {
                if (start)
                {
                    locY  = bars.LocY;
                    start = false;
                }
                if (locY == bars.LocY)
                {
                    if (!RebarLocSorted.ContainsKey(locY))
                    {
                        Stack <DovRebarLocation> bar = new Stack <DovRebarLocation>();
                        bar.Push(bars);
                        RebarLocSorted[locY] = bar;
                    }
                    else
                    {
                        RebarLocSorted[locY].Push(bars);
                    }
                }
                else
                {
                    locY = bars.LocY;
                    Stack <DovRebarLocation> bar = new Stack <DovRebarLocation>();
                    bar.Push(bars);
                    RebarLocSorted[locY] = bar;
                }
                x = bars.LocX;
                y = bars.LocY;
                if ((x < limitXNeg || x > limitXPos) || (y < limitYNeg || y > limitYPos))
                {
                    RebarLocationMessage = "Error: Location is not within the boundary of the section.";
                    RebarLocMsgColor     = "red";
                    continueDesign       = false;
                    break;
                }
                else
                {
                    graphic.DrwColor      = "white";
                    graphic.LineThickness = 2;
                    graphic.FillColorOpt  = "red";
                    RebarLocMsgColor      = "";
                    RebarLocationMessage  = "Enter Location of rebars";
                    radius = bars.Diameter * 0.5f;
                    radius = cs.ScaleX(radius);
                    loc    = cs.Point2D(new PointF(x, y));
                    graphic.DrawArc(loc.X, loc.Y, radius, 0, 2 * Math.PI);
                    continueDesign = true;
                }

                foreach (KeyValuePair <float, Stack <DovRebarLocation> > rebar in RebarLocSorted)
                {
                    re = rebar.Value.ToArray();
                    for (int i = 0; i < re.Length - 1; i++)
                    {
                        float xl = re[i].LocX;
                        for (int j = i + 1; j < re.Length; j++)
                        {
                            if (xl == re[j].LocX)
                            {
                                RebarLocationMessage = "Warning:There are dublicate of bars one of them will be used.";
                                RebarLocMsgColor     = "red";
                            }
                        }
                    }
                }
            }
        }