예제 #1
0
 public CurveHatch(JDStruc jdstruc, KeDuChiItem keDuChiItem, double lineRoadWidth)
 {
     this._jdstruc       = jdstruc;
     this._keDuChiItem   = keDuChiItem;
     this._jdptstart     = ZuoBiaoOper.UpdateLRStartPt(keDuChiItem.KDir, jdstruc.JDPtStart, lineRoadWidth);//根据刻度尺方向获得起点;
     this._lineRoadWidth = lineRoadWidth;
 }
예제 #2
0
        public static bool TestBoundaryCurve(List <LJJSPoint> boundaryCurve)
        {
            if (null == boundaryCurve)
            {
                return(false);
            }

            List <LJJSPoint> tmplst = new List <LJJSPoint>();

            for (int i = 0; i < boundaryCurve.Count; i++)
            {
                LJJSPoint tmp = boundaryCurve[i];
                if (null != tmp)
                {
                    tmplst.Add(tmp);
                }
            }
            if (tmplst.Count < 2)
            {
                return(false);
            }
            else
            {
                boundaryCurve = tmplst;
            }

            return(true);
        }
예제 #3
0
        /// <summary>
        /// 添加测网的内部线
        /// </summary>
        /// <param name="horSpace">测网横线间距</param>
        private void DrawPerJDCewang(LJJSPoint ptstart, double cewangSpace, double jdHeigh)
        {
            int       horlinecount = (int)(jdHeigh / cewangSpace);
            int       verlinecount = (int)(_lineRoadModel.LineRoadWidth / cewangSpace);
            LJJSPoint tmpptStart   = ptstart;
            LJJSPoint tmpcwstartpt;
            double    tmpxstart;
            int       dscwDir = 1;

            if (_lineRoadModel.Cewang.cewangstyle.Equals(CeWangStyleEnum.DuiShuZhengXiang) || _lineRoadModel.Cewang.cewangstyle.Equals(CeWangStyleEnum.DuiShuFanXiang))
            {
                if (_lineRoadModel.Cewang.cewangstyle.Equals(CeWangStyleEnum.DuiShuFanXiang))
                {
                    dscwDir    = -1;
                    tmpptStart = new LJJSPoint(ptstart.XValue + _lineRoadModel.LineRoadWidth, ptstart.YValue);
                }
                double duishuX  = _lineRoadModel.Cewang.duishuminvalue;
                double duibilen = 0;//相对于起点的位移;
                while ((Math.Abs(duibilen)) <= _lineRoadModel.LineRoadWidth)
                {
                    for (int i = 2; i <= 10; i++)
                    {
                        int    tencount = DuiShuOper.GetTenCount(duishuX);
                        double AddSpace = Math.Pow(10, tencount);//增加量;
                        duishuX  = duishuX + AddSpace;
                        duibilen = dscwDir * _lineRoadModel.Cewang.duishuParam * (Math.Log10(duishuX) - Math.Log10(_lineRoadModel.Cewang.duishuminvalue));
                        if ((Math.Abs(duibilen)) <= _lineRoadModel.LineRoadWidth)
                        {
                            tmpxstart    = tmpptStart.XValue + duibilen;
                            tmpcwstartpt = new LJJSPoint(tmpxstart, ptstart.YValue);
                            Line.BuildVerLine(tmpcwstartpt, jdHeigh, FrameDesign.PictureFrameLineWidth, DrawCommonData.BlackColorRGB, DrawCommonData.CeWangLineStyle, "", DrawCommonData.DirectionDown);
                        }
                    }
                }
                if (_lineRoadModel.Cewang.ifHeng)
                {
                    for (int i = 1; i <= horlinecount; i++)
                    {
                        Line.BuildToRightHorLine(new LJJSPoint(ptstart.XValue, ptstart.YValue - cewangSpace * i), _lineRoadModel.LineRoadWidth, FrameDesign.PictureFrameLineWidth, DrawCommonData.BlackColorRGB, DrawCommonData.CeWangLineStyle, "");
                    }
                }
            }
            else
            {
                if (_lineRoadModel.Cewang.ifHeng)
                {
                    for (int i = 1; i <= horlinecount; i++)
                    {
                        Line.BuildToRightHorLine(new LJJSPoint(ptstart.XValue, ptstart.YValue - cewangSpace * i), _lineRoadModel.LineRoadWidth, FrameDesign.PictureFrameLineWidth, DrawCommonData.BlackColorRGB, DrawCommonData.CeWangLineStyle, "");
                    }
                }
                if (_lineRoadModel.Cewang.ifZong)
                {
                    for (int j = 1; j <= verlinecount; j++)
                    {
                        Line.BuildVerLine(new LJJSPoint(ptstart.XValue + cewangSpace * j, ptstart.YValue), jdHeigh, FrameDesign.PictureFrameLineWidth, DrawCommonData.BlackColorRGB, DrawCommonData.CeWangLineStyle, "", DrawCommonData.DirectionDown);
                    }
                }
            }
        }
        /// <summary>
        /// 添加普通类型的棒线,是与对数类型相区别;
        /// </summary>
        /// <param name="jdstruc">绘制棒线的井段范围</param>
        /// <param name="drawht">绘制棒线的数据,hashtable的key为y值也就是井深,X为棒线的横向取值</param>
        private void AddNormalStickLineToFigure(JDStruc jdstruc, Hashtable drawht)
        {
            bool        ifinkdc  = false;
            double      jdtop    = jdstruc.JDtop;
            double      jdbottom = jdstruc.JDBottom;
            KeDuChiItem drawkdc;
            LJJSPoint   lrptstart;
            int         kdccount = m_KDCList.Count;

            foreach (DictionaryEntry de in drawht)
            {
                ifinkdc = false;
                double xval = (double)de.Value;
                for (int i = 0; i < m_KDCList.Count; i++)
                {
                    drawkdc = m_KDCList[i];
                    if (ZuoBiaoOper.IfInKeDuChi(xval, drawkdc))//假如棒线横向坐标值在刻度尺范围内则绘制棒线;
                    {
                        Layer.Layer_SetToCurrent(drawkdc.KName);
                        lrptstart = ZuoBiaoOper.UpdateLRStartPt(drawkdc.KDir, jdstruc.JDPtStart, lineRoadEnvironment.LineRoadWidth);
                        DrawStickLine(lrptstart, drawkdc, xval, (double)de.Key, jdtop);
                        ifinkdc = true;
                        break;
                    }
                }
                if (ifinkdc == false)//棒线横向坐标不再刻度吃范围内,添加超界标注;
                {
                    lrptstart = ZuoBiaoOper.UpdateLRStartPt(m_KDCList[kdccount - 1].KDir, jdstruc.JDPtStart, lineRoadEnvironment.LineRoadWidth);
                    if (lineItemStruct.LineItemChaoJie == CJQXChaoJie.BiaoZhu)//添加标注信息;
                    {
                        AddChaoJieBZ(xval, jdstruc.JDPtStart, (double)de.Key, jdstruc.JDtop, FrameDesign.ValueCoordinate, m_KDCList[kdccount - 1], lineRoadEnvironment.LineRoadWidth);
                    }
                }
            }
        }
        public static void Remove_Redundant_Point(LJJSPoint startPoint, List <LJJSPoint> list)
        {
            /**
             * Comparison<LJJSPoint> Sort_Dele = (a, b) =>
             * {
             *
             *  if (a.YValue > b.YValue)
             *  {
             *      return 1;
             *  }
             *  else if (a.YValue == b.YValue)
             *  {
             *      return 0;
             *  }
             *  else
             *  {
             *      return -1;
             *  }
             * };**/
            List <LJJSPoint> redund_list = MsehAndMsevContainer.same_YValue_PointsList(list);

            //redund_list.Sort(Sort_Dele);
            AddLineHatchManager.my_list_LJJSPOint_sort(redund_list);

            for (int ss = 0; ss < redund_list.Count - 1; ss++)
            {
                if (redund_list[ss].YValue == redund_list[ss + 1].YValue)
                {
                    list.Remove(redund_list[ss]);
                }
            }

            //list.Sort(Sort_Dele);
            AddLineHatchManager.my_list_LJJSPOint_sort(list);
        }
