Example #1
0
 private void AddSection()
 {
     string name = SectionName.GetSectionName();
     if (name != string.Empty)
     {
         Section s = new Section(mProject, name);
         mProject.Sections.Add(s);
         UpdateDisplayedProject();
         CurrentSection = s;
     }
 }
Example #2
0
        public static Section FromStream(Project parent, BinaryReader r)
        {
            Section s = new Section(parent);

            s.Name = r.ReadString();

            s.SectionProperties = SectionProperties.FromStream(s, r);
            s.SoilParameters = SoilParameters.FromStream(s, r);

            return s;
        }
Example #3
0
        public SoilParameters(Section parent)
        {
            mParent = parent;

            mFillHeight = 3.0f;
            mSoilUnitWeight = 20.0f;
            mInternalFrictionAngle = 30.0f;
            mSurcharge = 12.0f;
            mBeddingCoefficient = 10000.0f;
            mElasticityModulus = 30000.0f;
            mPoissonsRatio = 0.3f;
            mPerformRackingAnalysis = true;
            mPGA = 0.4f;
        }
Example #4
0
        public SectionProperties(Section parent)
        {
            mParent = parent;

            mInnerWidth = 4.0f;
            mInnerHeight = 3.0f;
            mSlabThickness = 0.6f;
            mFoundationThickness = 0.6f;
            mOuterWallThickness = 0.5f;
            mInnerWalls = 0;
            mInnerWallThickness = 0.5f;
            mHasSlabGussets = true;
            mSlabGussetWidth = 0.5f;
            mSlabGussetHeight = 0.25f;
        }
Example #5
0
        public Section Clone()
        {
            Section s = new Section(mParent);

            s.Name = Name;

            s.SectionProperties = SectionProperties.Clone();
            s.SoilParameters = SoilParameters.Clone();

            return s;
        }
Example #6
0
        private void DuplicateSection()
        {
            string name = SectionName.GetSectionName();
            if (name != string.Empty)
            {
                Section s = CurrentSection.Clone();
                s.Name = name;
                mProject.Sections.Add(s);

                UpdateDisplayedProject();
                CurrentSection = s;
            }
        }
Example #7
0
 private void cbSections_SelectedIndexChanged(object sender, EventArgs e)
 {
     CurrentSection = (Section)cbSections.SelectedItem;
 }
Example #8
0
        public static SoilParameters FromStream(Section parent, BinaryReader r)
        {
            SoilParameters s = new SoilParameters(parent);

            s.FillHeight = r.ReadSingle();
            s.SoilUnitWeight = r.ReadSingle();
            s.InternalFrictionAngle = r.ReadSingle();
            s.Surcharge = r.ReadSingle();
            s.BeddingCoefficient = r.ReadSingle();
            s.ElasticityModulus = r.ReadSingle();
            s.PoissonsRatio = r.ReadSingle();
            s.PerformRackingAnalysis = r.ReadBoolean();
            s.PGA = r.ReadSingle();

            return s;
        }
Example #9
0
        public static SectionProperties FromStream(Section parent, BinaryReader r)
        {
            SectionProperties s = new SectionProperties(parent);

            s.InnerWidth = r.ReadSingle();
            s.InnerHeight = r.ReadSingle();
            s.SlabThickness = r.ReadSingle();
            s.FoundationThickness = r.ReadSingle();
            s.OuterWallThickness = r.ReadSingle();
            s.InnerWalls = r.ReadInt32();
            s.InnerWallThickness = r.ReadSingle();
            s.HasSlabGussets = r.ReadBoolean();
            s.SlabGussetWidth = r.ReadSingle();
            s.SlabGussetHeight = r.ReadSingle();

            s.mParent.AnalysisModel.UpdateModel();

            return s;
        }
Example #10
0
        public CulvertView()
        {
            mCurrentSection = null;

            mViewMode = ViewMode.Section;
            mOutputMode = OutputMode.ServiceCombination;
            mLoadMode = LoadMode.EarthFill;
            mLabelMode = LabelMode.None;
            mEnvelopeMode = EnvelopeMode.Envelope;

            mDrawingPadding = 50;
            mDimensionOffset = 0.2f;
            mTextSize = 0.1f;

            mFormWorkColor = Color.DarkBlue;
            mShadingColor = Color.LightGray;
            mDimensionColor = Color.Black;
            mLoadColor = Color.Black;

            mNegativeForceColor = Color.Red;
            mPositiveForceColor = Color.Blue;
            mEnvelopeForceColor = Color.Purple;
            mFillTransparency = 0.65f;

            mLineThickness = 3.0f;
            mDimensionLineThickness = 1.0f;

            ResizeRedraw = true;
            InitializeComponent();
        }
