예제 #1
0
        public void CheckSteelBasePart()
        {
            SteelColumnBase steelColumnBase = new SteelColumnBase();

            steelColumnBase.Width     = 1;
            steelColumnBase.Length    = 1;
            steelColumnBase.Thickness = 0.05;
            BarLoadSet columnLoadSet = new BarLoadSet(steelColumnBase);

            columnLoadSet.Force_Nz            = -100000;
            columnLoadSet.PartialSafetyFactor = 1;
            SteelBasePart steelBasePart = new SteelBasePart(steelColumnBase);

            steelBasePart.FixLeft   = true;
            steelBasePart.FixRight  = true;
            steelBasePart.FixTop    = false;
            steelBasePart.FixBottom = false;
            steelBasePart.Width     = 1;
            steelBasePart.Length    = 1;
            SteelColumnBaseProcessor columBaseProcessor = new SteelColumnBaseProcessor();
            ColumnBaseResult         columnResult       = columBaseProcessor.GetResult(steelColumnBase);
            ColumnBasePartResult     baseResult         = SteelColumnBasePartProcessor.GetResult(steelBasePart);

            Assert.AreEqual(300, baseResult.MaxStress / 1000000, 10);
        }
예제 #2
0
        private void EditItemFromSteelColumnBase(ListViewItem Item, SteelColumnBase columnBase)
        {
            Item.SubItems.Clear();
            Item.Text = columnBase.Name;
            Item.SubItems.Add(Convert.ToString(columnBase.Width) + "x" + Convert.ToString(columnBase.Length));
            Item.SubItems.Add(Convert.ToString(columnBase.WidthBoltDist) + "x" + Convert.ToString(columnBase.LengthBoltDist));
            SteelColumnBaseProcessor columBaseProcessor = new SteelColumnBaseProcessor();
            ColumnBaseResult         baseResult         = columBaseProcessor.GetResult(columnBase);
            double maxStress = baseResult.MaxStress;

            maxStress = Math.Round(maxStress / 1000) / 1000;
            double minStress = baseResult.MinStress;

            minStress = Math.Round(minStress / 1000) / 1000;
            Item.SubItems.Add(Convert.ToString(maxStress) + " / " + Convert.ToString(minStress));
        }