예제 #6
0
        public override List <ulong> BuildLineRoadTitleName()
        {
            string lineRoadName = lineRoadDrawingModel.LineRoadStruc.LineRoadName;

            if (string.IsNullOrEmpty(lineRoadName))
            {
                return(new List <ulong>());
            }
            lineRoadName = lineRoadName.Trim();

            double    PerWordSpace    = 5;
            double    xvalue          = this.lineRoadDrawingModel.PtStart.XValue + 0.5 * this.lineRoadDrawingModel.LineRoadStruc.LineRoadWidth;
            double    yend            = this.lineRoadDrawingModel.PtStart.YValue + DrawCommonData.DirectionUp * this.lineRoadDrawingModel.LineRoadStruc.LineroadTitleHeight;
            LJJSPoint titleEndPtStart = new LJJSPoint(xvalue, yend);

            string[] lrnamearr = lineRoadName.Split(perWordSplitter);
            if (null != lrnamearr && lrnamearr.Count() > 0)
            {
                for (int i = lrnamearr.Count(); i > 0; i--)
                {
                    LJJSText.AddHorCommonText(lrnamearr[i - 1], new LJJSPoint(xvalue, yend), Color.Black.ToArgb(), AttachmentPoint.BottomCenter, TextFontManage.LineRoadName);

                    yend = yend + FrameDesign.PictureItemTxtHeight * 1.6 + PerWordSpace;
                }
            }

            return(new List <ulong>());
        }
