Пример #1
0
        private void AddJBQXItemToFigure(JDStruc jdstruc, List <SymbolItemStruc> syDrawingCol)
        {
            double adjacentVerZbdifference     = 10;
            double lastVerZBHor                = 0;
            double lastverZBVerHeigh           = 0;
            double lastadjacentVerZbdifference = 0;

            for (int i = 0; i < syDrawingCol.Count; i++)
            {
                SymbolItemStruc symbldrawing     = syDrawingCol[i];
                LJJSPoint       sybltopZuoBiaoPt = ZuoBiaoOper.GetJSZuoBiaoPt(jdstruc.JDPtStart, symbldrawing.depthtop, jdstruc.JDtop, FrameDesign.ValueCoordinate);
                adjacentVerZbdifference = lastadjacentVerZbdifference + Math.Abs(lastverZBVerHeigh - sybltopZuoBiaoPt.YValue);

                if (adjacentVerZbdifference < 4)
                {
                    lastVerZBHor = lastVerZBHor + jbqx_SymbolWidth;
                    lastadjacentVerZbdifference = lastadjacentVerZbdifference + Math.Abs(lastverZBVerHeigh - sybltopZuoBiaoPt.YValue);
                }
                else
                {
                    lastVerZBHor = 0;
                    lastadjacentVerZbdifference = 0;
                }
                LJJSPoint syblpos = new LJJSPoint(sybltopZuoBiaoPt.XValue + lastVerZBHor, sybltopZuoBiaoPt.YValue);
                SymbolAdd.InsertBlock("JBQX", 1, 1, syblpos);

                int sybolcodecount = symbldrawing.sybolcodelist.Count;

                if (sybolcodecount == 3)
                {
                    string yxcode = symbldrawing.sybolcodelist[0].Trim();
                    if (yxcode != "n" && yxcode != "N" && yxcode != "")
                    {
                        SymbolCodeClass sybloper = (SymbolCodeClass)HashUtil.FindObjByKey(yxcode, FillSymbolCode.SymbolCodeClassHt);
                        if (null != sybloper)
                        {
                            // SymbolCodeClass sybloper = (SymbolCodeClass)FillSymbolCode.SymbolCodeClassHt[yxcode];
                            AddJBQXYXSymbolToFigure(syblpos, sybloper);
                        }
                    }
                    string czcode = symbldrawing.sybolcodelist[1].Trim();
                    if (czcode != "n" && czcode != "N" && czcode != "")
                    {
                        SymbolCodeClass sybloper = (SymbolCodeClass)HashUtil.FindObjByKey(czcode, FillSymbolCode.SymbolCodeClassHt);
                        //  SymbolCodeClass sybloper = (SymbolCodeClass)FillSymbolCode.SymbolCodeClassHt[czcode];
                        if (null != sybloper)
                        {
                            AddJBQXCZSymbolToFigure(syblpos, sybloper);
                        }
                    }
                    string yscode = symbldrawing.sybolcodelist[2].Trim();
                    LJJSCAD.Drawing.Text.LJJSText.AddHorCommonTextByLayer(yscode, new LJJSPoint(syblpos.XValue + jbqx_yshoroffset, syblpos.YValue), AttachmentPoint.MiddleLeft, jbqx_ysCodeTxt_Height, jbqx_bzFont);
                    // ArxCSHelper.AddMText(yscode, 1.2, new LJJSPoint(syblpos.XValue + jbqx_yshoroffset, syblpos.YValue), AttachmentPoint.MiddleLeft, bztxtstyleid);
                }
                lastverZBVerHeigh = syblpos.YValue;
            }
        }
