Пример #1
0
        protected void DrawIsoFoot()
        {
            DimensionLine dim = new DimensionLine();

            DiagramGraphics = new DovDrawings(diagramContext);
            diagramChart    = new ChartStyle();
            float footW = 0.4f * DiagramCanvWidth;
            float footH = 0.4f * DiagramCanvHeight;

            diagramChart.ChartArea = new RectangleF(0, 0, footW, footH);
            float startX = 0;
            float startY = 0;

            DiagramGraphics.Clear(startX, startY, footW, footH);
            float limit = (footingData.Width > footingData.Length ? footingData.Width : footingData.Length);
            float xMax  = 0.5f * limit;
            float xMin  = -0.5f * limit;
            float yMax  = 0.5f * limit;
            float yMin  = -0.5f * limit;

            SetGraphicLayout(footW, footH, startX, startY, diagramChart, new float[] { xMin, xMax, yMin, yMax });
            PointF fPt1 = new PointF(-0.5f * footingData.Width, 0.5f * footingData.Length);
            PointF fPt2 = new PointF(0.5f * footingData.Width, -0.5f * footingData.Length);

            fPt1 = diagramChart.Point2D(fPt1);
            fPt2 = diagramChart.Point2D(fPt2);
            DiagramGraphics.FillColorOpt = "lightslategrey";
            DiagramGraphics.FillColor(fPt1, fPt2);
            DiagramGraphics.DrwColor = "dimgrey";
            DiagramGraphics.DrawRec(fPt1, fPt2);
            SetGraphicLayout(footW, footH, startX, startY, diagramChart, new float[] { xMin, xMax, yMin, yMax });
            PointF cPt1   = new PointF(footingData.ColLocX - 0.5f * footingData.Width + footingData.ColumnWidth * 0.5f, footingData.ColLocY - footingData.Length * 0.5f - 0.5f * footingData.ColumnLength);
            PointF cPt2   = new PointF(footingData.ColLocX - 0.5f * footingData.Width - footingData.ColumnWidth * 0.5f, footingData.ColLocY - footingData.Length * 0.5f + 0.5f * footingData.ColumnLength);
            PointF center = new PointF(footingData.ColLocX - 0.5f * footingData.Width, footingData.ColLocY - footingData.Length * 0.5f);

            cPt1   = diagramChart.Point2D(cPt1);
            cPt2   = diagramChart.Point2D(cPt2);
            center = diagramChart.Point2D(center);
            DiagramGraphics.FillColorOpt = "darkslategrey";
            DiagramGraphics.FillColor(cPt1, cPt2);
            DiagramGraphics.DrwColor = "dimgrey";
            DiagramGraphics.DrawRec(cPt1, cPt2);
            DiagramGraphics.DrwColor = "cadetblue";
            dim.Graphic = DiagramGraphics;
            dim.DimLoc  = DimensionLine.DimensionLocation.end;
            dim.DrawAdjDimLine(fPt1, fPt2, string.Format("W={0}", footingData.Width));
            dim.DimDir = DimensionLine.DimensionDirection.right;
            DiagramGraphics.TextBase = TextBaseline.Bottom;
            dim.DrawOppoDimLine(fPt1, fPt2, string.Format("L={0}", footingData.Length));
            dim.DimDir = DimensionLine.DimensionDirection.right;
            dim.DrawOppoDimLine(fPt1, center, string.Format("y={0}", footingData.ColLocY));
            dim.DimLoc = DimensionLine.DimensionLocation.start;
            dim.DrawAdjDimLine(fPt1, center, string.Format("x={0}", footingData.ColLocX));
        }
