public bool Equals(SectionProperty s)
        {
            if ((object)s == null)
            {
                return(false);
            }

            return(this.ID == s.ID);
        }
Beispiel #2
0
        /// <summary>
        /// Initialise a new section property
        /// </summary>
        /// <param name="SectionPropertyID">The ID of the section property to initialise</param>
        /// <returns>The new setcion property</returns>
        SectionProperty GetSectionProperty(int SectionPropertyID)
        {
            SectionProperty newSectionProperty;

            dynamic name = "";

            this.StaadWrapper.Property.GetSectionPropertyName(SectionPropertyID, ref name);

            newSectionProperty = new SectionProperty(SectionPropertyID, name);

            dynamic width = 0.0;
            dynamic depth = 0.0;
            dynamic areaX = 0.0;
            dynamic areaY = 0.0;
            dynamic areaZ = 0.0;
            dynamic iX    = 0.0;
            dynamic iY    = 0.0;
            dynamic iZ    = 0.0;
            dynamic tw    = 0.0;
            dynamic tf    = 0.0;

            this.StaadWrapper.Property.GetSectionPropertyValues(SectionPropertyID, ref width, ref depth, ref areaX, ref areaY, ref areaZ, ref iX, ref iY, ref iZ, ref tf, ref tw);
            newSectionProperty.Width           = (float)width;
            newSectionProperty.Depth           = (float)depth;
            newSectionProperty.FlangeThinkness = (float)tf;
            newSectionProperty.WebThickness    = (float)tw;
            newSectionProperty.Ax = (float)areaX;
            newSectionProperty.Ay = (float)areaY;
            newSectionProperty.Az = (float)areaZ;
            newSectionProperty.Ix = (float)iX;
            newSectionProperty.Iy = (float)iY;
            newSectionProperty.Iz = (float)iZ;

            // Assign property to beams
            dynamic ids = new int[(int)this.StaadWrapper.Property.GetSectionPropertyAssignedBeamCount(newSectionProperty.ID)];

            this.StaadWrapper.Property.GetSectionPropertyAssignedBeamList(newSectionProperty.ID, ref ids);
            this.Beams.Where(o => ((int[])ids).Contains(o.Id)).ToList().ForEach(o => o.SectionProperty = newSectionProperty);

            return(newSectionProperty);
        }
Beispiel #3
0
        /// <summary>
        /// Initialise a new section property
        /// </summary>
        /// <param name="SectionPropertyID">The ID of the section property to initialise</param>
        /// <returns>The new setcion property</returns>
        private SectionProperty GetSectionProperty(int SectionPropertyID)
        {
            SectionProperty newSectionProperty;

            dynamic name = "";
            this.Staad.Property.GetSectionPropertyName(SectionPropertyID, ref name);

            newSectionProperty = new SectionProperty(SectionPropertyID, name);

            dynamic width = 0.0;
            dynamic depth = 0.0;
            dynamic areaX = 0.0;
            dynamic areaY = 0.0;
            dynamic areaZ = 0.0;
            dynamic iX = 0.0;
            dynamic iY = 0.0;
            dynamic iZ = 0.0;
            dynamic tw = 0.0;
            dynamic tf = 0.0;
            this.Staad.Property.GetSectionPropertyValues(SectionPropertyID, ref width, ref depth, ref areaX, ref areaY, ref areaZ, ref iX, ref iY, ref iZ, ref tf, ref tw);
            newSectionProperty.Width = (float)width;
            newSectionProperty.Depth = (float)depth;
            newSectionProperty.FlangeThinkness = (float)tf;
            newSectionProperty.WebThickness = (float)tw;
            newSectionProperty.Ax = (float)areaX;
            newSectionProperty.Ay = (float)areaY;
            newSectionProperty.Az = (float)areaZ;
            newSectionProperty.Ix = (float)iX;
            newSectionProperty.Iy = (float)iY;
            newSectionProperty.Iz = (float)iZ;

            // Assign property to beams
            dynamic ids = new int[(int)this.Staad.Property.GetSectionPropertyAssignedBeamCount(newSectionProperty.ID)];
            Staad.Property.GetSectionPropertyAssignedBeamList(newSectionProperty.ID, ref ids);
            this.Beams.Where(o => ((int[])ids).Contains(o.ID)).ToList().ForEach(o => o.SectionProperty = newSectionProperty);

            return newSectionProperty;
        }
Beispiel #4
0
        public bool Equals(SectionProperty s)
        {
            if ((object)s == null)
                return false;

            return this.ID == s.ID;
        }