Пример #2
0
 private void AddStandardImageItemToFigure(JDStruc jdStruc, List <ImageItemStruc> imageStrucList)
 {
     for (int i = 0; i < imageStrucList.Count(); i++)
     {
         ImageItemStruc tmpImageItemStruc    = imageStrucList[i];
         LJJSPoint      imageBottomZuoBiaoPt = ZuoBiaoOper.GetJSZuoBiaoPt(jdStruc.JDPtStart, tmpImageItemStruc.BottomJS, jdStruc.JDtop, FrameDesign.ValueCoordinate);
         double         imageDrawingHeigh    = tmpImageItemStruc.JsHeight * 1000 * FrameDesign.ValueCoordinate;
         ImageHatch.AddRectImageHatch(imageBottomZuoBiaoPt, imageDrawingHeigh, this.lineRoadEnvironment.LineRoadWidth, tmpImageItemStruc.ImagePath, DrawCommonData.HatchScale, tmpImageItemStruc.AdditionImeLst);
     }
 }
Пример #3
0
        public override void DrawPerJDZMLine(DrawingElement.LJJSPoint ptstart, JDStruc jdStruc)
        {
            LJJSPoint tmpptstart       = ptstart;
            double    tmplineroadwidth = _lineroadwidth;

            if (_lineRoadModel.ZmLineSpace < Math.Abs(jdStruc.JDBottom - jdStruc.JDtop))
            {
                int              minZhengMiPtJs = ModeUtil.GetMinBeiShu(jdStruc.JDtop, _lineRoadModel.ZmLineSpace);
                LJJSPoint        minZhengMiPt   = ZuoBiaoOper.GetJSZuoBiaoPt(tmpptstart, minZhengMiPtJs, jdStruc.JDtop, FrameDesign.ValueCoordinate);
                List <LJJSPoint> dengfenptarr   = ZuoBiaoOper.GetZongXiangDengFenPtArr(minZhengMiPt, -1, jdStruc.JDHeight - Math.Abs(minZhengMiPt.YValue - tmpptstart.YValue), _ZMLdengfenspace);
                dengfenptarr.Add(minZhengMiPt);
                foreach (LJJSPoint pt in dengfenptarr)
                {
                    Line.BuildHorToRightBlackSolidLine(pt, _lineRoadModel.LineRoadWidth, _lineRoadModel.ZhengMiLineWidth, "");
                }
            }
        }
        private void AddStandardSymbolItemToFigure(JDStruc jdstruc, List <SymbolItemStruc> syDrawingCol)
        {
            for (int i = 0; i < syDrawingCol.Count; i++)
            {
                SymbolItemStruc symbldrawing        = syDrawingCol[i];
                LJJSPoint       sybltopZuoBiaoPt    = ZuoBiaoOper.GetJSZuoBiaoPt(jdstruc.JDPtStart, symbldrawing.depthtop, jdstruc.JDtop, FrameDesign.ValueCoordinate);
                LJJSPoint       syblbottomZuoBiaoPt = ZuoBiaoOper.GetJSZuoBiaoPt(jdstruc.JDPtStart, symbldrawing.depthbottom, jdstruc.JDtop, FrameDesign.ValueCoordinate);
                LJJSPoint       syblpos             = ZuoBiaoOper.GetMidPtBetweenTwoPt(sybltopZuoBiaoPt, syblbottomZuoBiaoPt);

                for (int j = 0; j < symbldrawing.sybolcodelist.Count; j++)
                {
                    double xscale   = 1;
                    double yscale   = 1;
                    string syblcode = symbldrawing.sybolcodelist[j].Trim();
                    if (syblcode != "n" && syblcode != "")
                    {
                        SymbolCodeClass sybloper = (SymbolCodeClass)HashUtil.FindObjByKey(syblcode, FillSymbolCode.SymbolCodeClassHt);
                        if (null == sybloper)
                        {
                            continue;
                        }

                        if (Math.Abs(sybloper.symbolHeigh) > 0.01 && sybloper.ifZXEnlarge)
                        {
                            yscale = Math.Abs(sybltopZuoBiaoPt.YValue - syblbottomZuoBiaoPt.YValue) / sybloper.symbolHeigh;
                        }

                        if ((Math.Abs(sybloper.symbolWidth) > 0.01) && symItemDesignStruc.SyblIfHorFill)
                        {
                            xscale = this.lineRoadEnvironment.LineRoadWidth / sybloper.symbolWidth;
                        }
                        if (symItemDesignStruc.SymbolFramePro == SymbolFrame.DoubleParallel)
                        {
                            Line.BuildCommonHorLineByLayer(sybltopZuoBiaoPt, lineRoadEnvironment.LineRoadWidth, 0, DrawCommonData.DirectionRight);
                            //.AddContinusHorLine(sybltopZuoBiaoPt, lineRoadEnvironment.LineRoadWidth, 0);
                            Line.BuildCommonHorLineByLayer(syblbottomZuoBiaoPt, lineRoadEnvironment.LineRoadWidth, 0, DrawCommonData.DirectionRight);
                        }
                        //    AddJoinAdjustItemObjId(CommonDrawing.InsertSymbolItem(sybloper.symbolcode, xscale, yscale, syblpos));
                        SymbolAdd.InsertBlock(sybloper.symbolcode, xscale, yscale, syblpos);
                    }
                }
            }
        }
