예제 #1
0
        private void DrawRackingLoad()
        {
            float wo = mCurrentSection.SectionProperties.OuterWidth - mCurrentSection.SectionProperties.OuterWallThickness;
            float ho = mCurrentSection.SectionProperties.OuterHeight - mCurrentSection.SectionProperties.SlabThickness / 2 - mCurrentSection.SectionProperties.FoundationThickness / 2;
            float dx = ho / 10;

            float ix = -wo / 2;
            float iw = mCurrentSection.SectionProperties.InnerWalls;
            float dix = wo / (iw + 1);

            float supportSize = DimensionOffset;
            // Left
            SimpleCAD.Triangle leftSupport = new SimpleCAD.Triangle(-wo / 2, 0,
                -wo / 2 - supportSize / 2, -supportSize,
                -wo / 2 + supportSize / 2, -supportSize);
            leftSupport.OutlineStyle = new SimpleCAD.OutlineStyle(DimensionColor);
            Model.Add(leftSupport);
            // Right
            SimpleCAD.Triangle rightSupport = new SimpleCAD.Triangle(wo / 2, 0,
                wo / 2 - supportSize / 2, -supportSize,
                wo / 2 + supportSize / 2, -supportSize);
            rightSupport.OutlineStyle = new SimpleCAD.OutlineStyle(DimensionColor);
            Model.Add(rightSupport);

            // Deformed shape
            PointF[] deformed = new PointF[4];
            deformed[0] = new PointF(-wo / 2, 0);
            deformed[1] = new PointF(wo / 2, 0);
            deformed[2] = new PointF(wo / 2 + dx, ho);
            deformed[3] = new PointF(-wo / 2 + dx, ho);
            SimpleCAD.Polygon deformedObj = new SimpleCAD.Polygon(deformed);
            deformedObj.OutlineStyle = new SimpleCAD.OutlineStyle(DimensionColor, 3);
            Model.Add(deformedObj);
            for (int i = 0; i < iw; i++)
            {
                ix += dix;
                SimpleCAD.Line deformedWall = new SimpleCAD.Line(ix, 0, ix + dx, ho);
                deformedWall.OutlineStyle = new SimpleCAD.OutlineStyle(DimensionColor, 3);
                Model.Add(deformedWall);
            }

            // Text
            float textOffset = DimensionOffset;
            float x = wo / 2 + dx + textOffset;
            float y = ho;

            string[] text = new string[]{ "Racking Parameters:",
                mCurrentSection.SoilParameters.PGA.ToString("PGA = 0.00 g"),
                mCurrentSection.SoilParameters.DepthToInvertLevel.ToString("z = 0.00 m"),
                mCurrentSection.SoilParameters.StressAtInvertLevel.ToString("σz = 0.00 kPa"),
                mCurrentSection.SoilParameters.StressReductionFactor.ToString("Rd = 0.00"),
                mCurrentSection.SoilParameters.MaximumShearStress.ToString("τ = 0.00 kPa"),
                mCurrentSection.SoilParameters.MaximumShearStrain.ToString("γ = 0.0000"),
                mCurrentSection.SoilParameters.FreeFieldDeformation.ToString("Δ = 0.0000 m")};

            SimpleCAD.MultiLineText rackingParamsText = new SimpleCAD.MultiLineText(x, y, text, TextSize);
            rackingParamsText.OutlineStyle = new SimpleCAD.OutlineStyle(DimensionColor);
            rackingParamsText.FontFamily = Font.Name;
            Model.Add(rackingParamsText);
        }