예제 #7
0
        private LJJSPoint GetLegendptStart(double xstart, double ystart, LegendPosStyle legendPos, LegendDrawStyle legendDrawStyle)
        {
            LJJSPoint ptstart;

            if (legendDrawStyle == LegendDrawStyle.HaveOutFrame)
            {
                if (legendPos == LegendPosStyle.BottomPos)
                {
                    ptstart = new LJJSPoint(xstart, ystart);
                }
                else
                {
                    ptstart = new LJJSPoint(xstart, ystart + (legendrownum * _legendunitheigh) * 2);
                }
            }
            else
            {
                legmaxwidth = GetLegendMaxWidth(symbolOperHt);
                double legoutframewidth = (noframecolspace + legmaxwidth + noframelegtxtwidth + noframetxtvslegspace) * _legendcolumn - noframecolspace;
                double ptstartX         = xstart + (_outframewidth - legoutframewidth) / 2;
                if (legendPos == LegendPosStyle.TopPos)
                {
                    ptstart = new LJJSPoint(ptstartX, ystart + legendrownum * _legendunitheigh + _NoframeLegendVSTitleHeigh);
                }
                else
                {
                    ptstart = new LJJSPoint(ptstartX, ystart - _NoframeLegendVSTitleHeigh);
                }
            }
            return(ptstart);
        }
