Example #1
0
        private Stirrups CreateStirrups(int i)
        {
            Stirrups stirrups;

            if (i == 1)
            {
                stirrups = new Stirrups(
                    int.Parse(textBox_legs_1.Text),
                    double.Parse(comboBox_diameter_AsStir_1.Text),
                    new Steel((Steel.classes)comboBox_Steel_1.SelectedIndex),
                    double.Parse(textBox_stir_spacing_1.Text),
                    double.Parse(textBox_stir_angle_1.Text)
                    );
            }
            else if (i == 2)
            {
                stirrups = new Stirrups(
                    int.Parse(textBox_legs_2.Text),
                    double.Parse(comboBox_diameter_AsStir_2.Text),
                    new Steel((Steel.classes)comboBox_Steel_2.SelectedIndex),
                    double.Parse(textBox_stir_spacing_2.Text),
                    double.Parse(textBox_stir_angle_2.Text)
                    );
            }
            else
            {
                stirrups = null;
            }
            return(stirrups);
        }
Example #2
0
        ///koniec kontrola wprowadzania danych

        //PRZYCISKI
        private void Button_UpdateGraph_Click(object sender, RoutedEventArgs e)
        {
            section1  = CreateSection(1);
            section2  = CreateSection(2);
            stirrups1 = CreateStirrups(1);
            stirrups2 = CreateStirrups(2);

            CalcCurves();

            Refresh_ULS_MN_Graph();
            Refresh_ULS_VN_Graph();
            Refresh_SLS_Crack_Graph();
            Refresh_SLS_Stresses_Graph();

            ShowToUpdate();
        }