Пример #2
0
        protected void IsoFootDetailOnPlan()
        {
            DimensionLine dim = new DimensionLine();

            DetailingGraphics = new DovDrawings(detailingContext);
            detailingChart    = new ChartStyle();
            float footW = DetailingCanvWidth;
            float footH = 0.6f * DetailingCanvHeight;

            detailingChart.ChartArea = new RectangleF(0, 0, footW, footH);
            float startX = 0;
            float startY = 0;

            DetailingGraphics.Clear(startX, startY, footW, footH);
            float limit = (footingData.Width > footingData.Length ? footingData.Width : footingData.Length);
            float xMax  = 0.5f * limit;
            float xMin  = -0.5f * limit;
            float yMax  = 0.5f * limit;
            float yMin  = -0.5f * limit;

            SetGraphicLayout(footW, footH, startX, startY, detailingChart, new float[] { xMin, xMax, yMin, yMax });
            PointF fPt1 = new PointF(-0.5f * footingData.Width, 0.5f * footingData.Length);
            PointF fPt2 = new PointF(0.5f * footingData.Width, -0.5f * footingData.Length);

            fPt1 = detailingChart.Point2D(fPt1);
            fPt2 = detailingChart.Point2D(fPt2);
            DetailingGraphics.FillColorOpt = "lightslategrey";
            DetailingGraphics.FillColor(fPt1, fPt2);
            DetailingGraphics.DrwColor = "dimgrey";
            DetailingGraphics.DrawRec(fPt1, fPt2);
            SetGraphicLayout(footW, footH, startX, startY, detailingChart, new float[] { xMin, xMax, yMin, yMax });
            PointF cPt1   = new PointF(footingData.ColLocX - 0.5f * footingData.Width + footingData.ColumnWidth * 0.5f, footingData.ColLocY - footingData.Length * 0.5f - 0.5f * footingData.ColumnLength);
            PointF cPt2   = new PointF(footingData.ColLocX - 0.5f * footingData.Width - footingData.ColumnWidth * 0.5f, footingData.ColLocY - footingData.Length * 0.5f + 0.5f * footingData.ColumnLength);
            PointF center = new PointF(footingData.ColLocX - 0.5f * footingData.Width, footingData.ColLocY - footingData.Length * 0.5f);

            cPt1   = detailingChart.Point2D(cPt1);
            cPt2   = detailingChart.Point2D(cPt2);
            center = detailingChart.Point2D(center);
            DetailingGraphics.FillColorOpt = "darkslategrey";
            DetailingGraphics.FillColor(cPt1, cPt2);
            DetailingGraphics.DrwColor = "dimgrey";
            DetailingGraphics.DrawRec(cPt1, cPt2);
            DetailingGraphics.DrwColor = "cadetblue";
            dim.Graphic = DetailingGraphics;
            dim.DimLoc  = DimensionLine.DimensionLocation.end;
            dim.DrawAdjDimLine(fPt1, fPt2, string.Format("W={0}", footingData.Width));
            dim.DimDir = DimensionLine.DimensionDirection.right;
            DetailingGraphics.TextBase = TextBaseline.Bottom;
            dim.DrawOppoDimLine(fPt1, fPt2, string.Format("L={0}", footingData.Length));
            fPt1 = new PointF(-0.5f * footingData.Width, -0.5f * footingData.Length);
            fPt1 = detailingChart.Point2D(fPt1);
            dim.DrawOppoDimLine(fPt1, center, string.Format("y={0}", footingData.ColLocY));
            ////dim.DimLoc = DimensionLine.DimensionLocation.end;
            //await dim.DrawAdjDimLine(fPt1, center, string.Format("x={0}", footingData.ColLocX));
            // drawing reinforcement
            // horizontal
            float thick      = footingData.Thickness;
            float w          = footingData.Width;
            float l          = footingData.Length;
            float c          = footingData.Cover * 0.1f;
            float dia        = footingData.Dia;
            float barArea    = (float)Math.PI * dia * dia / 4;
            int   nbar       = (int)Math.Ceiling(fDesign.Asy / barArea);
            int   barSpacing = 1000 / nbar;

            barSpacing = barSpacing.RoundDown();
            float  x   = footingData.ColLocX - 0.5f * w + 0.5f * footingData.ColumnWidth + thick - 2 * c;
            float  y1  = -(0.5f * l - c);
            float  y2  = (0.5f * l - c);
            PointF pt1 = new PointF(x, y1);
            PointF pt2 = new PointF(x, y2);
            PointF pt3 = new PointF(pt1.X - thick + 2 * c, pt1.Y);
            PointF pt4 = new PointF(pt2.X - thick + 2 * c, pt2.Y);

            pt1 = detailingChart.Point2D(pt1);
            pt2 = detailingChart.Point2D(pt2);
            pt3 = detailingChart.Point2D(pt3);
            pt4 = detailingChart.Point2D(pt4);
            DetailingGraphics.DrwColor = "red";
            DetailingGraphics.DrawLine(pt1, pt2);
            string spacing = string.Format("{0} c/c {1} mm", dia, barSpacing);

            DetailingGraphics.TextAlignment = TextAlign.Center;
            DetailingGraphics.TextBase      = TextBaseline.Hanging;
            DetailingGraphics.FillColorOpt  = "yellow";
            dim.DrawTextAtAngleMid(pt1, pt2, spacing);
            DetailingGraphics.DrawLine(pt1, pt3);
            DetailingGraphics.DrawLine(pt2, pt4);
            //vertical
            float y3 = footingData.ColLocY - 0.5f * l + 0.5f * footingData.ColumnLength + thick - 2 * c;
            float x1 = -(0.5f * w - c);
            float x2 = (0.5f * w - c);

            nbar       = (int)Math.Ceiling(fDesign.Asx / barArea);
            barSpacing = 1000 / nbar;
            barSpacing = barSpacing.RoundDown();
            pt1        = new PointF(x1, y3);
            pt2        = new PointF(x2, y3);
            pt3        = new PointF(pt1.X, pt1.Y - thick + 2 * c);
            pt4        = new PointF(pt2.X, pt2.Y - thick + 2 * c);
            pt1        = detailingChart.Point2D(pt1);
            pt2        = detailingChart.Point2D(pt2);
            pt3        = detailingChart.Point2D(pt3);
            pt4        = detailingChart.Point2D(pt4);
            DetailingGraphics.DrawLine(pt1, pt2);
            spacing = string.Format("{0} c/c {1} mm", dia, barSpacing);
            DetailingGraphics.TextAlignment = TextAlign.Center;
            DetailingGraphics.TextBase      = TextBaseline.Bottom;
            dim.DrawTextAtAngleMid(pt1, pt2, spacing);
            DetailingGraphics.DrawLine(pt1, pt3);
            DetailingGraphics.DrawLine(pt2, pt4);
        }