Example #1
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));
        }
Example #2
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);
                    }
                }
            }
        }
Example #3
0
        private void AddPerYYWZHatch(string yYWZ, double gWJS, double T2jzz, double jdTop)
        {
            double gwjsZuoBiaoY = ZuoBiaoOper.GetJSZongZBValue(ptStart.YValue, gWJS, jdTop, FrameDesign.ValueCoordinate);
            string subsql       = this.hcgzItemDesignStruc.ClosedArea_Field_YYWZ + @"='" + yYWZ + @"'";

            if (null != kdcItem)
            {
                double           sfsStartX = kdcItem.KMin;
                double           sfsEndX   = T2jzz;
                double           kdsStartX = T2jzz;
                double           kdsEndX   = kdcItem.KMax;
                List <LJJSPoint> sfslst    = GetClosedAreaDRS(sfsStartX, sfsEndX, kdcItem, subsql, gwjsZuoBiaoY);
                double           xt2       = DuiShuOper.XGetDSZuoBiaoValue(ptStart.XValue, 1, kdcItem.KParm, T2jzz, kdcItem.KMin);
                double           ytmp      = endy;
                List <LJJSPoint> kdslst    = GetClosedAreaDRS(kdsStartX, kdsEndX, kdcItem, subsql, gwjsZuoBiaoY);

                kdslst.Add(new LJJSPoint(xt2, gwjsZuoBiaoY));
                double ytmpkd = starty;

                sfslst.Add(new LJJSPoint(xt2, (ytmp + ytmpkd) * 0.5 * HCGZLTXiShu + gwjsZuoBiaoY));
                sfslst.Add(new LJJSPoint(xt2, gwjsZuoBiaoY));
                kdslst.Add(new LJJSPoint(xt2, (ytmp + ytmpkd) * 0.5 * HCGZLTXiShu + gwjsZuoBiaoY));

                AreaHatch.AddStandardAreaHatch(DrawCommonData.activeDocument, sfslst, this.hcgzItemDesignStruc.SFLTColor, this.hcgzItemDesignStruc.SFLTColor);
                AreaHatch.AddStandardAreaHatch(DrawCommonData.activeDocument, kdslst, hcgzItemDesignStruc.KDLTColor, hcgzItemDesignStruc.KDLTColor);
            }
        }
        private LJJSPoint GetDuiShuPointZB(KeDuChiItem duiShuKDC, double yvalue, Hashtable drawht, JDStruc jdstruc, LJJSPoint lrptstart)
        {
            double xvalue = (double)drawht[yvalue];

            double Xpt = DuiShuOper.XGetDSZuoBiaoValue(lrptstart.XValue, duiShuKDC.KDir, duiShuKDC.KParm, xvalue, duiShuKDC.KMin);
            double Ypt = ZuoBiaoOper.GetJSZongZBValue(jdstruc.JDPtStart.YValue, yvalue, jdstruc.JDtop, FrameDesign.ValueCoordinate);

            return(new LJJSPoint(Xpt, Ypt));
        }
 private void DrawDuiShuStickLine(LJJSPoint jdStartPt, KeDuChiItem kdc, double xVal, double yVal, double jdStartJS)
 {
     ZuoBiaoOper zbopp   = new ZuoBiaoOper(FrameDesign.ValueCoordinate);
     double      duishuX = DuiShuOper.XGetDSZuoBiaoValue(jdStartPt.XValue, kdc.KDir, kdc.KParm, xVal, kdc.KMin);
     double      duishuY = ZuoBiaoOper.GetJSZongZBValue(jdStartPt.YValue, yVal, jdStartJS, FrameDesign.ValueCoordinate);
     LJJSPoint   ptend   = new LJJSPoint(duishuX, duishuY);
     LJJSPoint   ptstart = new LJJSPoint(jdStartPt.XValue, ptend.YValue);
     ulong       objid   = Line.BuildCommonSoldLine(ptstart, ptend, Color.Black.ToArgb(), kdc.kLineWidth);
     //
 }
