Ejemplo n.º 1
0
        /// <summary>
        /// 用来计算比例尺换算后的数值
        /// </summary>
        /// <param name="orignalData"></param>
        /// <returns></returns>
        public double calculateDataValue(double orignalData)
        {
            double          data;
            ScaleConversion scale = new ScaleConversion();

            return(data = scale.getPaintNumber(orignalData, plottingScale));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 给最后一行花纹库进行比例尺转换
        /// </summary>
        /// <param name="height"></param>
        /// <returns></returns>
        public double scaleConversionForLastPattern(double height)
        {
            ScaleConversion scale = new ScaleConversion();

            height = scale.getPaintNumber(height, plottingScale);
            return(height);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 添加花纹库的方法
        /// </summary>
        public void addPattern(string mrockName, double startDeep, double endDeep)
        {
            mPatternLibrary pattern = new mPatternLibrary();

            ScaleConversion scale = new ScaleConversion();

            startDeep = scale.getPaintNumber(startDeep, plottingScale);
            endDeep   = scale.getPaintNumber(endDeep, plottingScale);
            //调用添加花纹的方法
            pattern.getPattern(model, mrockName, startDeep, endDeep);
        }
Ejemplo n.º 4
0
        protected void DrawWave(DataTable dt, DxfModel model, DxfBlock block)
        {
            for (int i = 1; i < dt.Rows.Count; i++)
            {
                //高度换算比例尺
                ScaleConversion dac = new ScaleConversion();

                double spY = dac.getPaintNumber(double.Parse(dt.Rows[i - 1][0].ToString()), 500); //起始点x 深度
                double spX = double.Parse(dt.Rows[i - 1][1].ToString()) / 1000;                   //起始点y 波速

                double epY = dac.getPaintNumber(double.Parse(dt.Rows[i][0].ToString()), 500);     //结束点x
                double epX = double.Parse(dt.Rows[i][1].ToString()) / 1000;                       //结束点y

                DxfLineType drillCodeLineType = new DxfLineType("TestLine1" + i);
                model.LineTypes.Add(drillCodeLineType);
                DxfLine drillCodeine = new DxfLine();
                drillCodeine.Start = new Point3D(134 + spX * 5, -23 - spY, 0d);
                drillCodeine.End   = new Point3D(134 + epX * 5, -23 - epY, 0d);
                //drillCodeine.Color = EntityColors.Gray;
                drillCodeine.LineType = drillCodeLineType;
                block.Entities.Add(drillCodeine);
            }
        }