Example #11
0
        public void SetSection(Section section)
        {
            mCurrentSection = section;

            if (mCurrentSection == null) return;

            Model.Clear();
            switch (ViewMode)
            {
                case ViewMode.Section:
                    DrawFormwork();
                    DrawDimensions();
                    break;

                case ViewMode.AnalysisModel:
                    DrawAnalysisModel();
                    if ((LabelMode & LabelMode.Nodes) != LabelMode.None)
                        DrawNodeNumbers();
                    if ((LabelMode & LabelMode.Frames) != LabelMode.None)
                        DrawFrameNumbers();
                    break;

                case ViewMode.Loads:
                    DrawCulvertFrame();
                    if (LoadMode == LoadMode.EarthFill)
                        DrawEarthFillLoad();
                    else if (LoadMode == LoadMode.SoilPressure)
                        DrawSoilPressureLoad();
                    else if (LoadMode == LoadMode.Surcharge)
                        DrawSurchargeLoad();
                    else if (LoadMode == LoadMode.Racking)
                        DrawRackingLoad();
                    break;

                case ViewMode.Rebars:
                    DrawFormwork(false);

                    break;

                case ViewMode.AxialForces:
                    DrawAnalysisModel(Color.Gray, false, false);
                    if (OutputMode == OutputMode.SelfWeight)
                        DrawFrameAxialForces(mCurrentSection.AnalysisModel.AnalysisCases[0]);
                    else if (OutputMode == OutputMode.EarthFill)
                        DrawFrameAxialForces(mCurrentSection.AnalysisModel.AnalysisCases[1]);
                    else if (OutputMode == OutputMode.SoilPressure)
                        DrawFrameAxialForces(mCurrentSection.AnalysisModel.AnalysisCases[2]);
                    else if (OutputMode == OutputMode.Surcharge)
                        DrawFrameAxialForces(mCurrentSection.AnalysisModel.AnalysisCases[3]);
                    else if (OutputMode == OutputMode.Racking)
                        DrawFrameAxialForces(mCurrentSection.AnalysisModel.AnalysisCases[4]);
                    else if (OutputMode == OutputMode.ServiceCombination)
                        DrawFrameAxialForces(mCurrentSection.AnalysisModel.Combinations[0]);
                    else if (OutputMode == OutputMode.FactoredCombination1)
                        DrawFrameAxialForces(mCurrentSection.AnalysisModel.Combinations[1]);
                    else if (OutputMode == OutputMode.FactoredCombination2)
                        DrawFrameAxialForces(mCurrentSection.AnalysisModel.Combinations[2]);
                    else if (OutputMode == OutputMode.SeismicCombination)
                        DrawFrameAxialForces(mCurrentSection.AnalysisModel.Combinations[4]);
                    else if (OutputMode == OutputMode.Envelope)
                        DrawFrameAxialForces(mCurrentSection.AnalysisModel.Combinations[5]);

                    break;

                case ViewMode.ShearForces:
                    DrawAnalysisModel(Color.Gray, false, false);
                    if (OutputMode == OutputMode.SelfWeight)
                        DrawFrameShearForces(mCurrentSection.AnalysisModel.AnalysisCases[0]);
                    else if (OutputMode == OutputMode.EarthFill)
                        DrawFrameShearForces(mCurrentSection.AnalysisModel.AnalysisCases[1]);
                    else if (OutputMode == OutputMode.SoilPressure)
                        DrawFrameShearForces(mCurrentSection.AnalysisModel.AnalysisCases[2]);
                    else if (OutputMode == OutputMode.Surcharge)
                        DrawFrameShearForces(mCurrentSection.AnalysisModel.AnalysisCases[3]);
                    else if (OutputMode == OutputMode.Racking)
                        DrawFrameShearForces(mCurrentSection.AnalysisModel.AnalysisCases[4]);
                    else if (OutputMode == OutputMode.ServiceCombination)
                        DrawFrameShearForces(mCurrentSection.AnalysisModel.Combinations[0]);
                    else if (OutputMode == OutputMode.FactoredCombination1)
                        DrawFrameShearForces(mCurrentSection.AnalysisModel.Combinations[1]);
                    else if (OutputMode == OutputMode.FactoredCombination2)
                        DrawFrameShearForces(mCurrentSection.AnalysisModel.Combinations[2]);
                    else if (OutputMode == OutputMode.SeismicCombination)
                        DrawFrameShearForces(mCurrentSection.AnalysisModel.Combinations[4]);
                    else if (OutputMode == OutputMode.Envelope)
                        DrawFrameShearForces(mCurrentSection.AnalysisModel.Combinations[5]);

                    break;

                case ViewMode.Moments:
                    DrawAnalysisModel(Color.Gray, false, false);
                    if (OutputMode == OutputMode.SelfWeight)
                        DrawFrameMoments(mCurrentSection.AnalysisModel.AnalysisCases[0]);
                    else if (OutputMode == OutputMode.EarthFill)
                        DrawFrameMoments(mCurrentSection.AnalysisModel.AnalysisCases[1]);
                    else if (OutputMode == OutputMode.SoilPressure)
                        DrawFrameMoments(mCurrentSection.AnalysisModel.AnalysisCases[2]);
                    else if (OutputMode == OutputMode.Surcharge)
                        DrawFrameMoments(mCurrentSection.AnalysisModel.AnalysisCases[3]);
                    else if (OutputMode == OutputMode.Racking)
                        DrawFrameMoments(mCurrentSection.AnalysisModel.AnalysisCases[4]);
                    else if (OutputMode == OutputMode.ServiceCombination)
                        DrawFrameMoments(mCurrentSection.AnalysisModel.Combinations[0]);
                    else if (OutputMode == OutputMode.FactoredCombination1)
                        DrawFrameMoments(mCurrentSection.AnalysisModel.Combinations[1]);
                    else if (OutputMode == OutputMode.FactoredCombination2)
                        DrawFrameMoments(mCurrentSection.AnalysisModel.Combinations[2]);
                    else if (OutputMode == OutputMode.SeismicCombination)
                        DrawFrameMoments(mCurrentSection.AnalysisModel.Combinations[4]);
                    else if (OutputMode == OutputMode.Envelope)
                        DrawFrameMoments(mCurrentSection.AnalysisModel.Combinations[5]);

                    break;

                case ViewMode.Deflections:
                    DrawAnalysisModel(Color.Gray, false, false);
                    if (OutputMode == OutputMode.SelfWeight)
                        DrawDeformations(mCurrentSection.AnalysisModel.AnalysisCases[0]);
                    else if (OutputMode == OutputMode.EarthFill)
                        DrawDeformations(mCurrentSection.AnalysisModel.AnalysisCases[1]);
                    else if (OutputMode == OutputMode.SoilPressure)
                        DrawDeformations(mCurrentSection.AnalysisModel.AnalysisCases[2]);
                    else if (OutputMode == OutputMode.Surcharge)
                        DrawDeformations(mCurrentSection.AnalysisModel.AnalysisCases[3]);
                    else if (OutputMode == OutputMode.Racking)
                        DrawDeformations(mCurrentSection.AnalysisModel.AnalysisCases[4]);
                    else if (OutputMode == OutputMode.ServiceCombination)
                        DrawDeformations(mCurrentSection.AnalysisModel.Combinations[0]);
                    else if (OutputMode == OutputMode.FactoredCombination1)
                        DrawDeformations(mCurrentSection.AnalysisModel.Combinations[1]);
                    else if (OutputMode == OutputMode.FactoredCombination2)
                        DrawDeformations(mCurrentSection.AnalysisModel.Combinations[2]);
                    else if (OutputMode == OutputMode.SeismicCombination)
                        DrawDeformations(mCurrentSection.AnalysisModel.Combinations[4]);
                    else if (OutputMode == OutputMode.Envelope)
                        DrawDeformations(mCurrentSection.AnalysisModel.Combinations[5]);

                    break;
            }

            ZoomToExtents();
            Refresh();
        }
 public CulvertAnalysisModel(Section parent)
 {
     mParent = parent;
 }