Example #6
0
        private void AddDuiShuiKDCBZLineToFigure(LJJSPoint ptStart, double kdclen)
        {
            double tmpxstart = ptStart.XValue;
            double tmpystart = ptStart.YValue;
            double duishuX   = _KMin;


            LJJSPoint tmpkdstartpt, tmpkdendpt;

            double duibilen = 0;//相对于起点的位移;


            while ((Math.Abs(duibilen)) <= kdclen)
            {
                for (int i = 2; i <= 10; i++)
                {
                    int    tencount = DuiShuOper.GetTenCount(duishuX);
                    double AddSpace = Math.Pow(10, tencount);//增加量;
                    duishuX  = duishuX + AddSpace;
                    duibilen = _KDir * _KParm * (Math.Log10(duishuX) - Math.Log10(_KMin));
                    if ((Math.Abs(duibilen)) <= kdclen)
                    {
                        tmpxstart    = ptStart.XValue + duibilen;
                        tmpkdstartpt = new LJJSPoint(tmpxstart, tmpystart);
                        tmpkdendpt   = new LJJSPoint(tmpxstart, tmpystart + _kdPosition * _kdLineLen);
                        Line.BuildCommonSoldLine(tmpkdstartpt, tmpkdendpt, _KCol, _kLineWidth);
                        //ArxCSHelper.AddPolyline2d(tmpkdstartpt, tmpkdendpt, _kLineWidth);
                        if (i == 10)
                        {
                            LJJSText.AddHorCommonText(duishuX.ToString(), tmpkdendpt, _KCol, AttachmentPoint.BottomCenter, _BZTextSize, _bzTextStyle);
                            //  ArxCSHelper.AddMText(duishuX.ToString(), _BZTextSize, tmpkdendpt, AttachmentPoint.BottomCenter, _bzTextStyle);
                        }
                    }
                }
            }

            LJJSPoint bzptstart;

            if (_KDir.Equals(1))// 正向;
            {
                bzptstart = new LJJSPoint(ptStart.XValue + 0.5, ptStart.YValue + _kdLineLen);

                LJJSText.AddHorCommonText(_KMin.ToString(), bzptstart, _KCol, AttachmentPoint.BottomLeft, _BZTextSize, _bzTextStyle);
                //  ArxCSHelper.AddMText(_KMin.ToString(), _BZTextSize, bzptstart, AttachmentPoint.BottomLeft, _bzTextStyle);
            }
            else//反向;
            {
                bzptstart = new LJJSPoint(ptStart.XValue - 0.5, ptStart.YValue + _kdLineLen);
                LJJSText.AddHorCommonText(_KMin.ToString(), bzptstart, _KCol, AttachmentPoint.BottomRight, _BZTextSize, _bzTextStyle);
                //   ArxCSHelper.AddMText(_KMin.ToString(), _BZTextSize, bzptstart, AttachmentPoint.BottomRight, _bzTextStyle);
            }
        }
Example #7
0
        private LJJSPoint GetVerBoundaryStartPt(double xstart, double fenjieValue)
        {
            double xvalue = xstart;

            if (kdcItem.KStyle.Equals(KDCStyle.DuiShu))
            {
                xvalue = DuiShuOper.XGetDSZuoBiaoValue(xstart, kdcItem.KDir, kdcItem.KParm, fenjieValue, kdcItem.KMin);
            }
            else
            {
                xvalue = ZuoBiaoOper.XGetZuoBiaoValue(xstart, kdcItem, fenjieValue, this.lineRoadEnvironment.LineRoadWidth);
            }
            LJJSPoint startPt = new LJJSPoint(xvalue, this.LineRoadStartPt.YValue);

            return(startPt);
        }
        private List <LJJSPoint> GetClosedAreaDRS(KeDuChiItem kdc, string subsql, double gwjsYZuoBiao, LJJSPoint ptStart)
        {
            List <LJJSPoint> rev = new List <LJJSPoint>();

            DataRow[] drs = ClosedAreaDataTb.Select(subsql, itemDesignStruc.ClosedArea_Field_X + " ASC");
            if (null != drs && drs.Count() > 0)
            {
                foreach (DataRow dr in drs)
                {
                    double x   = (double)dr[itemDesignStruc.ClosedArea_Field_X];
                    double y   = gwjsYZuoBiao + (double)dr[itemDesignStruc.ClosedArea_Feild_Y] * StandardHCGZItemBuilder.HCGZLTXiShu;
                    double xzb = DuiShuOper.XGetDSZuoBiaoValue(ptStart.XValue, kdc.KDir, kdc.KParm, x, kdc.KMin);
                    rev.Add(new LJJSPoint(xzb, y));
                }
            }
            return(rev);
        }
Example #9
0
        private List <LJJSPoint> GetClosedAreaDRS(double startX, double endX, KeDuChiItem kdc, string subsql, double gwjsYZuoBiao)
        {
            List <LJJSPoint> rev = new List <LJJSPoint>();

            if (endX > startX)
            {
                subsql = subsql + " and " + hcgzItemDesignStruc.ClosedArea_Field_X + ">" + startX + " and " + hcgzItemDesignStruc.ClosedArea_Field_X + "<" + endX;
            }
            DataRow[] drs = hcgzClosedAreaDataTb.Select(subsql, hcgzItemDesignStruc.ClosedArea_Field_X + " ASC");
            if (null != drs && drs.Count() > 0)
            {
                starty = (double)drs[0][hcgzItemDesignStruc.ClosedArea_Feild_Y];
                endy   = (double)drs[drs.Length - 1][hcgzItemDesignStruc.ClosedArea_Feild_Y];
                foreach (DataRow dr in drs)
                {
                    double x   = (double)dr[hcgzItemDesignStruc.ClosedArea_Field_X];
                    double y   = gwjsYZuoBiao + (double)dr[hcgzItemDesignStruc.ClosedArea_Feild_Y] * HCGZLTXiShu;
                    double xzb = DuiShuOper.XGetDSZuoBiaoValue(ptStart.XValue, 1, kdc.KParm, x, kdc.KMin);
                    rev.Add(new LJJSPoint(xzb, y));
                }
            }
            return(rev);
        }