Example #3
0
        public override bool Equals(Object obj)
        {
            Stirrups other = obj as Stirrups;

            if (this.Legs == other.Legs &&
                this.Fi == other.Fi &&
                Equals(this.CurrentSteel, other.CurrentSteel) &&
                this.Swd == other.Swd &&
                this.Alfa == other.Alfa)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// Konstruktor przekroju na podstawie ilości prętów zbrojenia w przekroju
        /// </summary>
        /// <param name="concrete">Obiekt reprezentujący klasę betonu dla przekroju</param>
        /// <param name="steel">Obiekt reprezentujący klasę stali zbrojeniowej w przekroju</param>
        /// <param name="b">Szerokość przekroju w milimetrach</param>
        /// <param name="h">Wysokość przekroju w milimetrach</param>
        /// <param name="fi1">Średnica zbrojenia As1 w mm</param>
        /// <param name="noOfBars1">Ilość prętów zbrojenia As1 w sztukach (liczba całkowita)</param>
        /// <param name="c1">Otulina zbrojenia As1 w mm</param>
        /// <param name="fi2">Średnica zbrojenia As2 w mm</param>
        /// <param name="noOfBars2">Ilość prętów zbrojenia As2 w sztukach (liczba całkowita)</param>
        /// <param name="c2">Otulina zbrojenia As2 w mm</param>
        public RectangleSection(Concrete concrete, Steel steel, double b, double h, double fi1, int noOfBars1, double c1, double fi2, int noOfBars2, double c2, Stirrups stirrups)
        {
            this.B          = b;
            this.H          = h;
            this.Fi1        = fi1;
            this.C1         = c1;
            this.Fi2        = fi2;
            this.C2         = c2;
            this.Spacing1   = (b - 2 * c1 - fi1) / (noOfBars1 - 1);
            this.Spacing2   = (b - 2 * c2 - fi2) / (noOfBars2 - 1);
            CurrentConcrete = concrete;
            CurrentSteel    = steel;
            A1 = c1 + 0.5 * fi1;
            A2 = c2 + 0.5 * fi2;

            if (fi1 == 0 || noOfBars1 == 0)
            {
                c1  = 0;
                A1  = 0;
                As1 = 0.000000001;
            }
            else
            {
                As1 = (fi1 / 2) * (fi1 / 2) * Math.PI * noOfBars1;
                A1  = c1 + 0.5 * fi1;
            }

            if (fi2 == 0 || noOfBars2 == 0)
            {
                A2  = 0;
                c2  = 0;
                As2 = 0.000000001;
            }
            else
            {
                As2 = (fi2 / 2) * (fi2 / 2) * Math.PI * noOfBars2;
                A2  = c2 + 0.5 * fi2;
            }

            SetCreepFactor(0);
            MyStirrups = stirrups;
        }
        /// <summary>
        /// Konstruktor przekroju na podstawie rozstawu zbrojenia
        /// </summary>
        /// <param name="concrete">Obiekt reprezentujący klasę betonu dla przekroju</param>
        /// <param name="steel">Obiekt reprezentujący klasę stali zbrojeniowej w przekroju</param>
        /// <param name="b">Szerokość przekroju w milimetrach</param>
        /// <param name="h">Wysokość przekroju w milimetrach</param>
        /// <param name="fi1">Średnica zbrojenia As1 w mm</param>
        /// <param name="spacing1">Rozstaw prętów zbrojenia As1 w mm</param>
        /// <param name="c1">Otulina zbrojenia As1 w mm</param>
        /// <param name="fi2">Średnica zbrojenia As2 w mm</param>
        /// <param name="spacing2">Rozstaw prętów zbrojenia As2 w mm</param>
        /// <param name="c2">Otulina zbrojenia As2 w mm</param>
        public RectangleSection(Concrete concrete, Steel steel, double b, double h, double fi1, double spacing1, double c1, double fi2, double spacing2, double c2, Stirrups stirrups)
        {
            this.B          = b;
            this.H          = h;
            this.Fi1        = fi1;
            this.C1         = c1;
            this.Spacing1   = spacing1;
            this.Fi2        = fi2;
            this.C2         = c2;
            this.Spacing2   = spacing2;
            CurrentConcrete = concrete;
            CurrentSteel    = steel;

            if (fi1 == 0)
            {
                c1  = 0;
                A1  = 0;
                As1 = 0.000000001;
            }
            else
            {
                As1 = (fi1 / 2) * (fi1 / 2) * Math.PI * b / spacing1;
                A1  = c1 + 0.5 * fi1;
            }

            if (fi2 == 0)
            {
                A2  = 0;
                c2  = 0;
                As2 = 0.000000001;
            }
            else
            {
                As2 = (fi2 / 2) * (fi2 / 2) * Math.PI * b / spacing2;
                A2  = c2 + 0.5 * fi2;
            }

            SetCreepFactor(0);
            MyStirrups = stirrups;
        }
        RectangleSection(Concrete concrete, Steel steel, double b, double h, double fi1, double spacing1, double c1, double As1, double fi2, double spacing2, double c2, double As2, Stirrups stirrups, double fi)
        {
            this.B          = b;
            this.H          = h;
            this.Fi1        = fi1;
            this.C1         = c1;
            this.Spacing1   = spacing1;
            this.Fi2        = fi2;
            this.C2         = c2;
            this.Spacing2   = spacing2;
            CurrentConcrete = concrete;
            CurrentSteel    = steel;
            this.As1        = As1;
            this.As2        = As2;
            if (As1 == 0)
            {
                c1 = 0;
                A1 = 0;
            }
            else
            {
                A1 = c1 + 0.5 * fi1;
            }
            if (As2 == 0)
            {
                A2 = 0;
                c2 = 0;
            }
            else
            {
                A2 = c2 + 0.5 * fi2;
            }

            SetCreepFactor(fi);
            MyStirrups = stirrups;
        }
Example #7
0
        private void ReadFromInstance(SavedFile instance)
        {
            section1 = instance.section1;
            section2 = instance.section2;

            stirrups1 = instance.stirrups1;
            stirrups2 = instance.stirrups2;

            textBox_height_1.Text    = instance.section1_h;
            textBox_height_2.Text    = instance.section2_h;
            textBox_width_1.Text     = instance.section1_b;
            textBox_width_2.Text     = instance.section2_b;
            textBox_cover_As1_1.Text = instance.section1_c1;
            textBox_cover_As2_1.Text = instance.section1_c2;
            textBox_cover_As1_2.Text = instance.section2_c1;
            textBox_cover_As2_2.Text = instance.section2_c2;

            comboBox_diameter_As1_1.SelectedIndex = instance.diameter_As1_1;
            comboBox_diameter_As2_1.SelectedIndex = instance.diameter_As2_1;
            comboBox_diameter_As1_2.SelectedIndex = instance.diameter_As1_2;
            comboBox_diameter_As2_2.SelectedIndex = instance.diameter_As2_2;
            comboBox_As1_spac_no_1.SelectedIndex  = instance.section1_As1_noOfBars;
            comboBox_As2_spac_no_1.SelectedIndex  = instance.section1_As2_noOfBars;
            comboBox_As1_spac_no_2.SelectedIndex  = instance.section2_As1_noOfBars;
            comboBox_As2_spac_no_2.SelectedIndex  = instance.section2_As2_noOfBars;
            textBox_spac_no_As1_1.Text            = instance.spac_no_As1_1;
            textBox_spac_no_As2_1.Text            = instance.spac_no_As2_1;
            textBox_spac_no_As1_2.Text            = instance.spac_no_As1_2;
            textBox_spac_no_As2_2.Text            = instance.spac_no_As2_2;

            comboBox_Concrete_1.SelectedIndex        = instance.concrete1;
            comboBox_Concrete_2.SelectedIndex        = instance.concrete2;
            comboBox_Steel_1.SelectedIndex           = instance.steel1;
            comboBox_Steel_2.SelectedIndex           = instance.steel2;
            comboBox_DesignSituation_1.SelectedIndex = instance.section1DS;
            comboBox_DesignSituation_2.SelectedIndex = instance.section2DS;

            comboBox_diameter_AsStir_1.SelectedIndex = instance.diameter_stir_s1;
            comboBox_diameter_AsStir_2.SelectedIndex = instance.diameter_stir_s2;
            textBox_legs_1.Text         = instance.legs_stir_s1;
            textBox_legs_2.Text         = instance.legs_stir_s2;
            textBox_stir_spacing_1.Text = instance.spacing_stir_s1;
            textBox_stir_spacing_2.Text = instance.spacing_stir_s2;
            textBox_stir_angle_1.Text   = instance.angle_stir_s1;
            textBox_stir_angle_2.Text   = instance.angle_stir_s2;

            tabSLS_ConcreteStress = instance.tabSLS_ConcreteStress;
            tabSLS_SteelStress    = instance.tabSLS_SteelStress;
            tabVRd1         = instance.tabVRd1;
            tabVRdc1        = instance.tabVRdc1;
            tabSLS_NonCrack = instance.tabSLS_NonCrack;
            tabSLS_Crack    = instance.tabSLS_Crack;
            tab1_ULS        = instance.tab1_ULS;
            tab2_ULS        = instance.tab2_ULS;

            points_MN      = instance.points_MN;
            points_VN      = instance.points_VN;
            points_SLS_QPR = instance.points_SLS_QPR;
            points_SLS_CHR = instance.points_SLS_CHR;

            textBox_creep1.Text = instance.creep1.ToString();
            textBox_creep2.Text = instance.creep2.ToString();
        }