예제 #8
0
        public static ulong AddRectImageHatch(LJJSPoint leftBottomInsertPt, double rectHeigh, double rectWidth, string imagePath, double hatchScale, List <StrValueProperty> additionImageLst)
        {
            vdXProperties tmppro        = new vdXProperties();
            gPoint        leftBottomPt  = new gPoint(leftBottomInsertPt.XValue, leftBottomInsertPt.YValue);
            gPoint        leftTopPt     = new gPoint(leftBottomInsertPt.XValue, leftBottomInsertPt.YValue + DrawCommonData.DirectionUp * rectHeigh);
            gPoint        rightBottomPt = new gPoint(leftBottomInsertPt.XValue + rectWidth * DrawCommonData.DirectionRight, leftBottomInsertPt.YValue);
            gPoint        rightTopPt    = new gPoint(leftBottomInsertPt.XValue + rectWidth * DrawCommonData.DirectionRight, leftBottomInsertPt.YValue + DrawCommonData.DirectionUp * rectHeigh);

            Vertexes hatchRect = new Vertexes();

            hatchRect.Add(leftBottomPt);
            hatchRect.Add(leftTopPt);
            hatchRect.Add(rightTopPt);
            hatchRect.Add(rightBottomPt);
            if (null != additionImageLst && additionImageLst.Count > 0)
            {
                for (int i = 0; i < additionImageLst.Count; i++)
                {
                    StrValueProperty tmp = additionImageLst[i];
                    if (!string.IsNullOrEmpty(tmp.PropertyName) && !string.IsNullOrEmpty(tmp.PropertyValue))
                    {
                        vdXProperty tmpproperty = new vdXProperty();
                        tmpproperty.Name      = tmp.PropertyName;
                        tmpproperty.PropValue = tmp.PropertyValue;
                        tmppro.AddItem(tmpproperty);
                    }
                }
            }
            return(VectorDrawHelper.AddHatchImageToFigure(DrawCommonData.activeDocument, hatchRect, "", imagePath, hatchScale, tmppro));
        }
        public override void DrawPerJDJSZMLineBiaoZhu(DrawingElement.LJJSPoint biaoZhuPosition, double BiaoZhuContent)
        {
            //  new LJJSPoint(dengfenptarr[i].XValue+jingShenDesignStruc.MainKDLength,dengfenptarr[i].YValue)
            //f (ifAddBiaoZhu)   ////??? nanikole?
            //return

            /**if(ifAddBiaoZhu == true)
             * {
             *  return;     //me ! me! me!
             * }**/



            if (this._lineRoadModel.IfLeftSecondKD && this._lineRoadModel.IfRightSecondKD)//左右都标有刻度;此时,标注中间位置;
            {
                LJJSPoint insPoint = new LJJSPoint(this._ptStart.XValue + 0.5 * this._lineroadwidth, biaoZhuPosition.YValue);
                //???
                LJJSText.AddHorCommonText(BiaoZhuContent.ToString(), insPoint, DrawCommonData.BlackColorRGB, AttachmentPoint.BottomCenter, jingShenDesignStruc.BZTxtHeigh, jingShenDesignStruc.BZTxtFont);
            }
            else if (this._lineRoadModel.IfLeftSecondKD)//左侧有次刻度,此时标注左侧;  //每次断点都走这里
            {
                LJJSPoint insPoint = new LJJSPoint(this._ptStart.XValue + jingShenDesignStruc.MainKDLength, biaoZhuPosition.YValue);
                LJJSText.AddHorCommonText(BiaoZhuContent.ToString(), insPoint, DrawCommonData.BlackColorRGB, AttachmentPoint.BottomLeft, jingShenDesignStruc.BZTxtHeigh, jingShenDesignStruc.BZTxtFont);
            }
            else if (this._lineRoadModel.IfRightSecondKD)//右侧有次刻度,此时标注右侧;
            {
                LJJSPoint insPoint = new LJJSPoint(this._ptStart.XValue + this._lineroadwidth - jingShenDesignStruc.MainKDLength, biaoZhuPosition.YValue);
                LJJSText.AddHorCommonText(BiaoZhuContent.ToString(), insPoint, DrawCommonData.BlackColorRGB, AttachmentPoint.BottomRight, jingShenDesignStruc.BZTxtHeigh, jingShenDesignStruc.BZTxtFont);
            }
        }
예제 #10
0
        public void InserLegendSymbol(LJJSPoint ptBase, double legendUnitWith, double legendUnitHeigh)
        {
            double xscale  = 1;
            double yscale  = 1;
            double xoffset = 0;

            if (_legendstyle == LegendStyle.SymbolStyle)
            {
                if (_symbolWidth > legendUnitWith)
                {
                    xscale = legendUnitWith / _symbolWidth;
                }
                if ((_symbolHeigh > legendUnitHeigh) || (_ifZXEnlarge))
                {
                    yscale = legendUnitHeigh / _symbolHeigh;
                }
                if (_symbolWidth + 0.05 < legendUnitWith)
                {
                    xoffset = (legendUnitWith - _symbolWidth) / 2;
                }
                LJJSPoint inserpos = new LJJSPoint(ptBase.XValue + xoffset, ptBase.YValue);
                SymbolAdd.InsertBlock(_symbolcode, xscale, yscale, inserpos);
            }
            else if (_legendstyle == LegendStyle.YSTxtStyle)
            {
                LJJSText.AddHorCommonText(_symbolcode, new LJJSPoint(ptBase.XValue + legendUnitWith * 0.5, ptBase.YValue), 0, AttachmentPoint.MiddleCenter, ystxtheigh, "宋体");
            }
        }
예제 #11
0
        private LJJSPoint GetDuiShuPointZB(KeDuChiItem duiShuKDC, LJJSPoint convertPt, JDStruc jdstruc, LJJSPoint lrptstart)
        {
            double Xpt = DuiShuOper.XGetDSZuoBiaoValue(lrptstart.XValue, duiShuKDC.KDir, duiShuKDC.KParm, convertPt.XValue, duiShuKDC.KMin);
            double Ypt = ZuoBiaoOper.GetJSZongZBValue(jdstruc.JDPtStart.YValue, convertPt.YValue, jdstruc.JDtop, FrameDesign.ValueCoordinate);

            return(new LJJSPoint(Xpt, Ypt));
        }