Пример #5
0
        private void AddYXPouMianToFigure(JDStruc jdstruc, List <SymbolItemStruc> yxpmStrucLst)
        {
            for (int i = 0; i < yxpmStrucLst.Count; i++)
            {
                SymbolItemStruc symbldrawing        = yxpmStrucLst[i];
                LJJSPoint       sybltopZuoBiaoPt    = ZuoBiaoOper.GetJSZuoBiaoPt(jdstruc.JDPtStart, symbldrawing.depthtop, jdstruc.JDtop, FrameDesign.ValueCoordinate);
                LJJSPoint       syblbottomZuoBiaoPt = ZuoBiaoOper.GetJSZuoBiaoPt(jdstruc.JDPtStart, symbldrawing.depthbottom, jdstruc.JDtop, FrameDesign.ValueCoordinate);
                LJJSPoint       syblpos             = ZuoBiaoOper.GetMidPtBetweenTwoPt(sybltopZuoBiaoPt, syblbottomZuoBiaoPt);

                for (int j = 0; j < symbldrawing.sybolcodelist.Count; j++)
                {
                    double xscale   = 1;
                    double yscale   = 1;
                    string syblcode = symbldrawing.sybolcodelist[j].Trim();
                    if (syblcode != "n" && syblcode != "")
                    {
                        SymbolCodeClass sybloper = (SymbolCodeClass)FillSymbolCode.SymbolCodeClassHt[syblcode];
                        if (null == sybloper)
                        {
                            continue;
                        }
                        if (sybloper.ifZXEnlarge)
                        {
                            yscale = Math.Abs(sybltopZuoBiaoPt.YValue - syblbottomZuoBiaoPt.YValue);
                        }
                        else if (sybloper.ifFill)
                        {
                            xscale = sybloper.symbolWidth;
                            yscale = Math.Abs(sybltopZuoBiaoPt.YValue - syblbottomZuoBiaoPt.YValue);
                        }
                        if (sybloper.symbolWidth > 0)
                        {
                            Rect.AddBlackRect(syblbottomZuoBiaoPt, Math.Abs(syblbottomZuoBiaoPt.YValue - sybltopZuoBiaoPt.YValue), sybloper.symbolWidth, 0, new DrawDirection(1, 1));
                        }

                        SymbolAdd.InsertBlock(sybloper.symbolcode, xscale, yscale, syblpos);
                    }
                }
            }
        }