예제 #12
0
        //绘制图例;
        public override List <ulong> BuildLegendArea()
        {
            AddLegendArea addLegend = new AddLegendArea();

            legendEndPt = addLegend.LegendAreaBuild();
            return(null);
        }
예제 #13
0
        public static ulong BuildCommonHorSolidLineByLayer(LJJSPoint pStart, double lineWidth, double penWidth, int horDirection)
        {
            gPoint pEnd   = new gPoint(pStart.XValue + horDirection * lineWidth, pStart.YValue);
            gPoint pstart = new gPoint(pStart.XValue, pStart.YValue);

            return(VectorDrawHelper.CommonLineByLayer(DrawCommonData.activeDocument, pstart, pEnd, penWidth, "", DrawCommonData.SolidLineTypeName));
        }
예제 #14
0
        public static ulong BuildHorToRightSolidLine(LJJSPoint pStart, double lineWidth, double penWidth, int pColor, string pToolTip)
        {
            gPoint pEnd   = new gPoint(pStart.XValue + lineWidth, pStart.YValue);
            gPoint pstart = new gPoint(pStart.XValue, pStart.YValue);

            return(VectorDrawHelper.CommonLine(DrawCommonData.activeDocument, pstart, pEnd, penWidth, pColor, DrawCommonData.SolidLineTypeName, pToolTip));
        }
예제 #15
0
        public static ulong BuildCommonSoldLine(LJJSPoint ptStart, LJJSPoint ptEnd, int lineColor, double penWidth)
        {
            gPoint pStart = FigureStrucConvert.ConvertLJJSPointToGPoint(ptStart);
            gPoint pEnd   = FigureStrucConvert.ConvertLJJSPointToGPoint(ptEnd);

            return(VectorDrawHelper.CommonLine(DrawCommonData.activeDocument, pStart, pEnd, penWidth, lineColor, DrawCommonData.SolidLineTypeName, ""));
        }
예제 #16
0
        public static ulong BuildCommonLineByLayer(LJJSPoint ptStart, LJJSPoint ptEnd, double penWidth)
        {
            gPoint pStart = FigureStrucConvert.ConvertLJJSPointToGPoint(ptStart);
            gPoint pEnd   = FigureStrucConvert.ConvertLJJSPointToGPoint(ptEnd);

            return(VectorDrawHelper.CommonLineByLayer(DrawCommonData.activeDocument, pStart, pEnd, penWidth, "", ""));
        }
예제 #17
0
 public static void set_startpoint(LJJSPoint point)
 {
     if (SuiZuanForm.startpoint == null)
     {
         SuiZuanForm.startpoint = point;
     }
 }
예제 #18
0
        public static void VerSolidArrowLine(LJJSPoint pt1, double length, double pThickness, int direction, int Color, double arrowWidth, double arrowHeight)
        {
            LJJSPoint pt2 = new LJJSPoint(pt1.XValue, pt1.YValue + direction * length);

            Line.BuildVerLine(pt1, length, pThickness, Color, DrawCommonData.SolidLineTypeName, "", direction);
            VerSolidArrow(pt2, arrowWidth, arrowHeight, direction);
        }
예제 #19
0
        /// <summary>
        /// 方法:获取纵向等分点的坐标集合
        /// </summary>
        /// <param name="ptStart">起始点坐标</param>
        /// <param name="ZXDirection">参数:等分方向,向下时,ZXDirection为-1,向上时为1</param>
        /// <param name="ZXHeigh">参数:纵向的深度</param>
        /// <param name="dengFenLength">参数:等分长度</param>
        /// <returns></returns>
        public static List <LJJSPoint> GetZongXiangDengFenPtArr(LJJSPoint ptStart, int ZXDirection, double ZXHeigh, double dengFenLength)
        {
            List <LJJSPoint> ptarr = new List <LJJSPoint>();//定义新的点坐标集合
            //起始点赋值为坐标原点
            double xvalue = ptStart.XValue;
            double yvalue = ptStart.YValue;

            double tmpyvalue = ptStart.YValue + ZXDirection * dengFenLength; //临时变量:赋值为第一个等分点的坐标,其点纵坐标为+上第一个等分距离
            double endyvalue = ptStart.YValue + ZXDirection * ZXHeigh;       //设置等分线的最大值为起始点坐标+纵向的深度

            //eques方法提示:equals可以比较所有的对象和方法
            if (ZXDirection.Equals(1))//向上等分;
            {
                while (tmpyvalue < endyvalue)
                {
                    LJJSPoint tmppt = new LJJSPoint(xvalue, tmpyvalue);  //设置点横坐标为x初始值不变
                    ptarr.Add(tmppt);                                    //坐标集合内添加坐标点
                    tmpyvalue = tmpyvalue + ZXDirection * dengFenLength; //纵坐标继续加上长度集合
                }
            }
            else if (ZXDirection.Equals(-1))//向下等分,过程类似向上等分
            {
                while (tmpyvalue >= endyvalue)
                {
                    LJJSPoint tmppt = new LJJSPoint(xvalue, tmpyvalue);
                    ptarr.Add(tmppt);
                    tmpyvalue = tmpyvalue + ZXDirection * dengFenLength;
                }
            }
            return(ptarr);
        }
예제 #20
0
        /// <summary>
        /// 根据绘图的基点井深、基点坐标、刻度尺等内容获得绘制点在图幅上的坐标。
        /// </summary>
        /// <param name="jdStartPt">井段起始点坐标</param>
        /// <param name="kdc">绘制点所属的刻度尺</param>
        /// <param name="xVal">绘制点的X值(数据库中)</param>
        /// <param name="yVal">绘制点的Y值即井深(数据库中)</param>
        /// <param name="jdStartJS">基点对应的井深值</param>
        /// <returns></returns>
        public LJJSPoint GetDrawingZuoBiaoPt(LJJSPoint jdStartPt, KeDuChiItem kdc, double xVal, double yVal, double jdStartJS, double lRWidth)
        {
            double xvalue  = jdStartPt.XValue;
            double yvalue  = jdStartPt.YValue;
            double jsspace = Math.Abs(yVal - jdStartJS);

            if (jdStartJS < yVal)//所求点在基点下方;
            {
                yvalue = yvalue - jsspace * 1000 * _bilichivalue;
            }
            else
            {
                yvalue = yvalue + jsspace * 1000 * _bilichivalue;
            }
            double xtmpval;

            if (Math.Abs(kdc.KMax - kdc.KMin) > 0)
            {
                xtmpval = (xVal - kdc.KMin) / (kdc.KMax - kdc.KMin) * lRWidth;
                xvalue  = xvalue + kdc.KDir * xtmpval;
            }

            /**if(xvalue > 5)
             * {
             *  xvalue = 0;
             * }**/

            LJJSPoint pt = new LJJSPoint(xvalue, yvalue);

            return(pt);
        }
        //understand
        private LJJSPoint GetPtZBByKDC(KeDuChiItem drawkdc, LJJSPoint jdptstart, double xval, double yval, double jdtop)
        {
            ZuoBiaoOper zbopp     = new ZuoBiaoOper(FrameDesign.ValueCoordinate);
            LJJSPoint   lrptstart = ZuoBiaoOper.UpdateLRStartPt(drawkdc.KDir, jdptstart, LineRoadEnvironment.LineRoadWidth);

            return(zbopp.GetDrawingZuoBiaoPt(lrptstart, drawkdc, xval, yval, jdtop, LineRoadEnvironment.LineRoadWidth));
        }
예제 #22
0
        public override ulong BuildBiLiChi()
        {
            LJJSPoint pt          = new LJJSPoint(FrameDrawImpl.FrameWidth * 0.5, 5 + legendEndPt.YValue);//解析该绘图点的起始位置,距离高度仅仅为5
            int       headercolor = StrUtil.StrToInt(FrameDesign.CorTxtColor, DrawCommonData.BlackColorRGB, "比例尺颜色设计有误");

            return(LJJSText.AddHorCommonText(FrameDesign.CorValue, pt, headercolor, AttachmentPoint.BottomCenter, TextFontManage.BiLiChi));
        }
예제 #23
0
 public AddItemTitle(LJJSPoint lrPtStart, double lrWidth, string TitleContent, ItemTitlePos ItemTitlePos, string isShow)
 {
     this._lrPtStart    = lrPtStart;
     this._lrWidth      = lrWidth;
     this._titleContent = TitleContent;
     this._titlePos     = ItemTitlePos;
     this._isShow       = isShow;
 }