Пример #6
0
        public override List <ulong> AddTextItemToFigure(JDStruc jdstruc, List <TextItemDrawStruc> textItemDrawStrucCol)
        {
            for (int i = 0; i < textItemDrawStrucCol.Count; i++)
            {
                TextItemDrawStruc currtidrawstruc = textItemDrawStrucCol[i];
                LJJSPoint         titopZuoBiaoPt  = ZuoBiaoOper.GetJSZuoBiaoPt(jdstruc.JDPtStart
                                                                               , currtidrawstruc.depthtop, jdstruc.JDtop, FrameDesign.ValueCoordinate);//获取小段顶坐标

                LJJSPoint tibottomZuoBiaoPt = ZuoBiaoOper.GetJSZuoBiaoPt(jdstruc.JDPtStart
                                                                         , currtidrawstruc.depthbottom, jdstruc.JDtop, FrameDesign.ValueCoordinate);//获取小段底坐标

                //如果是横向排列则用线道宽度,如果是纵向排列需要分析小井段厚度
                AddTxtItemDrawStrucToFigure(titopZuoBiaoPt, tibottomZuoBiaoPt
                                            , currtidrawstruc, lineRoadWidth, Math.Abs(titopZuoBiaoPt.YValue - tibottomZuoBiaoPt.YValue), textItemStruct, lineRoadWidth);

                if (textItemStruct.TextOutFrame == TxtItemOutFrame.DoubleParallel)//如果类型为双平行线类型则绘制双平行线
                {
                    TextItemOper.AddTiOutFrameParelLine(titopZuoBiaoPt, tibottomZuoBiaoPt, textItemStruct.TIOffset, textItemStruct.TxtOutFrameWidth);
                }
            }
            return(new List <ulong>());
        }
        private double AddJSMainKDLine(JDStruc jdStruc, LJJSPoint tmpptstart, JingShenDesignClass jingShenDesignStruc, int jstop, double mainKDSpace, double minusVal)
        {
            double minMainKDPtJs;
            double biaoZhuJS;

            if (minusVal < mainKDSpace)
            {
                minMainKDPtJs = jstop + mainKDSpace;
            }
            else
            {
                minMainKDPtJs = jstop + 1;
            }
            biaoZhuJS = minMainKDPtJs;
            List <LJJSPoint> dengfenptarr = new List <LJJSPoint>();

            LJJSPoint minMainKDPt = ZuoBiaoOper.GetJSZuoBiaoPt(tmpptstart, minMainKDPtJs, jdStruc.JDtop, FrameDesign.ValueCoordinate);

            dengfenptarr.Add(minMainKDPt);
            dengfenptarr.AddRange(ZuoBiaoOper.GetZongXiangDengFenPtArr(minMainKDPt, -1, jdStruc.JDHeight - Math.Abs(minMainKDPt.YValue - tmpptstart.YValue), jingShenDesignStruc.MainKDSpace));

            for (int i = 0; i < dengfenptarr.Count(); i++)
            {
                //1,绘制主刻度线;
                Line.BuildHorToRightBlackSolidLine(dengfenptarr[i], jingShenDesignStruc.MainKDLength, _lineRoadModel.ZhengMiLineWidth, "");

                //2,添加井深标注;
                int tmp = i % jingShenDesignStruc.BiaoZhuSpace;
                if (tmp.Equals(0))
                {
                    DrawPerJDJSZMLineBiaoZhu(dengfenptarr[i], biaoZhuJS);   //画右侧刻度的井深depth标注
                }
                biaoZhuJS = biaoZhuJS + mainKDSpace;
            }
            ifAddBiaoZhu = true;
            return(minMainKDPtJs);
        }
        public override List <ulong> AddTextItemToFigure(JDStruc jdstruc, List <TextItemDrawStruc> textItemDrawStrucCol)
        {
            List <TextItemDrawStruc> yshebinglist = GetHeBingTiYSList(textItemDrawStrucCol);//获取新的泛型

            double          lasthd         = 10;
            LJJSPoint       lastbottomzbpt = jdstruc.JDPtStart;            //井段内的井段起始点
            AttachmentPoint bzpos          = AttachmentPoint.MiddleCenter; //定义文本项位置
            LJJSPoint       inserttxtpos;                                  //插入文本项位置

            double txtoffset = 2;

            double txtwidth = lineRoadWidth - 2 * txtoffset;

            for (int i = 0; i < yshebinglist.Count; i++)
            {
                TextItemDrawStruc currtidrawstruc   = yshebinglist[i];
                LJJSPoint         titopZuoBiaoPt    = ZuoBiaoOper.GetJSZuoBiaoPt(jdstruc.JDPtStart, currtidrawstruc.depthtop, jdstruc.JDtop, FrameDesign.ValueCoordinate);
                LJJSPoint         tibottomZuoBiaoPt = ZuoBiaoOper.GetJSZuoBiaoPt(jdstruc.JDPtStart, currtidrawstruc.depthbottom, jdstruc.JDtop, FrameDesign.ValueCoordinate);


                if (Math.Abs(titopZuoBiaoPt.YValue - tibottomZuoBiaoPt.YValue) > textItemStruct.TxtSize * 1.2)
                {
                    bzpos = AttachmentPoint.MiddleCenter;

                    inserttxtpos = new LJJSPoint(titopZuoBiaoPt.XValue + lineRoadWidth * 0.5, (tibottomZuoBiaoPt.YValue + titopZuoBiaoPt.YValue) * 0.5);
                }
                else
                {
                    if (bzpos == AttachmentPoint.MiddleLeft)
                    {
                        bzpos        = AttachmentPoint.MiddleRight;
                        inserttxtpos = PointUtil.GetRightInsertTxtPt(titopZuoBiaoPt, tibottomZuoBiaoPt, 3, lineRoadWidth);
                    }
                    else
                    {
                        bzpos        = AttachmentPoint.MiddleLeft;
                        inserttxtpos = PointUtil.GetLeftInsertTxtPt(titopZuoBiaoPt, tibottomZuoBiaoPt, 3);
                    }
                }
                MText.AddMText(currtidrawstruc.textcontent.Trim(), "", inserttxtpos, bzpos, textItemStruct.TxtFont, txtwidth + 0.5, 0.6);

                // MText.AddMText(currtidrawstruc.textcontent.Trim(), textItemStruct.TxtSize, inserttxtpos, bzpos, textItemStruct.TxtFont, txtwidth + 0.5, 0.6);
                if (Math.Abs(lastbottomzbpt.YValue - titopZuoBiaoPt.YValue) > 0.001)//是起头
                {
                    lasthd = 10;
                    if (lasthd < textItemStruct.TxtSize * 1.2)
                    {
                        BiaoZhuLineUtil.AddHorBZLine(lastbottomzbpt, txtoffset, lineRoadWidth, 0);//画上段剖面的终点的标注线;
                    }
                    else
                    {
                        Line.BuildCommonHorSolidLineByLayer(lastbottomzbpt, lineRoadWidth, 0, DrawCommonData.DirectionRight);
                    }
                }
                if (Math.Abs(titopZuoBiaoPt.YValue - tibottomZuoBiaoPt.YValue) < textItemStruct.TxtSize * 1.2 || lasthd < textItemStruct.TxtSize * 1.2)
                {
                    BiaoZhuLineUtil.AddHorBZLine(titopZuoBiaoPt, txtoffset, lineRoadWidth, 0);
                }
                else
                {
                    Line.BuildCommonHorSolidLineByLayer(titopZuoBiaoPt, lineRoadWidth, 0, DrawCommonData.DirectionRight);
                }
                lastbottomzbpt = tibottomZuoBiaoPt;
                lasthd         = Math.Abs(titopZuoBiaoPt.YValue - tibottomZuoBiaoPt.YValue);
            }
            Line.BuildCommonHorSolidLineByLayer(lastbottomzbpt, lineRoadWidth, 0, DrawCommonData.DirectionRight);
            return(new List <ulong>());
        }