예제 #24
0
 public static LJJSPoint UpdateLRStartPt(int kdcDir, LJJSPoint LRStartPt, double LRWidth)
 {
     if (kdcDir.Equals(-1))
     {
         return(new LJJSPoint(LRStartPt.XValue + LRWidth, LRStartPt.YValue));
     }
     return(LRStartPt);
 }
예제 #25
0
 public void SetLineRoadEnvironment(LineRoadEnvironment lineRoadEnvironment)
 {
     this.lineRoadEnvironment = lineRoadEnvironment;
     if (null != this.lineRoadEnvironment && this.lineRoadEnvironment.JdDrawLst.Count() > 0)
     {
         this.lineRoadStartPt = this.lineRoadEnvironment.JdDrawLst[0].JDPtStart;
     }
 }
예제 #26
0
        /// <summary>
        /// 添加对数刻度尺
        /// </summary>
        /// <param name="ptStart"></param>
        /// <param name="ptEnd"></param>
        public void AddDuiShuKDCToFigure(LJJSPoint ptStart, LJJSPoint ptEnd)
        {
            double kdclen = Math.Abs(ptEnd.XValue - ptStart.XValue);

            AddDuiShuiKDCBZLineToFigure(ptStart, kdclen);

            AddMainLineToFigure(ptStart, ptEnd);
        }
 /// <summary>
 /// 绘制棒线
 /// </summary>
 /// <param name="kdc">棒线所属刻度尺</param>
 /// <param name="xVal">棒线终点对应的横向值(数据库中)</param>
 /// <param name="yVal">棒线终点对应的井深(数据库中)</param>
 private void DrawStickLine(LJJSPoint jdStartPt, KeDuChiItem kdc, double xVal, double yVal, double jdStartJS)
 {
     Layer.Layer_SetToCurrent(kdc.KName);
     ZuoBiaoOper zbopp   = new ZuoBiaoOper(FrameDesign.ValueCoordinate);
     LJJSPoint   ptend   = zbopp.GetDrawingZuoBiaoPt(jdStartPt, kdc, xVal, yVal, jdStartJS, lineRoadEnvironment.LineRoadWidth);
     LJJSPoint   ptstart = new LJJSPoint(jdStartPt.XValue, ptend.YValue);
     ulong       objid   = Line.BuildCommonLineByLayer(ptstart, ptend, kdc.kLineWidth);
 }
예제 #28
0
 /// <summary>
 /// 绘制双平行线
 /// </summary>
 /// <param name="topZbPt"></param>
 /// <param name="bottomZbPt"></param>
 public static void AddTiOutFrameParelLine(LJJSPoint topZbPt, LJJSPoint bottomZbPt, double textItemOffset, double txtOutFrameWidth)
 {
     //根据坐标顶部和外框线框画出一个外框
     Line.BuildCommonHorSolidLineByLayer(new LJJSPoint(topZbPt.XValue + textItemOffset, topZbPt.YValue), txtOutFrameWidth, 0, DrawCommonData.DirectionRight);
     // CommonDrawing.AddContinusHorLine(new LJJSPoint(topZbPt.XValue + textItemOffset, topZbPt.YValue), txtOutFrameWidth, 0);
     //根据坐标底部点和外框线框画出一个外框
     Line.BuildCommonHorSolidLineByLayer(new LJJSPoint(bottomZbPt.XValue + textItemOffset, bottomZbPt.YValue), txtOutFrameWidth, 0, DrawCommonData.DirectionRight);
     //   CommonDrawing.AddContinusHorLine(new LJJSPoint(bottomZbPt.XValue + textItemOffset, bottomZbPt.YValue), txtOutFrameWidth, 0);
 }
예제 #29
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;
            }
        }
예제 #30
0
 public LineRoadSurface(LineRoadDrawingModel lineRoadDrawingModel)
 {
     _lineRoadDrawingModel = lineRoadDrawingModel;
     _jdCount       = FrameDesign.JdStrLst.Count();
     _ptStart       = _lineRoadDrawingModel.PtStart;
     _lineRoadModel = lineRoadDrawingModel.LineRoadStruc;
     _jdLst         = lineRoadDrawingModel.LineRoadJdLst; //2560-2590 2660-2690
     _lineroadwidth = lineRoadDrawingModel.LineRoadStruc.LineRoadWidth;
 }