Пример #1
0
        private static DxfModel CreateModelWithAxes()
        {
            DxfModel model;
            model = new DxfModel();
            double width = 100d;
            double height = 100d;
            DxfLine xaxis = new DxfLine(new Point2D(0d, 0d), new Point2D(width, 0d));
            xaxis.Color = EntityColors.LightGray;
            model.Entities.Add(xaxis);

            DxfLine yaxis = new DxfLine(new Point2D(0d, 0d), new Point2D(0d, height));
            yaxis.Color = EntityColors.LightGray;
            model.Entities.Add(yaxis);

            DxfText originLabel = new DxfText("0", new Point3D(-1d, -1d, 0d), 0.5d);
            originLabel.Color = EntityColors.GreenYellow;
            model.Entities.Add(originLabel);

            DxfText xaxisLabel = new DxfText("10", new Point3D(width, -1d, 0d), 0.5d);
            xaxisLabel.Color = EntityColors.GreenYellow;
            model.Entities.Add(xaxisLabel);

            DxfText yaxisLabel = new DxfText("10", new Point3D(-1, height, 0d), 0.5d);
            yaxisLabel.Color = EntityColors.GreenYellow;
            model.Entities.Add(yaxisLabel);

            return model;
        }
Пример #2
0
        /// <summary>
        /// 绘制风扇
        /// </summary>
        /// <param name="dxf"></param>
        /// <param name="startPoint">风扇起点,如果为横置,由左向右;如果为竖置,由下到上</param>
        /// <param name="endPoint">风扇终点,如果为横置,由左向右;如果为竖置,由下到上</param>
        /// <param name="pointerDDLocation">箭头位置,默认=0为无,=1代表箭头在中间,=2代表箭头在底部</param>
        public static void Draw(DxfModel dxf, Point3D startPoint, Point3D endPoint, int pointerDDLocation = 0)
        {
            DxfLine DxfLine = new DxfLine(startPoint, endPoint);
            dxf.Entities.Add(DxfLine);

            //如果为横置
            if (startPoint.Y == endPoint.Y)
            {
                double segment = (endPoint.X - startPoint.X) / 4;
                Slash.Draw(dxf, new DLocation(startPoint.X + segment, startPoint.Y, startPoint.Z));
                Slash.Draw(dxf, new DLocation(startPoint.X + 2 * segment, startPoint.Y, startPoint.Z));
                Slash.Draw(dxf, new DLocation(startPoint.X + 3 * segment, startPoint.Y, startPoint.Z));
            }
            //如果为竖置
            else if (startPoint.X == endPoint.X)
            {
                double segment = (endPoint.Y - startPoint.Y) / 5;
                Slash.Draw(dxf, new DLocation(startPoint.X, startPoint.Y + segment, startPoint.Z));
                Slash.Draw(dxf, new DLocation(startPoint.X, startPoint.Y + 2 * segment, startPoint.Z));
                Slash.Draw(dxf, new DLocation(startPoint.X, startPoint.Y + 3 * segment, startPoint.Z));
                Slash.Draw(dxf, new DLocation(startPoint.X, startPoint.Y + 4 * segment, startPoint.Z));
                if (pointerDDLocation == 1)
                {
                    DxfLinePointer.Draw(dxf,new DLocation(startPoint.X,(startPoint.Y+endPoint.Y)/2,startPoint.Z));
                }
                else if(pointerDDLocation==2)
                {
                    DxfLinePointer.Draw(dxf, new DLocation(startPoint.X, startPoint.Y, startPoint.Z));
                }
            }
        }
Пример #3
0
        public static void Draw(DxfModel dxf, DLocation DLocation)
        {
            Point3D v1 = new Point3D(DLocation.X - 0.5d, DLocation.Y - 1.0d, DLocation.Z);
            Point3D v2 = new Point3D(DLocation.X + 0.5d, DLocation.Y + 1.0d, DLocation.Z);

            DxfLine DxfLine12 = new DxfLine(v1, v2);
            dxf.Entities.Add(DxfLine12);
        }
Пример #4
0
        public static void Draw(DxfModel dxf, DLocation DLocation)
        {
            Point3D v1 = new Point3D(DLocation.X - 2.0d, DLocation.Y + 4.0d, DLocation.Z);
            Point3D v2 = new Point3D(DLocation.X + 2.0d, DLocation.Y + 4.0d, DLocation.Z);
            Point3D v0=new Point3D(DLocation.X,DLocation.Y,DLocation.Z);

            DxfLine DxfLine10 = new DxfLine(v0, v1);
            dxf.Entities.Add(DxfLine10);

            DxfLine DxfLine20 = new DxfLine(v0, v2);
            dxf.Entities.Add(DxfLine20);
        }
Пример #5
0
        /// <summary>
        /// 风向绘制
        /// </summary>
        /// <param name="dxf"></param>
        /// <param name="DLocation"></param>
        /// <param name="isRight"></param>
        public static void Draw(DxfModel dxf, DLocation DLocation, bool isRight)
        {
            double factor = 0.5f;
            Point3D v1 = new Point3D();
            Point3D v2 = new Point3D();
            Point3D v3 = new Point3D();
            Point3D v4 = new Point3D();
            Point3D v5 = new Point3D();
            Point3D v6 = new Point3D();
            Point3D v7 = new Point3D();
            if (isRight)
            {
                v1 = new Point3D(10*factor + DLocation.X, DLocation.Y, DLocation.Z);
                v2 = new Point3D(DLocation.X, DLocation.Y + 10 * factor, DLocation.Z);
                v3 = new Point3D(DLocation.X + 10 * factor, DLocation.Y + 10 * factor, DLocation.Z);
                v4 = new Point3D(DLocation.X + 20 * factor, DLocation.Y + 15 * factor, DLocation.Z);
                v5 = new Point3D(DLocation.X, DLocation.Y + 20 * factor, DLocation.Z);
                v6 = new Point3D(DLocation.X + 10 * factor, DLocation.Y + 20 * factor, DLocation.Z);
                v7 = new Point3D(DLocation.X + 10 * factor, DLocation.Y + 30 * factor, DLocation.Z);
            }
            else
            {
                v1 = new Point3D(10 * factor + DLocation.X, DLocation.Y, DLocation.Z);
                v2 = new Point3D(DLocation.X + 20 * factor, DLocation.Y + 10 * factor, DLocation.Z);
                v3 = new Point3D(DLocation.X + 10 * factor, DLocation.Y + 10 * factor, DLocation.Z);
                v4 = new Point3D(DLocation.X, DLocation.Y + 15 * factor, DLocation.Z);
                v5 = new Point3D(DLocation.X + 20 * factor, DLocation.Y + 20 * factor, DLocation.Z);
                v6 = new Point3D(DLocation.X + 10 * factor, DLocation.Y + 20 * factor, DLocation.Z);
                v7 = new Point3D(DLocation.X + 10 * factor, DLocation.Y + 30 * factor, DLocation.Z);
            }
            DxfLine DxfLine23 = new DxfLine(v2, v3);
            dxf.Entities.Add(DxfLine23);

            DxfLine DxfLine56 = new DxfLine(v5, v6);
            dxf.Entities.Add(DxfLine56);

            DxfLine DxfLine14 = new DxfLine(v1, v4);
            dxf.Entities.Add(DxfLine14);

            DxfLine DxfLine74 = new DxfLine(v7, v4);
            dxf.Entities.Add(DxfLine74);

            DxfLine DxfLine25 = new DxfLine(v2, v5);
            dxf.Entities.Add(DxfLine25);

            DxfLine DxfLine71 = new DxfLine(v7, v1);
            dxf.Entities.Add(DxfLine71);
        }
Пример #6
0
        public static List<DxfEntity> Create(int xNum, int yNum, double xLen, double yLen, double thickness)
        {
            List<DxfEntity> entities = new List<DxfEntity>();
            List<List<Point2D>> ptsVector = new List<List<Point2D>>();
            for (int row = 0; row < yNum; row++)
            {
                List<Point2D> ptsSameRow = new List<Point2D>();
                bool isEvenLine = row % 2 == 0;
                double xOffset = isEvenLine ? xLen / 2.0 : 0;
                for (int col = 0; col < xNum; col++)
                {
                    double xPos = xOffset + col * xLen;
                    double yPos = row * yLen;
                    ptsSameRow.Add(new Point2D(xPos, yPos));
                }
                ptsVector.Add(ptsSameRow);
            }

            for (int r = 0; r < yNum - 1; r++)
            {
                List<Point2D> bottomRow = ptsVector[r];
                List<Point2D> upperRow = ptsVector[r+1];
                for (int c = 0; c < xNum; c++)
                {
                    bool isEvenLine = r % 2 == 0;
                    Point2D ptStart = bottomRow[c];
                    Point2D ptEnd1 = upperRow[c];
                    var line = new DxfLine(ptStart, ptEnd1);
                    line.Thickness = thickness;
                    line.Color = EntityColors.White;
                    entities.Add(line);

                    int ptEnd2Col = isEvenLine ? c + 1 : c - 1;
                    if (ptEnd2Col < 0 || ptEnd2Col >= xNum)
                        continue;
                    Point2D ptEnd2 = upperRow[ptEnd2Col];
                    line = new DxfLine(ptStart, ptEnd2);
                    line.Color = EntityColors.White;
                    line.Thickness = thickness;
                    entities.Add(line);
                }
            }
            return entities;
        }
Пример #7
0
        /// <summary>
        /// 单门有两门闩,和俩个把手的
        /// </summary>
        /// <param name="doc"></param>
        /// <param name="DLocation"></param>
        /// <param name="DxfText"></param>
        /// <param name="height"></param>
        /// <param name="width"></param>
        /// <param name="outer_mid_space"></param>
        /// <param name="outer_in_space"></param>
        /// <param name="barHeight"></param>
        /// <param name="barWidth"></param>
        public static void writeWholeSingleTwoBarAndTwoCirle(DxfModel doc, DLocation DLocation, string[] DxfText, double height, double width, double outer_mid_space, double outer_in_space,double barHeight,double barWidth)
        {
            DxfLine outerLeftDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 - width / 14, DLocation.Y + outer_mid_space, DLocation.Z), new Point3D(DLocation.X + width / 2 - width / 14, DLocation.Y + height - outer_mid_space, DLocation.Z));

            DxfLine inLeftDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 - width / 14 + 0.5f, DLocation.Y + outer_in_space, DLocation.Z), new Point3D(DLocation.X + width / 2 - width / 14 + 0.5f, DLocation.Y + height - outer_in_space, DLocation.Z));

            DxfLine inDownRightDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 + width / 14, DLocation.Y + outer_in_space, DLocation.Z), new Point3D(DLocation.X + width / 2 + width / 14, DLocation.Y + height / 4, DLocation.Z));

            DxfLine inMidRightDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 + width / 14, DLocation.Y + height / 4 + barHeight, DLocation.Z), new Point3D(DLocation.X + width / 2 + width / 14, DLocation.Y + 3 * height / 4 - barHeight, DLocation.Z));

            DxfLine inUpRightDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 + width / 14, DLocation.Y + 3 * height / 4, DLocation.Z), new Point3D(DLocation.X + width / 2 + width / 14, DLocation.Y + height - outer_in_space, DLocation.Z));

            DxfLine outerDownRightDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 + width / 14 + 0.5f, DLocation.Y + outer_mid_space, DLocation.Z), new Point3D(DLocation.X + width / 2 + width / 14 + 0.5f, DLocation.Y + height / 4, DLocation.Z));

            DxfLine outerMidRightDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 + width / 14 + 0.5f, DLocation.Y + height / 4 + barHeight, DLocation.Z), new Point3D(DLocation.X + width / 2 + width / 14 + 0.5f, DLocation.Y + 3 * height / 4 - barHeight, DLocation.Z));

            DxfLine outerUpRightDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 + width / 14 + 0.5f, DLocation.Y + 3 * height / 4, DLocation.Z), new Point3D(DLocation.X + width / 2 + width / 14 + 0.5f, DLocation.Y + height - outer_in_space, DLocation.Z));

            doc.Entities.Add(outerLeftDxfLine);
            doc.Entities.Add(inLeftDxfLine);

            //左边的门闩小矩形
            double downLeftX = DLocation.X + outer_mid_space - barWidth / 2 + (outer_in_space - outer_mid_space) / 2;
            double downLeftY = DLocation.Y + height / 4;
            writeRepresentDoorBarRectangle(doc, new DLocation(downLeftX, downLeftY, DLocation.Z), DxfText, height, width, outer_mid_space, outer_in_space, barHeight, barWidth);
            double upLeftX = downLeftX;
            double upLeftY = DLocation.Y + 3 * height / 4 - barHeight;
            writeRepresentDoorBarRectangle(doc, new DLocation(upLeftX, upLeftY, DLocation.Z), DxfText, height, width, outer_mid_space, outer_in_space, barHeight, barWidth);

            //两个个小圈
            //底部
            writeCirle(doc, new DLocation(DLocation.X + width-2*outer_in_space, DLocation.Y + 2 * outer_in_space, DLocation.Z), (outer_in_space - outer_mid_space) / 2);

            //顶部
            writeCirle(doc, new DLocation(DLocation.X + width-2*outer_in_space, DLocation.Y + height - 2 * outer_in_space, DLocation.Z), (outer_in_space - outer_mid_space) / 2);

            //画门把手
            Handle.Draw(doc, new DLocation(DLocation.X + width / 4+outer_mid_space/2, DLocation.Y + 3 * height / 4 - barHeight, DLocation.Z));
            Handle.Draw(doc, new DLocation(DLocation.X + width / 4 + outer_mid_space/2, DLocation.Y + height / 4, DLocation.Z));
            writeDoorBarRectangle(doc, DLocation, DxfText, height, width, outer_mid_space, outer_in_space, barHeight, barWidth);
        }
Пример #8
0
        //上下层组装和单层组装函数
        public static void assembleDetailMechine(List<PictureBoxInfo> imageNameList, DxfModel dxf, DLocation DLocation, DetailMechineConfigure dmc,int coolingType)
        {
            int firstLayerWidth = 0;
            bool existTwoLayerElement = false;
            int upFirstElement=isTwoLayers(imageNameList);
            if (upFirstElement!=-1)
            {
                if (isExistTwoLayerElement(imageNameList))
                {
                    existTwoLayerElement = true;
                    for (int i = 0; i < imageNameList.Count; i++)
                    {
                        if(i>=upFirstElement)
                        {
                            if (imageNameList.ElementAt(i).name.Equals("HRA"))
                            {
                                PictureBoxInfo pictureBoxInfo = imageNameList.ElementAt(i);
                                //消除间隙,此时不存在双层元素
                                pictureBoxInfo.DLocation.Y += (pictureBoxInfo.height-2)/2+ 2;
                                assembleDetailMechine(pictureBoxInfo, dxf, pictureBoxInfo.DLocation,pictureBoxInfo.text, Convert.ToDouble(pictureBoxInfo.height), Convert.ToDouble(pictureBoxInfo.width), dmc.outer_mid_space, dmc.outer_in_space, dmc.barHeight, dmc.barWidth);
                            }
                            else
                            {

                                PictureBoxInfo pictureBoxInfo = imageNameList.ElementAt(i);
                                //消除间隙,此时不存在双层元素
                                pictureBoxInfo.DLocation.Y += pictureBoxInfo.height * 2 + 4;

                                assembleDetailMechine(pictureBoxInfo, dxf, pictureBoxInfo.DLocation, pictureBoxInfo.text, Convert.ToDouble(pictureBoxInfo.height), Convert.ToDouble(pictureBoxInfo.width), dmc.outer_mid_space, dmc.outer_in_space, dmc.barHeight, dmc.barWidth);

                                //top层dimensiong
                                PictureBoxInfo topPictureBoxInfo = imageNameList.ElementAt(i);
                                writeTopOrBottomDimension(topPictureBoxInfo, dxf, "top", 16, 3, 8);
                            }
                        }
                        else
                        {

                             PictureBoxInfo pictureBoxInfo = imageNameList.ElementAt(i);
                             //下层的总宽度
                             firstLayerWidth += pictureBoxInfo.width;
                             assembleDetailMechine(pictureBoxInfo, dxf, pictureBoxInfo.DLocation, pictureBoxInfo.text, Convert.ToDouble(pictureBoxInfo.height), Convert.ToDouble(pictureBoxInfo.width), dmc.outer_mid_space, dmc.outer_in_space, dmc.barHeight, dmc.barWidth);

                             //bottom
                             writeTopOrBottomDimension(pictureBoxInfo, dxf, "bottom");

                             DLocation standDLocation = imageNameList.ElementAt(i).DLocation;
                             if (i == 0)
                             {
                                 writeBottomStand(dxf, new DLocation(standDLocation.X, standDLocation.Y - BaseRail.baseRail, standDLocation.Z), BaseRail.baseRail, 2, dmc.outer_in_space / 26, "left");
                             }
                             else
                             {
                                 writeBottomStand(dxf, new DLocation(standDLocation.X - 2, standDLocation.Y - BaseRail.baseRail, standDLocation.Z), BaseRail.baseRail, 2, dmc.outer_in_space / 26, "left");
                                 writeBottomStand(dxf, new DLocation(standDLocation.X, standDLocation.Y - BaseRail.baseRail, standDLocation.Z), BaseRail.baseRail, 2, dmc.outer_in_space / 26, "right");

                             }
                        }
                    }

                    //后一个小支架
                    DLocation lastDLocation = new DLocation(imageNameList.ElementAt(upFirstElement - 1).DLocation.X + imageNameList.ElementAt(upFirstElement - 1).width, imageNameList.ElementAt(upFirstElement - 1).DLocation.Y, imageNameList.ElementAt(upFirstElement - 1).DLocation.Z);
                    writeBottomStand(dxf, new DLocation(lastDLocation.X - 2, lastDLocation.Y - BaseRail.baseRail, lastDLocation.Z), BaseRail.baseRail, 2, dmc.outer_in_space / 26, "left");
                    //支架dimension
                    writeBottomStandDimension(new DLocation(lastDLocation.X, lastDLocation.Y - BaseRail.baseRail, lastDLocation.Z), lastDLocation, dxf, "right", 16, 3, 15);

                    //画左边的dimension
                    if (imageNameList.ElementAt(upFirstElement).name.Equals("HRA"))
                    {
                        if (imageNameList.ElementAt(0).name.Equals("virtualHRA"))
                        {
                            //一层和二层左边第-层(主要是用来描绘HRA的)

                            PictureBoxInfo oneFirstleftPictureBoxInfo = imageNameList.ElementAt(upFirstElement);
                            DLocation one_startDLocation = new DLocation(oneFirstleftPictureBoxInfo.DLocation.X , oneFirstleftPictureBoxInfo.DLocation.Y, oneFirstleftPictureBoxInfo.DLocation.Z);
                            DLocation one_secondDLocation = new DLocation(oneFirstleftPictureBoxInfo.DLocation.X, oneFirstleftPictureBoxInfo.DLocation.Y + oneFirstleftPictureBoxInfo.firstDistance, oneFirstleftPictureBoxInfo.DLocation.Z);
                            DLocation one_thirdDLocation = new DLocation(oneFirstleftPictureBoxInfo.DLocation.X , one_secondDLocation.Y + oneFirstleftPictureBoxInfo.secondDistance, oneFirstleftPictureBoxInfo.DLocation.Z);
                            DLocation one_fourthDLocation = new DLocation(oneFirstleftPictureBoxInfo.DLocation.X , one_startDLocation.Y + oneFirstleftPictureBoxInfo.thirdDistance, oneFirstleftPictureBoxInfo.DLocation.Z);
                            DLocation one_fifthDLocation = new DLocation(oneFirstleftPictureBoxInfo.DLocation.X , one_fourthDLocation.Y + oneFirstleftPictureBoxInfo.secondDistance, oneFirstleftPictureBoxInfo.DLocation.Z);
                            writeRightSecondDimension(one_startDLocation, one_secondDLocation, dxf, "left", 5, 3, 15);
                            writeRightSecondDimension(one_secondDLocation, one_thirdDLocation, dxf, "left", 5, 3, 15);
                            writeRightSecondDimension(one_startDLocation, one_fourthDLocation, dxf, "left", 5, 3, 15);
                            writeRightSecondDimension(one_fourthDLocation, one_fifthDLocation, dxf, "left", 5, 3, 15);
                        }
                        else
                        {
                            //主要处理最后是个是HRA,下层第一个不是virtualHRA情况
                            PictureBoxInfo oneFirstLeftPictureBoxInfo = imageNameList.ElementAt(upFirstElement);
                            DLocation one_startDLocation = new DLocation(oneFirstLeftPictureBoxInfo.DLocation.X , oneFirstLeftPictureBoxInfo.DLocation.Y, oneFirstLeftPictureBoxInfo.DLocation.Z);
                            DLocation one_fourthDLocation = new DLocation(oneFirstLeftPictureBoxInfo.DLocation.X , one_startDLocation.Y + oneFirstLeftPictureBoxInfo.thirdDistance, oneFirstLeftPictureBoxInfo.DLocation.Z);
                            DLocation one_fifthDLocation = new DLocation(oneFirstLeftPictureBoxInfo.DLocation.X , one_fourthDLocation.Y + oneFirstLeftPictureBoxInfo.secondDistance, oneFirstLeftPictureBoxInfo.DLocation.Z);
                            writeRightSecondDimension(one_startDLocation, one_fourthDLocation, dxf, "left", 5, 3, 8);
                            writeRightSecondDimension(one_fourthDLocation, one_fifthDLocation, dxf, "left", 5, 3, 8);

                            //一层左边deminsion
                            PictureBoxInfo firstPictureBoxInfo = imageNameList.ElementAt(0);
                            writeLeftOrRightDimension(firstPictureBoxInfo, firstPictureBoxInfo.DLocation, dxf, "left");
                            //PictureBoxInfo upFirstPictureBoxInfo = imageNameList.ElementAt(upFirstElement);
                            //writeLeftOrRightDimension(upFirstPictureBoxInfo, upFirstPictureBoxInfo.DLocation, dxf, "left");
                        }

                    }
                    else
                    {
                        //一层左边deminsion
                        PictureBoxInfo firstPictureBoxInfo = imageNameList.ElementAt(0);
                        writeLeftOrRightDimension(firstPictureBoxInfo, firstPictureBoxInfo.DLocation, dxf, "left");
                        PictureBoxInfo upFirstPictureBoxInfo = imageNameList.ElementAt(upFirstElement);
                        writeLeftOrRightDimension(upFirstPictureBoxInfo, upFirstPictureBoxInfo.DLocation, dxf, "left");

                    }
                    //画右边的dimension
                    if (imageNameList.ElementAt(imageNameList.Count - 1).name.Equals("HRA"))
                    {
                        //这里没有数据还没画
                        if (imageNameList.ElementAt(upFirstElement - 1).name.Equals("virtualHRA"))
                        {

                            //一层和二层右边第-层(主要是用来描绘HRA的)
                            PictureBoxInfo oneFirstRightPictureBoxInfo = imageNameList.ElementAt(imageNameList.Count - 1);
                            DLocation one_startDLocation = new DLocation(oneFirstRightPictureBoxInfo.DLocation.X + oneFirstRightPictureBoxInfo.width, oneFirstRightPictureBoxInfo.DLocation.Y, oneFirstRightPictureBoxInfo.DLocation.Z);
                            DLocation one_secondDLocation = new DLocation(oneFirstRightPictureBoxInfo.DLocation.X + oneFirstRightPictureBoxInfo.width, oneFirstRightPictureBoxInfo.DLocation.Y + oneFirstRightPictureBoxInfo.firstDistance, oneFirstRightPictureBoxInfo.DLocation.Z);
                            DLocation one_thirdDLocation = new DLocation(oneFirstRightPictureBoxInfo.DLocation.X + oneFirstRightPictureBoxInfo.width, one_secondDLocation.Y + oneFirstRightPictureBoxInfo.secondDistance, oneFirstRightPictureBoxInfo.DLocation.Z);
                            DLocation one_fourthDLocation = new DLocation(oneFirstRightPictureBoxInfo.DLocation.X + oneFirstRightPictureBoxInfo.width, one_startDLocation.Y + oneFirstRightPictureBoxInfo.thirdDistance, oneFirstRightPictureBoxInfo.DLocation.Z);
                            DLocation one_fifthDLocation = new DLocation(oneFirstRightPictureBoxInfo.DLocation.X + oneFirstRightPictureBoxInfo.width, one_fourthDLocation.Y + oneFirstRightPictureBoxInfo.secondDistance, oneFirstRightPictureBoxInfo.DLocation.Z);
                            writeRightSecondDimension(one_startDLocation, one_secondDLocation, dxf, "right", 16, 3, 8);
                            writeRightSecondDimension(one_secondDLocation, one_thirdDLocation, dxf, "right", 16, 3, 8);
                            writeRightSecondDimension(one_startDLocation, one_fourthDLocation, dxf, "right", 16, 3, 8);
                            writeRightSecondDimension(one_fourthDLocation, one_fifthDLocation, dxf, "right", 16, 3, 8);

                            //一层和二层右边第二层
                            PictureBoxInfo oneSecondRightPictureBoxInfo = imageNameList.ElementAt(imageNameList.Count - 1);
                            DLocation one_TwostartDLocation = new DLocation(oneSecondRightPictureBoxInfo.DLocation.X + oneSecondRightPictureBoxInfo.width, oneSecondRightPictureBoxInfo.DLocation.Y, oneSecondRightPictureBoxInfo.DLocation.Z);
                            DLocation one_TwosecondDLocation = new DLocation(oneSecondRightPictureBoxInfo.DLocation.X + oneSecondRightPictureBoxInfo.width, oneSecondRightPictureBoxInfo.DLocation.Y + (oneSecondRightPictureBoxInfo.height - 2) / 2, oneSecondRightPictureBoxInfo.DLocation.Z);
                            DLocation one_TwothirdDLocation = new DLocation(oneSecondRightPictureBoxInfo.DLocation.X + oneSecondRightPictureBoxInfo.width, oneSecondRightPictureBoxInfo.DLocation.Y + (oneSecondRightPictureBoxInfo.height - 2) / 2 + 2, oneSecondRightPictureBoxInfo.DLocation.Z);
                            DLocation one_TwoFourthDLocation = new DLocation(oneSecondRightPictureBoxInfo.DLocation.X + oneSecondRightPictureBoxInfo.width, oneSecondRightPictureBoxInfo.DLocation.Y + oneSecondRightPictureBoxInfo.height, oneSecondRightPictureBoxInfo.DLocation.Z);
                            writeRightSecondDimension(one_TwostartDLocation, one_TwosecondDLocation, dxf, "right", 16, 3, 15);
                            writeRightSecondDimension(one_TwothirdDLocation, one_TwoFourthDLocation, dxf, "right", 16, 3, 15);
                        }
                        else
                        {
                            //主要处理最后是个是HRA,下层最后一个不是virtualHRA情况(主要处理HRA)
                            PictureBoxInfo oneFirstRightPictureBoxInfo = imageNameList.ElementAt(imageNameList.Count - 1);
                            DLocation one_TwostartDLocation = new DLocation(oneFirstRightPictureBoxInfo.DLocation.X + oneFirstRightPictureBoxInfo.width, oneFirstRightPictureBoxInfo.DLocation.Y, oneFirstRightPictureBoxInfo.DLocation.Z);
                            DLocation one_TwofourthDLocation = new DLocation(oneFirstRightPictureBoxInfo.DLocation.X + oneFirstRightPictureBoxInfo.width, one_TwostartDLocation.Y + oneFirstRightPictureBoxInfo.thirdDistance, oneFirstRightPictureBoxInfo.DLocation.Z);
                            DLocation one_TwofifthDLocation = new DLocation(oneFirstRightPictureBoxInfo.DLocation.X + oneFirstRightPictureBoxInfo.width, one_TwofourthDLocation.Y + oneFirstRightPictureBoxInfo.secondDistance, oneFirstRightPictureBoxInfo.DLocation.Z);
                            writeRightSecondDimension(one_TwostartDLocation, one_TwofourthDLocation, dxf, "right", 16, 3, 8);
                            writeRightSecondDimension(one_TwofourthDLocation, one_TwofifthDLocation, dxf, "right", 16, 3, 8);

                            //二层右边第二层dimesion
                            PictureBoxInfo twoSecondRightPictureBoxInfo = imageNameList.ElementAt(imageNameList.Count - 1);
                            DLocation two_startDLocation = new DLocation(twoSecondRightPictureBoxInfo.DLocation.X + twoSecondRightPictureBoxInfo.width, twoSecondRightPictureBoxInfo.DLocation.Y + (twoSecondRightPictureBoxInfo.height-2)/2+2, twoSecondRightPictureBoxInfo.DLocation.Z);
                            DLocation two_secondDLocation = new DLocation(twoSecondRightPictureBoxInfo.DLocation.X + twoSecondRightPictureBoxInfo.width, twoSecondRightPictureBoxInfo.DLocation.Y + twoSecondRightPictureBoxInfo.height, twoSecondRightPictureBoxInfo.DLocation.Z);
                            writeRightSecondDimension(two_startDLocation, two_secondDLocation, dxf, "right", 16, 3, 15);

                            //一层右边第一层dimensiong
                            PictureBoxInfo firstRightPictureBoxInfo = imageNameList.ElementAt(upFirstElement - 1);
                            writeLeftOrRightDimension(firstRightPictureBoxInfo, firstRightPictureBoxInfo.DLocation, dxf, "right");

                            //一层右边第二层
                            PictureBoxInfo oneSecondRightPictureBoxInfo = imageNameList.ElementAt(upFirstElement - 1);
                            DLocation one_startDLocation = new DLocation(oneSecondRightPictureBoxInfo.DLocation.X + oneSecondRightPictureBoxInfo.width, oneSecondRightPictureBoxInfo.DLocation.Y, oneSecondRightPictureBoxInfo.DLocation.Z);
                            DLocation one_secondDLocation = new DLocation(oneSecondRightPictureBoxInfo.DLocation.X + oneSecondRightPictureBoxInfo.width, oneSecondRightPictureBoxInfo.DLocation.Y + oneSecondRightPictureBoxInfo.height, oneSecondRightPictureBoxInfo.DLocation.Z);
                            writeRightSecondDimension(one_startDLocation, one_secondDLocation, dxf, "right", 16, 3, 15);
                        }
                    }
                    else
                    {
                        //一层右边第一层dimensiong
                        PictureBoxInfo firstRightPictureBoxInfo = imageNameList.ElementAt(upFirstElement - 1);
                        writeLeftOrRightDimension(firstRightPictureBoxInfo, firstRightPictureBoxInfo.DLocation, dxf, "right");

                        //一层右边第二层
                        PictureBoxInfo oneSecondRightPictureBoxInfo = imageNameList.ElementAt(upFirstElement - 1);
                        DLocation one_startDLocation = new DLocation(oneSecondRightPictureBoxInfo.DLocation.X + oneSecondRightPictureBoxInfo.width, oneSecondRightPictureBoxInfo.DLocation.Y, oneSecondRightPictureBoxInfo.DLocation.Z);
                        DLocation one_secondDLocation = new DLocation(oneSecondRightPictureBoxInfo.DLocation.X + oneSecondRightPictureBoxInfo.width, oneSecondRightPictureBoxInfo.DLocation.Y + oneSecondRightPictureBoxInfo.height, oneSecondRightPictureBoxInfo.DLocation.Z);
                        writeRightSecondDimension(one_startDLocation, one_secondDLocation, dxf, "right", 16, 3, 15);

                        //二层右边第一层
                        PictureBoxInfo upLastPictureBoxInfo = imageNameList.ElementAt(imageNameList.Count - 1);
                        writeLeftOrRightDimension(upLastPictureBoxInfo, upLastPictureBoxInfo.DLocation, dxf, "right", 16, 3, 8);

                        //二层右边第二层dimesion
                        PictureBoxInfo twoSecondRightPictureBoxInfo = imageNameList.ElementAt(imageNameList.Count - 1);
                        DLocation two_startDLocation = new DLocation(twoSecondRightPictureBoxInfo.DLocation.X + twoSecondRightPictureBoxInfo.width, twoSecondRightPictureBoxInfo.DLocation.Y, twoSecondRightPictureBoxInfo.DLocation.Z);
                        DLocation two_secondDLocation = new DLocation(twoSecondRightPictureBoxInfo.DLocation.X + twoSecondRightPictureBoxInfo.width, twoSecondRightPictureBoxInfo.DLocation.Y + twoSecondRightPictureBoxInfo.height, twoSecondRightPictureBoxInfo.DLocation.Z);

                        writeRightSecondDimension(two_startDLocation, two_secondDLocation, dxf, "right", 16, 3, 15);
                    }

                    //bottom最外层
                    PictureBoxInfo startRightPictureBoxInfo = imageNameList.ElementAt(0);
                    writeTotalBottomDimension(startRightPictureBoxInfo, firstLayerWidth, dxf, "bottom", 16, 3, 15);
                    //绘制底部一条直线
                    DxfLine bottomLine = new DxfLine();
                    bottomLine.Start = new WW.Math.Point3D(startRightPictureBoxInfo.DLocation.X, startRightPictureBoxInfo.DLocation.Y - BaseRail.baseRail, startRightPictureBoxInfo.DLocation.Z);
                    bottomLine.End = new WW.Math.Point3D(startRightPictureBoxInfo.DLocation.X + firstLayerWidth, startRightPictureBoxInfo.DLocation.Y - BaseRail.baseRail, startRightPictureBoxInfo.DLocation.Z);
                    dxf.Entities.Add(bottomLine);

                    //画垫层的dimension,他和别的标注函数雷同,就不重写了,直接调用
                    if (imageNameList.ElementAt(upFirstElement).name.Equals("HRA"))
                    {
                        //画在最后
                        if (upFirstElement != imageNameList.Count - 1)
                        {
                            PictureBoxInfo lastPictureInfo = imageNameList.ElementAt(imageNameList.Count - 1);
                            DLocation cushionDLocation = new DLocation(lastPictureInfo.DLocation.X + lastPictureInfo.width, lastPictureInfo.DLocation.Y, lastPictureInfo.DLocation.Z);
                            writeRightSecondDimension(new DLocation(cushionDLocation.X, cushionDLocation.Y - 2, cushionDLocation.Z), cushionDLocation, dxf, "right", 16, 1, 5);
                        }
                        else
                        {
                            PictureBoxInfo lastPictureInfo = imageNameList.ElementAt(imageNameList.Count - 1);
                            DLocation cushionDLocation = new DLocation(lastPictureInfo.DLocation.X + lastPictureInfo.width, lastPictureInfo.DLocation.Y+(lastPictureInfo.height-2)/2+2, lastPictureInfo.DLocation.Z);
                            writeRightSecondDimension(new DLocation(cushionDLocation.X, cushionDLocation.Y - 2, cushionDLocation.Z), cushionDLocation, dxf, "right", 16, 1, 5);
                        }

                    }
                    else if (imageNameList.ElementAt(imageNameList.Count - 1).name.Equals("HRA"))
                    {
                        //画在开始
                        PictureBoxInfo upFirstPictureInfo = imageNameList.ElementAt(upFirstElement);
                        DLocation cushionDLocation = new DLocation(upFirstPictureInfo.DLocation.X, upFirstPictureInfo.DLocation.Y, upFirstPictureInfo.DLocation.Z);
                        writeRightSecondDimension(new DLocation(cushionDLocation.X, cushionDLocation.Y - 2, cushionDLocation.Z), cushionDLocation, dxf, "left", 16, 1, 5);
                    }
                    else
                    {
                        //画在最后
                        PictureBoxInfo lastPictureInfo = imageNameList.ElementAt(imageNameList.Count - 1);
                        DLocation cushionDLocation = new DLocation(lastPictureInfo.DLocation.X + lastPictureInfo.width, lastPictureInfo.DLocation.Y, lastPictureInfo.DLocation.Z);
                        writeRightSecondDimension(new DLocation(cushionDLocation.X, cushionDLocation.Y - 2, cushionDLocation.Z), cushionDLocation, dxf, "right", 16, 1, 5);
                    }

                }
                else
                {
                    for (int i = 0; i < imageNameList.Count; i++)
                    {
                        if (i >= upFirstElement)
                        {
                            PictureBoxInfo pictureBoxInfo = imageNameList.ElementAt(i);
                            //消除间隙,此时不存在双层元素
                            pictureBoxInfo.DLocation.Y += pictureBoxInfo.height * 2 + 2;
                            assembleDetailMechine(pictureBoxInfo, dxf, pictureBoxInfo.DLocation, pictureBoxInfo.text, Convert.ToDouble(pictureBoxInfo.height), Convert.ToDouble(pictureBoxInfo.width), dmc.outer_mid_space, dmc.outer_in_space, dmc.barHeight, dmc.barWidth);

                            //top层dimensiong
                            PictureBoxInfo topPictureBoxInfo = imageNameList.ElementAt(i);
                            writeTopOrBottomDimension(topPictureBoxInfo, dxf, "top", 16, 3, 8);
                        }
                        else
                        {
                            //第一层Y位置保持不变
                            PictureBoxInfo pictureBoxInfo = imageNameList.ElementAt(i);
                            firstLayerWidth += pictureBoxInfo.width;
                            assembleDetailMechine(pictureBoxInfo, dxf, pictureBoxInfo.DLocation, pictureBoxInfo.text, Convert.ToDouble(pictureBoxInfo.height), Convert.ToDouble(pictureBoxInfo.width), dmc.outer_mid_space, dmc.outer_in_space, dmc.barHeight, dmc.barWidth);
                            //bottom
                            writeTopOrBottomDimension(pictureBoxInfo, dxf, "bottom");

                            DLocation standDLocation = imageNameList.ElementAt(i).DLocation;
                            if (i == 0)
                            {
                                writeBottomStand(dxf, new DLocation(standDLocation.X, standDLocation.Y - BaseRail.baseRail, standDLocation.Z), BaseRail.baseRail, 2, dmc.outer_in_space / 26, "left");
                            }
                            else
                            {
                                writeBottomStand(dxf, new DLocation(standDLocation.X - 2, standDLocation.Y - BaseRail.baseRail, standDLocation.Z), BaseRail.baseRail, 2, dmc.outer_in_space / 26, "left");
                                writeBottomStand(dxf, new DLocation(standDLocation.X, standDLocation.Y - BaseRail.baseRail, standDLocation.Z), BaseRail.baseRail, 2, dmc.outer_in_space / 26, "right");

                            }
                        }
                    }

                    //后一个小支架
                    DLocation lastDLocation = new DLocation(imageNameList.ElementAt(upFirstElement - 1).DLocation.X + imageNameList.ElementAt(upFirstElement - 1).width, imageNameList.ElementAt(upFirstElement - 1).DLocation.Y, imageNameList.ElementAt(upFirstElement - 1).DLocation.Z);
                    writeBottomStand(dxf, new DLocation(lastDLocation.X - 2, lastDLocation.Y - BaseRail.baseRail, lastDLocation.Z), BaseRail.baseRail, 2, dmc.outer_in_space / 26, "left");
                    //支架dimension
                    writeBottomStandDimension(new DLocation(lastDLocation.X, lastDLocation.Y - BaseRail.baseRail, lastDLocation.Z), lastDLocation, dxf, "right", 16, 3, 15);

                    //左边deminsion
                    PictureBoxInfo firstPictureBoxInfo = imageNameList.ElementAt(0);
                    writeLeftOrRightDimension(firstPictureBoxInfo, firstPictureBoxInfo.DLocation, dxf, "left");
                    PictureBoxInfo upFirstPictureBoxInfo = imageNameList.ElementAt(upFirstElement);
                    writeLeftOrRightDimension(upFirstPictureBoxInfo, upFirstPictureBoxInfo.DLocation, dxf, "left");
                    //一层右边第一层dimensiong
                    PictureBoxInfo firstRightPictureBoxInfo = imageNameList.ElementAt(upFirstElement-1);
                    writeLeftOrRightDimension(firstRightPictureBoxInfo, firstRightPictureBoxInfo.DLocation, dxf, "right");

                    //一层右边第二层
                     PictureBoxInfo oneSecondRightPictureBoxInfo = imageNameList.ElementAt(upFirstElement- 1);
                     DLocation one_startDLocation = new DLocation(oneSecondRightPictureBoxInfo.DLocation.X + oneSecondRightPictureBoxInfo.width, oneSecondRightPictureBoxInfo.DLocation.Y, oneSecondRightPictureBoxInfo.DLocation.Z);
                     DLocation one_secondDLocation = new DLocation(oneSecondRightPictureBoxInfo.DLocation.X + oneSecondRightPictureBoxInfo.width, oneSecondRightPictureBoxInfo.DLocation.Y + oneSecondRightPictureBoxInfo.height, oneSecondRightPictureBoxInfo.DLocation.Z);
                     writeRightSecondDimension(one_startDLocation, one_secondDLocation, dxf, "right", 16, 3, 15);

                    //二层右边第一层
                    PictureBoxInfo upLastPictureBoxInfo = imageNameList.ElementAt(imageNameList.Count-1);
                    writeLeftOrRightDimension(upLastPictureBoxInfo, upLastPictureBoxInfo.DLocation, dxf, "right",16,3,8);

                    //二层右边第二层dimesion
                    PictureBoxInfo twoSecondRightPictureBoxInfo = imageNameList.ElementAt(imageNameList.Count - 1);
                    DLocation two_startDLocation = new DLocation(twoSecondRightPictureBoxInfo.DLocation.X + twoSecondRightPictureBoxInfo.width, twoSecondRightPictureBoxInfo.DLocation.Y, twoSecondRightPictureBoxInfo.DLocation.Z);
                    DLocation two_secondDLocation = new DLocation(twoSecondRightPictureBoxInfo.DLocation.X + twoSecondRightPictureBoxInfo.width, twoSecondRightPictureBoxInfo.DLocation.Y + twoSecondRightPictureBoxInfo.height, twoSecondRightPictureBoxInfo.DLocation.Z);
                    //计算dimension高度用
                 //   double secondDimensionHeiht = imageNameList.ElementAt(upFirstElement - 1).DLocation.X - imageNameList.ElementAt(imageNameList.Count - 1).DLocation.X + imageNameList.ElementAt(upFirstElement - 1).width;
                 //   if (imageNameList.ElementAt(upFirstElement - 1).DLocation.X - imageNameList.ElementAt(imageNameList.Count - 1).DLocation.X > 0)
                 //   {
                    //     writeRightSecondDimension(two_startDLocation, two_secondDLocation, dxf, "right", 16, 3, 15 + secondDimensionHeiht);
                  //  }
                   // else
                    //{
                        writeRightSecondDimension(two_startDLocation, two_secondDLocation, dxf, "right", 16, 3, 15);
                   // }

                    //一、二层右边第三层dimension
                    //PictureBoxInfo twoThirdSecondRightPictureBoxInfo = imageNameList.ElementAt(imageNameList.Count - 1);
                    //PictureBoxInfo twoThirdStartRightPicureBoxInfo = imageNameList.ElementAt(upFirstElement - 1);
                    //DLocation two_startThirdDLocation = new DLocation(twoThirdStartRightPicureBoxInfo.DLocation.X + twoThirdStartRightPicureBoxInfo.width, twoThirdStartRightPicureBoxInfo.DLocation.Y, twoThirdStartRightPicureBoxInfo.DLocation.Z);
                    //DLocation two_secondThirdDLocation = new DLocation(twoThirdSecondRightPictureBoxInfo.DLocation.X + twoThirdSecondRightPictureBoxInfo.width, twoThirdSecondRightPictureBoxInfo.DLocation.Y + twoThirdSecondRightPictureBoxInfo.height, twoThirdSecondRightPictureBoxInfo.DLocation.Z);

                    //writeRightSecondDimension(two_startThirdDLocation, two_secondThirdDLocation, dxf, "right", 16, 3, 15);

                    //bottom最外层
                    PictureBoxInfo startRightPictureBoxInfo = imageNameList.ElementAt(0);
                    writeTotalBottomDimension(startRightPictureBoxInfo, firstLayerWidth, dxf, "bottom", 16, 3, 15);
                }

                //绘制右边整体的两层
                int wholeHeight = 0;
                PictureBoxInfo oneLastPictrueInfo=imageNameList.ElementAt(upFirstElement-1);
                PictureBoxInfo twoFirstPictureInfo=imageNameList.ElementAt(upFirstElement);
                if (existTwoLayerElement)
                {
                    wholeHeight = 2 * oneLastPictrueInfo.height + 2;
                }
                else
                {
                    wholeHeight = 2 * oneLastPictrueInfo.height;
                }
                int rightWholeDimensionLength =Convert.ToInt32(oneLastPictrueInfo.DLocation.X + oneLastPictrueInfo.width - twoFirstPictureInfo.DLocation.X - twoFirstPictureInfo.width);
                DLocation right_wholeStartDLocation = new DLocation(twoFirstPictureInfo.DLocation.X + twoFirstPictureInfo.width, oneLastPictrueInfo.DLocation.Y, oneLastPictrueInfo.DLocation.Z);
                DLocation right_wholeSecondDLocation = new DLocation(twoFirstPictureInfo.DLocation.X + twoFirstPictureInfo.width, oneLastPictrueInfo.DLocation.Y + wholeHeight, oneLastPictrueInfo.DLocation.Z);
                writeRightSecondDimension(right_wholeStartDLocation, right_wholeSecondDLocation, dxf, "right", 16, 3, rightWholeDimensionLength+20);

                writeRightSecondDimension(new DLocation(oneLastPictrueInfo.DLocation.X + oneLastPictrueInfo.width, oneLastPictrueInfo.DLocation.Y - 6, oneLastPictrueInfo.DLocation.Z), new DLocation(oneLastPictrueInfo.DLocation.X + oneLastPictrueInfo.width, right_wholeSecondDLocation.Y, oneLastPictrueInfo.DLocation.Z), dxf, "right", 16, 3, 25);

            }
            else
            {
                for (int i = 0; i < imageNameList.Count; i++)
                {
                    PictureBoxInfo pictureBoxInfo = imageNameList.ElementAt(i);
                    firstLayerWidth += pictureBoxInfo.width;
                    assembleDetailMechine(pictureBoxInfo, dxf, pictureBoxInfo.DLocation, pictureBoxInfo.text, Convert.ToDouble(pictureBoxInfo.height), Convert.ToDouble(pictureBoxInfo.width), dmc.outer_mid_space, dmc.outer_in_space, dmc.barHeight, dmc.barWidth);
                    //每个图框底部的dimension
                    writeTopOrBottomDimension(pictureBoxInfo, dxf, "bottom", 16, 3, 10);

                    DLocation standDLocation = imageNameList.ElementAt(i).DLocation;
                    if (i == 0)
                    {
                        writeBottomStand(dxf, new DLocation(standDLocation.X, standDLocation.Y - BaseRail.baseRail, standDLocation.Z), BaseRail.baseRail, 2, dmc.outer_in_space / 26, "left");
                    }
                    else
                    {
                        writeBottomStand(dxf, new DLocation(standDLocation.X - 2, standDLocation.Y - BaseRail.baseRail, standDLocation.Z), BaseRail.baseRail, 2, dmc.outer_in_space / 26, "left");
                        writeBottomStand(dxf, new DLocation(standDLocation.X, standDLocation.Y - BaseRail.baseRail, standDLocation.Z), BaseRail.baseRail, 2, dmc.outer_in_space / 26, "right");

                    }

                }

                //后一个小支架
                DLocation lastDLocation = new DLocation(imageNameList.ElementAt(imageNameList.Count - 1).DLocation.X + imageNameList.ElementAt(imageNameList.Count - 1).width, imageNameList.ElementAt(imageNameList.Count - 1).DLocation.Y, imageNameList.ElementAt(imageNameList.Count - 1).DLocation.Z);
                writeBottomStand(dxf, new DLocation(lastDLocation.X - 2, lastDLocation.Y - BaseRail.baseRail, lastDLocation.Z), BaseRail.baseRail, 2, dmc.outer_in_space / 26, "left");
                 //支架dimension
                writeBottomStandDimension(new DLocation(lastDLocation.X, lastDLocation.Y - BaseRail.baseRail, lastDLocation.Z), lastDLocation, dxf,"right", 16, 3, 15);

                //注意这里还要封装冷量类型,没有做
                PictureBoxInfo firstLeftPictureBoxInfo = imageNameList.ElementAt(0);
                writeLeftOrRightDimension(firstLeftPictureBoxInfo, firstLeftPictureBoxInfo.DLocation, dxf, "left");
                //右边第一层dimension
                PictureBoxInfo firstRightPictureBoxInfo = imageNameList.ElementAt(imageNameList.Count - 1);
                writeLeftOrRightDimension(firstRightPictureBoxInfo, firstRightPictureBoxInfo.DLocation, dxf, "right");
                //右边第二层dimesion
                PictureBoxInfo secondRightPictureBoxInfo = imageNameList.ElementAt(imageNameList.Count - 1);
                DLocation startDLocation = new DLocation(secondRightPictureBoxInfo.DLocation.X + secondRightPictureBoxInfo.width, secondRightPictureBoxInfo.DLocation.Y, secondRightPictureBoxInfo.DLocation.Z);
                DLocation secondDLocation = new DLocation(secondRightPictureBoxInfo.DLocation.X + secondRightPictureBoxInfo.width, secondRightPictureBoxInfo.DLocation.Y + secondRightPictureBoxInfo.height, secondRightPictureBoxInfo.DLocation.Z);
                writeRightSecondDimension(startDLocation, secondDLocation, dxf, "right", 16, 3, 15);
                //右边第三层dimension
                //还没做

                //bottom最外层
                PictureBoxInfo startRightPictureBoxInfo = imageNameList.ElementAt(0);
                writeTotalBottomDimension(startRightPictureBoxInfo, firstLayerWidth, dxf, "bottom", 16, 3, 15);
                //绘制底部一条直线
                DxfLine bottomLine = new DxfLine();
                bottomLine.Start = new WW.Math.Point3D(startRightPictureBoxInfo.DLocation.X, startRightPictureBoxInfo.DLocation.Y - BaseRail.baseRail, startRightPictureBoxInfo.DLocation.Z);
                bottomLine.End = new WW.Math.Point3D(startRightPictureBoxInfo.DLocation.X + firstLayerWidth, startRightPictureBoxInfo.DLocation.Y - BaseRail.baseRail, startRightPictureBoxInfo.DLocation.Z);
                dxf.Entities.Add(bottomLine);

            }
        }
Пример #9
0
 private static void AddEntity(DxfModel dxfModel,Line l)
 {
     DxfLine line = new DxfLine(l.ptStart,l.ptEnd);
     line.Thickness = l.thickness;
     dxfModel.Entities.Add(line);
 }
Пример #10
0
        public void Draw(DxfModel dxf, DLocation DLocation, double boxWidth, double boxHeight, List<PictureBoxInfo> pictureBoxInfoList,int coolingType)
        {
            DataManager dataManager=new DataManager();
            //boxWidth = dataManager.getTotalWidth(pictureBoxInfoList);

            //得到框架信息
            var boxEntity = dataCenter.BoxEntity;

            DLocation = new DLocation(DLocation.X - 120d, DLocation.Y + boxEntity.TopViewHeight + 80.0d + boxEntity.UpHeight + boxEntity.DownHeight, 0);
            boxWidth = boxEntity.Width + 240.0d;
            boxHeight = boxEntity.TopViewHeight + boxEntity.UpHeight + boxEntity.DownHeight + 160.0d;
            /****************************************************************************/
            //绘制最外框
            /****************************************************************************/
            Point3D v1 = new Point3D(DLocation.X, DLocation.Y, DLocation.Z);
            Point3D v2 = new Point3D(DLocation.X, DLocation.Y - boxHeight, DLocation.Z);
            Point3D v3 = new Point3D(DLocation.X + boxWidth, DLocation.Y - boxHeight, DLocation.Z);
            Point3D v4 = new Point3D(DLocation.X + boxWidth, DLocation.Y, DLocation.Z);

            //DxfLinePointer.Draw(dxf, DLocation);
            //Slash.Draw(dxf,new DLocation(v2.X,v2.Y,v2.Z));
            //Fan.Draw(dxf, v2,v1,2);

            DxfLine DxfLine12 = new DxfLine(v1, v2);
            dxf.Entities.Add(DxfLine12);

            DxfLine DxfLine23 = new DxfLine(v2, v3);
            dxf.Entities.Add(DxfLine23);

            DxfLine DxfLine34 = new DxfLine(v3, v4);
            dxf.Entities.Add(DxfLine34);

            DxfLine DxfLine14 = new DxfLine(v1, v4);
            dxf.Entities.Add(DxfLine14);

            /****************************************************************************/
            //绘制左上角的配置信息
            /****************************************************************************/
            Configuration.Draw(dxf, new DLocation(v1.X, v1.Y), dataCenter.Configurations);

            /****************************************************************************/
            //绘制左下角的节信息
            /****************************************************************************/
            Section.Draw(dxf, new DLocation(v2.X, v2.Y), dataCenter.SectionEntity);

            /****************************************************************************/
            //绘制底部的订单信息
            /****************************************************************************/
            Order.Draw(dxf, new DLocation(v2.X, v2.Y), boxWidth, dataCenter.OrderEntity);

            //俯视图左下角的坐标点
            DLocation v5 = new DLocation(DLocation.X + 120.0d, DLocation.Y - boxEntity.TopViewHeight - 50.0d, DLocation.Z);

            /****************************************************************************/
            //绘制俯视图
            /****************************************************************************/
            //AssembleTopView.assembleTopView(pictureBoxInfoList, dxf,
            //    v5, null, 50.0d, 18.0d, 2.0d, 2.86f, 2.0d, 2.0d);
            AssembleTopView.assembleTopView(pictureBoxInfoList, dxf, v5, dataCenter.topViewConfigure);

            //正视图左下角的坐标点
            DLocation v6 = new DLocation(DLocation.X + 120.0d, DLocation.Y - boxEntity.TopViewHeight - 80.0d - boxEntity.UpHeight - boxEntity.DownHeight, DLocation.Z);

            /****************************************************************************/
            //绘制正视图
            /****************************************************************************/
            AssembleDetailMechine.assembleDetailMechine(pictureBoxInfoList, dxf,v6, dataCenter.detailMechineConfigure, coolingType);

            //正视图两边的风向箭头位置
            //存在第一层
            DLocation v7 = new DLocation(DLocation.X + 70.0d, DLocation.Y - 90.0d-boxEntity.TopViewHeight-boxEntity.UpHeight-boxEntity.DownHeight/2, DLocation.Z);
            DLocation v8 = new DLocation(DLocation.X + boxWidth - 50.0d, DLocation.Y - 90.0d - boxEntity.TopViewHeight - boxEntity.UpHeight - boxEntity.DownHeight / 2, DLocation.Z);

            /****************************************************************************/
            //绘制正视图两边的风向箭头
            /****************************************************************************/
            //判断是否存在两层,记录两层第一个元素的位置
            int upFirstElemnet = AssembleDetailMechine.isTwoLayers(pictureBoxInfoList);

            Wind.Draw(dxf, v7, boxEntity.IsLeft);
            if (upFirstElemnet == -1)
            {
                if (pictureBoxInfoList.ElementAt(pictureBoxInfoList.Count - 1).name.Equals("SFC") || pictureBoxInfoList.ElementAt(pictureBoxInfoList.Count - 1).name.Equals("SDD"))
                {
                    PictureBoxInfo tempPictureBoxInfo = pictureBoxInfoList.ElementAt(pictureBoxInfoList.Count - 1);
                    List<AirFlowUpDimension> airFlowList = AirFlowUpDimensionConfigure.getAirFlowList();
                    foreach (var airFlowDimension in airFlowList)
                    {
                        if (tempPictureBoxInfo.coolingType.Equals(airFlowDimension.coolingType) && tempPictureBoxInfo.name.Equals(airFlowDimension.imageName))
                        {
                            Wind.DrawVerticalWind(dxf, new DLocation(tempPictureBoxInfo.DLocation.X + airFlowDimension.topLeftDimension*1.3, tempPictureBoxInfo.DLocation.Y + tempPictureBoxInfo.height * 1.3, tempPictureBoxInfo.DLocation.Z));

                            //这里多写了一个标注,其实不应该写在这里应该写在AssembleDetailMechine中,只是这里写方便,但不符原则
                            DoorRectangle.writeDimension(dxf, new DLocation(tempPictureBoxInfo.DLocation.X, tempPictureBoxInfo.DLocation.Y + tempPictureBoxInfo.height, tempPictureBoxInfo.DLocation.Z), new DLocation(tempPictureBoxInfo.DLocation.X + airFlowDimension.topLeftDimension, tempPictureBoxInfo.DLocation.Y + tempPictureBoxInfo.height, tempPictureBoxInfo.DLocation.Z), 16, 1, 3, "top");
                            DoorRectangle.writeDimension(dxf, new DLocation(tempPictureBoxInfo.DLocation.X + airFlowDimension.topLeftDimension, tempPictureBoxInfo.DLocation.Y + tempPictureBoxInfo.height, tempPictureBoxInfo.DLocation.Z), new DLocation(tempPictureBoxInfo.DLocation.X + airFlowDimension.topLeftDimension + airFlowDimension.topRightDimension, tempPictureBoxInfo.DLocation.Y + tempPictureBoxInfo.height, tempPictureBoxInfo.DLocation.Z), 16, 1, 3, "top");
                        }
                    }
                }
                else
                {
                    Wind.Draw(dxf, v8, boxEntity.IsLeft);
                }
            }
            else
            {
                if (pictureBoxInfoList.ElementAt(upFirstElemnet-1).name.Equals("SFC") || pictureBoxInfoList.ElementAt(upFirstElemnet-1).name.Equals("SDD"))
                {
                    PictureBoxInfo tempPictureBoxInfo = pictureBoxInfoList.ElementAt(upFirstElemnet - 1);
                    List<AirFlowUpDimension> airFlowList = AirFlowUpDimensionConfigure.getAirFlowList();
                    foreach (var airFlowDimension in airFlowList)
                    {
                        if (tempPictureBoxInfo.coolingType.Equals(airFlowDimension.coolingType) && tempPictureBoxInfo.name.Equals(airFlowDimension.imageName))
                        {
                            Wind.DrawVerticalWind(dxf, new DLocation(tempPictureBoxInfo.DLocation.X + airFlowDimension.topLeftDimension*1.3, tempPictureBoxInfo.DLocation.Y + tempPictureBoxInfo.height * 1.3, tempPictureBoxInfo.DLocation.Z));

                            //这里多写了一个标注,其实不应该写在这里应该写在AssembleDetailMechine中,只是这里写方便,但不符原则
                            DoorRectangle.writeDimension(dxf, new DLocation(tempPictureBoxInfo.DLocation.X, tempPictureBoxInfo.DLocation.Y + tempPictureBoxInfo.height, tempPictureBoxInfo.DLocation.Z), new DLocation(tempPictureBoxInfo.DLocation.X + airFlowDimension.topLeftDimension, tempPictureBoxInfo.DLocation.Y + tempPictureBoxInfo.height, tempPictureBoxInfo.DLocation.Z), 16, 1, 3, "top");
                            DoorRectangle.writeDimension(dxf, new DLocation(tempPictureBoxInfo.DLocation.X + airFlowDimension.topLeftDimension, tempPictureBoxInfo.DLocation.Y + tempPictureBoxInfo.height, tempPictureBoxInfo.DLocation.Z), new DLocation(tempPictureBoxInfo.DLocation.X + airFlowDimension.topLeftDimension + airFlowDimension.topRightDimension, tempPictureBoxInfo.DLocation.Y + tempPictureBoxInfo.height, tempPictureBoxInfo.DLocation.Z), 16, 1, 3, "top");
                        }
                    }
                }
                else
                {
                    Wind.Draw(dxf, v8, boxEntity.IsLeft);
                }
            }

            //如果存在第二层
            if (boxEntity.UpHeight != 0)
            {
                DLocation v9 = new DLocation(DLocation.X + 70.0d, DLocation.Y - 90.0d - boxEntity.TopViewHeight - boxEntity.UpHeight / 2, DLocation.Z);
                DLocation v10 = new DLocation(DLocation.X + boxWidth - 50.0d, DLocation.Y - 90.0d - boxEntity.TopViewHeight - boxEntity.UpHeight / 2, DLocation.Z);
                if (pictureBoxInfoList.ElementAt(upFirstElemnet).name.Equals("PEC") || pictureBoxInfoList.ElementAt(upFirstElemnet).name.Equals("EDD"))
                {
                    PictureBoxInfo tempPictureBoxInfo = pictureBoxInfoList.ElementAt(upFirstElemnet);
                    List<AirFlowUpDimension> airFlowList = AirFlowUpDimensionConfigure.getAirFlowList();
                    foreach (var airFlowDimension in airFlowList)
                    {
                        if (tempPictureBoxInfo.coolingType.Equals(airFlowDimension.coolingType) && tempPictureBoxInfo.name.Equals(airFlowDimension.imageName))
                        {
                            Wind.DrawVerticalWind(dxf, new DLocation(tempPictureBoxInfo.DLocation.X + airFlowDimension.topLeftDimension*1.3, tempPictureBoxInfo.DLocation.Y + tempPictureBoxInfo.height * 1.3, tempPictureBoxInfo.DLocation.Z));

                            //这里多写了一个标注,其实不应该写在这里应该写在AssembleDetailMechine中,只是这里写方便,但不符原则
                            DoorRectangle.writeDimension(dxf, new DLocation(tempPictureBoxInfo.DLocation.X, tempPictureBoxInfo.DLocation.Y + tempPictureBoxInfo.height, tempPictureBoxInfo.DLocation.Z), new DLocation(tempPictureBoxInfo.DLocation.X + airFlowDimension.topLeftDimension, tempPictureBoxInfo.DLocation.Y + tempPictureBoxInfo.height, tempPictureBoxInfo.DLocation.Z), 16, 1, 3, "top");
                            DoorRectangle.writeDimension(dxf, new DLocation(tempPictureBoxInfo.DLocation.X+airFlowDimension.topLeftDimension, tempPictureBoxInfo.DLocation.Y + tempPictureBoxInfo.height, tempPictureBoxInfo.DLocation.Z), new DLocation(tempPictureBoxInfo.DLocation.X + airFlowDimension.topLeftDimension+airFlowDimension.topRightDimension, tempPictureBoxInfo.DLocation.Y + tempPictureBoxInfo.height, tempPictureBoxInfo.DLocation.Z), 16, 1, 3, "top");
                        }
                    }
                }
                else
                {
                    Wind.Draw(dxf, v9, !boxEntity.IsLeft);
                }

                Wind.Draw(dxf, v10, !boxEntity.IsLeft);
            }
        }
Пример #11
0
        //画两个门有门闩的设备
        public static void writeDoubleDoorBarRectangle(DxfModel doc, DLocation DLocation, string[] DxfText, double height, double width, double outer_mid_space, double outer_in_space,double barHeight,double barWidth)
        {
            DxfLine outerLeftDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 - width / 14, DLocation.Y + outer_mid_space, DLocation.Z), new Point3D(DLocation.X + width / 2 - width / 14, DLocation.Y + height - outer_mid_space, DLocation.Z));

            DxfLine inLeftDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 - width / 14 + 0.5f, DLocation.Y + outer_in_space, DLocation.Z), new Point3D(DLocation.X + width / 2 - width / 14 + 0.5f, DLocation.Y + height - outer_in_space, DLocation.Z));

            DxfLine inDownRightDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 + width / 14, DLocation.Y + outer_in_space, DLocation.Z), new Point3D(DLocation.X + width / 2 + width / 14, DLocation.Y + height/4, DLocation.Z));

            DxfLine inMidRightDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 + width / 14, DLocation.Y + height / 4 + barHeight, DLocation.Z), new Point3D(DLocation.X + width / 2 + width / 14, DLocation.Y + 3 * height / 4 - barHeight, DLocation.Z));

            DxfLine inUpRightDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 + width / 14, DLocation.Y + 3*height / 4, DLocation.Z), new Point3D(DLocation.X + width / 2 + width / 14, DLocation.Y + height-outer_in_space, DLocation.Z));

            DxfLine outerDownRightDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 + width / 14 + 0.5f, DLocation.Y + outer_mid_space, DLocation.Z), new Point3D(DLocation.X + width / 2 + width / 14 + 0.5f, DLocation.Y + height/4, DLocation.Z));

            DxfLine outerMidRightDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 + width / 14 + 0.5f, DLocation.Y + height/4+barHeight, DLocation.Z), new Point3D(DLocation.X + width / 2 + width / 14 + 0.5f, DLocation.Y + 3*height / 4-barHeight, DLocation.Z));

            DxfLine outerUpRightDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 + width / 14 + 0.5f, DLocation.Y + 3*height / 4, DLocation.Z), new Point3D(DLocation.X + width / 2 + width / 14 + 0.5f, DLocation.Y + height-outer_in_space, DLocation.Z));

            doc.Entities.Add(outerLeftDxfLine);
            doc.Entities.Add(inLeftDxfLine);
            doc.Entities.Add(inDownRightDxfLine);
            doc.Entities.Add(inMidRightDxfLine);
            doc.Entities.Add(inUpRightDxfLine);
            doc.Entities.Add(outerDownRightDxfLine);
            doc.Entities.Add(outerMidRightDxfLine);
            doc.Entities.Add(outerUpRightDxfLine);
            writeDoorBarRectangle(doc, DLocation, DxfText, height, width, outer_mid_space, outer_in_space,barHeight,barWidth);
        }
Пример #12
0
        /// <summary>
        /// 门把手绘制
        /// </summary>
        /// <param name="dxf"></param>
        /// <param name="DLocation"></param>
        public static void Draw(DxfModel dxf, DLocation DLocation)
        {
            double factor = 0.05f;
             double distance = 30;
            //底部小圆的圆心
             Point3D sDxfCircle = new Point3D(DLocation.X + 10 * factor, DLocation.Y, DLocation.Z);
            //上部同心圆圆心
             Point3D bDxfCircle = new Point3D(DLocation.X + 10 * factor, DLocation.Y + 5 * factor + distance*factor, DLocation.Z);

             double alpha = Math.Asin(3 / distance);
             double beta = Math.Acos(0.8);

             Point3D v1 = new Point3D(
                 DLocation.X + 10 * factor - double.Parse((5 * factor * Math.Cos(alpha)).ToString()),
                 DLocation.Y + 5 * factor - double.Parse((5 * factor * Math.Sin(alpha)).ToString()),
                 DLocation.Z);

             Point3D v2 = new Point3D(
                  DLocation.X + 10 * factor + double.Parse((5 * factor * Math.Cos(alpha)).ToString()),
                  DLocation.Y + 5 * factor - double.Parse((5 * factor * Math.Sin(alpha)).ToString()),
                  DLocation.Z);

             Point3D v4 = new Point3D(
                 DLocation.X + 10 * factor -double.Parse((8*factor* Math.Cos(alpha)).ToString()),
                 DLocation.Y + 5 * factor + distance * factor - double.Parse((8 * factor * Math.Sin(alpha)).ToString()),
                 DLocation.Z
                 );

             Point3D v5 = new Point3D(
             DLocation.X + 10 * factor  + double.Parse((8*factor*Math.Cos(alpha)).ToString()),
             DLocation.Y + 5 * factor + distance * factor - double.Parse((8 * factor * Math.Sin(alpha)).ToString()),
             DLocation.Z
             );
             DxfLine DxfLine14 = new DxfLine(v1, v4);
             dxf.Entities.Add(DxfLine14);

             DxfLine DxfLine25 = new DxfLine(v2, v5);
             dxf.Entities.Add(DxfLine25);

             //DxfArc
             DxfArc DxfArc = new DxfArc(
                 new Point3D(DLocation.X + 10 * factor, DLocation.Y + 5 * factor, DLocation.Z),
                 5 * factor, Convert.ToInt32(180 + alpha * 180 / Math.PI), Convert.ToInt32(360 - alpha * 180 / Math.PI));
             dxf.Entities.Add(DxfArc);

             //DxfArcup
             DxfArc DxfArcup = new DxfArc(
                 new Point3D(DLocation.X + 10 * factor, DLocation.Y + 5 * factor + distance * factor, DLocation.Z),
                 8 * factor, Convert.ToInt32(-alpha * 180 / Math.PI), Convert.ToInt32(180 + alpha * 180 / Math.PI));
             dxf.Entities.Add(DxfArcup);

             //DxfArcround
             DxfArc DxfArcround = new DxfArc(
                 new Point3D(DLocation.X + 10 * factor, DLocation.Y + 5 * factor + distance * factor, DLocation.Z),
                 10 * factor,
                 Convert.ToInt32(-(alpha +beta) * 180 / Math.PI),
                 Convert.ToInt32(180 + (alpha +beta) * 180 / Math.PI));
             dxf.Entities.Add(DxfArcround);

             //DxfCircle
             Point3D centerWCS = new Point3D(DLocation.X+10*factor, DLocation.Y+5*factor+distance*factor, DLocation.Z);
             DxfCircle DxfCircle = new DxfCircle((Point3D)centerWCS, 7 * factor);
             dxf.Entities.Add(DxfCircle);

             //上部同心圆圆心
             Point3D t1 = new Point3D(
                 DLocation.X + 8 * factor,
                 DLocation.Y + 5 * factor + (distance - 7) * factor * 0.7f,
                 DLocation.Z);
             Point3D t2 = new Point3D(
                 DLocation.X + 8 * factor,
                 DLocation.Y + 5 * factor + (distance - 7) * factor * 0.5f,
                 DLocation.Z);
             Point3D t3 = new Point3D(
                 DLocation.X + 8 * factor,
                 DLocation.Y + 5 * factor + (distance - 7) * factor * 0.3f,
                 DLocation.Z);
             Point3D t4 = new Point3D(
                 DLocation.X + 8 * factor,
                 DLocation.Y + 5 * factor + (distance - 7) * factor * 0.1f,
                 DLocation.Z);

             //DxfText
             DxfText DxfText1 = new DxfText("A", t1, 0.2f);
             dxf.Entities.Add(DxfText1);

             //DxfText
             DxfText DxfText2 = new DxfText("A", t2, 0.2f);
             dxf.Entities.Add(DxfText2);

             //DxfText
             DxfText DxfText3 = new DxfText("O", t3, 0.2f);
             dxf.Entities.Add(DxfText3);

             //DxfText
             DxfText DxfText4 = new DxfText("N", t4, 0.2f);
             dxf.Entities.Add(DxfText4);
        }
Пример #13
0
        /// <summary>
        /// 绘制左下角区域的Section块
        /// </summary>
        /// <param name="dxf"></param>
        /// <param name="DLocation"></param>
        /// <param name="configurations"></param>
        public static void Draw(DxfModel dxf, DLocation DLocation,SectionEntity sectionEntity)
        {
            double factor=0.6f;
            Point3D v1 = new Point3D(DLocation.X, DLocation.Y + 40.0d*factor, DLocation.Z);
            Point3D v2 = new Point3D(DLocation.X + 50.0d * factor, DLocation.Y + 40.0d * factor, DLocation.Z);
            Point3D v3 = new Point3D(DLocation.X + 90.0d * factor, DLocation.Y + 40.0d * factor, DLocation.Z);
            Point3D v4 = new Point3D(DLocation.X + 140.0d * factor, DLocation.Y + 40.0d * factor, DLocation.Z);

            Point3D v5 = new Point3D(DLocation.X, DLocation.Y + 50.0d * factor, DLocation.Z);
            Point3D v6 = new Point3D(DLocation.X + 140.0d * factor, DLocation.Y + 50.0d * factor, DLocation.Z);

            Point3D v7 = new Point3D(DLocation.X, DLocation.Y + 60.0d * factor, DLocation.Z);
            Point3D v8 = new Point3D(DLocation.X + 140.0d * factor, DLocation.Y + 60.0d * factor, DLocation.Z);

            Point3D v9 = new Point3D(DLocation.X, DLocation.Y + 70.0d * factor, DLocation.Z);
            Point3D v10 = new Point3D(DLocation.X + 50.0d * factor, DLocation.Y + 70.0d * factor, DLocation.Z);
            Point3D v11 = new Point3D(DLocation.X + 90.0d * factor, DLocation.Y + 70.0d * factor, DLocation.Z);
            Point3D v12 = new Point3D(DLocation.X + 140.0d * factor, DLocation.Y + 70.0d * factor, DLocation.Z);

            //横向四道
            DxfLine DxfLine14 = new DxfLine(v1, v4);
            dxf.Entities.Add(DxfLine14);

            DxfLine DxfLine56 = new DxfLine(v5, v6);
            dxf.Entities.Add(DxfLine56);

            DxfLine DxfLine78 = new DxfLine(v7, v8);
            dxf.Entities.Add(DxfLine78);

            DxfLine DxfLine912 = new DxfLine(v9, v12);
            dxf.Entities.Add(DxfLine912);

            //纵向四道
            DxfLine DxfLine91 = new DxfLine(v9, v1);
            dxf.Entities.Add(DxfLine91);

            DxfLine DxfLine210 = new DxfLine(v2, v10);
            dxf.Entities.Add(DxfLine210);

            DxfLine DxfLine311 = new DxfLine(v3, v11);
            dxf.Entities.Add(DxfLine311);

            DxfLine DxfLine412 = new DxfLine(v4, v12);
            dxf.Entities.Add(DxfLine412);

            //new DxfDxfText("Line, DxfCircle, DxfArc, dimension, DxfText (R12)", new Point3D(0, 18d, 0d), 1.5d,)

            //DxfTextStyle style = new DxfTextStyle("True type font", "Arial.ttf");
            Point3D vt1 = new Point3D(v1.X+1.0d, v1.Y+2.5f, v1.Z);
            DxfText t1 = new DxfText("COIL", vt1, 2.0d);
            dxf.Entities.Add(t1);

            Point3D vt2 = new Point3D(v2.X + 1.0d, v2.Y + 2.5f, v2.Z);
            DxfText t2 = new DxfText("CLF", vt2, 2.0d);
            dxf.Entities.Add(t2);

            Point3D vt3 = new Point3D(v3.X + 1.0d, v3.Y + 2.5f, v3.Z);
            DxfText t3 = new DxfText(sectionEntity.CoolValue, vt3, 2.0d);
            dxf.Entities.Add(t3);

            Point3D vt4 = new Point3D(v5.X + 1.0d, v5.Y + 2.5f, v5.Z);
            DxfText t4 = new DxfText("FILTER", vt4, 2.0d);

            dxf.Entities.Add(t4);

            Point3D vt5 = new Point3D(v2.X + 1.0d, v5.Y + 2.5f, v5.Z);
            DxfText t5 = new DxfText("FTA", vt5, 2.0d);
            dxf.Entities.Add(t5);

            Point3D vt6 = new Point3D(v3.X + 1.0d, v5.Y + 2.5f, v5.Z);
            DxfText t6 = new DxfText(sectionEntity.FilterValue, vt6, 2.0d);
            dxf.Entities.Add(t6);

            Point3D vt7 = new Point3D(v7.X + 1.0d, v7.Y + 2.5f, v7.Z);
            DxfText t7 = new DxfText("SECTION", vt7, 2.0d);
            dxf.Entities.Add(t7);

            Point3D vt8 = new Point3D(v2.X + 1.0d, v7.Y + 2.5f, v7.Z);
            DxfText t8 = new DxfText("MODULE", vt8, 2.0d);
            dxf.Entities.Add(t8);

            Point3D vt9 = new Point3D(v3.X + 1.0d, v7.Y + 2.5f, v7.Z);
            DxfText t9 = new DxfText("CLEARANCE", vt9, 2.0d);
            dxf.Entities.Add(t9);
        }
Пример #14
0
        /// <summary>
        /// 绘制垂直风向箭头
        /// </summary>
        /// <param name="dxf"></param>
        /// <param name="DLocation"></param>
        public static void DrawVerticalWind(DxfModel dxf,DLocation DLocation)
        {
            double factor = 0.5f;
            Point3D v1 = new Point3D();
            Point3D v2 = new Point3D();
            Point3D v3 = new Point3D();
            Point3D v4 = new Point3D();
            Point3D v5 = new Point3D();
            Point3D v6 = new Point3D();
            Point3D v7 = new Point3D();

                v1 = new Point3D(DLocation.X, DLocation.Y, DLocation.Z);
                v2 = new Point3D(DLocation.X+10*factor, DLocation.Y, DLocation.Z);
                v3 = new Point3D(DLocation.X - 10 * factor, DLocation.Y + 10 * factor, DLocation.Z);
                v4 = new Point3D(DLocation.X, DLocation.Y + 10 * factor, DLocation.Z);
                v5 = new Point3D(DLocation.X+10*factor, DLocation.Y + 10* factor, DLocation.Z);
                v6 = new Point3D(DLocation.X + 20 * factor, DLocation.Y + 10 * factor, DLocation.Z);
                v7 = new Point3D(DLocation.X +5 * factor, DLocation.Y + 20 * factor, DLocation.Z);

            DxfLine DxfLine23 = new DxfLine(v1, v2);
            dxf.Entities.Add(DxfLine23);

            DxfLine DxfLine56 = new DxfLine(v3, v6);
            dxf.Entities.Add(DxfLine56);

            DxfLine DxfLine14 = new DxfLine(v1, v4);
            dxf.Entities.Add(DxfLine14);

            DxfLine DxfLine74 = new DxfLine(v2, v5);
            dxf.Entities.Add(DxfLine74);

            DxfLine DxfLine25 = new DxfLine(v3, v7);
            dxf.Entities.Add(DxfLine25);

            DxfLine DxfLine71 = new DxfLine(v6, v7);
            dxf.Entities.Add(DxfLine71);
        }
Пример #15
0
        //画右支架
        public static void writeRighStand(DxfModel dxf, DLocation DLocation, double height, double width, double outer_in_space)
        {
            DxfLine outLeft = new DxfLine(new Point3D(DLocation.X, DLocation.Y, DLocation.Z), new Point3D(DLocation.X + width, DLocation.Y, DLocation.Z));
            DxfLine outRight = new DxfLine(new Point3D(DLocation.X + width, DLocation.Y, DLocation.Z), new Point3D(DLocation.X + width, DLocation.Y + height, DLocation.Z));
            DxfLine outBottom = new DxfLine(new Point3D(DLocation.X, DLocation.Y, DLocation.Z), new Point3D(DLocation.X, DLocation.Y + height, DLocation.Z));
            DxfLine outTop = new DxfLine(new Point3D(DLocation.X, DLocation.Y + height, DLocation.Z), new Point3D(DLocation.X + width, DLocation.Y + height, DLocation.Z));
            dxf.Entities.Add(outLeft);
            dxf.Entities.Add(outRight);
            dxf.Entities.Add(outBottom);
            dxf.Entities.Add(outTop);

            DxfLine inRight = new DxfLine(new Point3D(DLocation.X + width - outer_in_space, DLocation.Y + outer_in_space, DLocation.Z), new Point3D(DLocation.X + width - outer_in_space, DLocation.Y + height - outer_in_space, DLocation.Z));
            DxfLine inTop = new DxfLine(new Point3D(DLocation.X + outer_in_space, DLocation.Y + height - outer_in_space, DLocation.Z), new Point3D(DLocation.X + width - outer_in_space, DLocation.Y + height - outer_in_space, DLocation.Z));
            DxfLine inBottom = new DxfLine(new Point3D(DLocation.X + outer_in_space, DLocation.Y + outer_in_space, DLocation.Z), new Point3D(DLocation.X + width - outer_in_space, DLocation.Y + outer_in_space, DLocation.Z));

            DxfLine inLeftTop = new DxfLine(new Point3D(DLocation.X + outer_in_space, DLocation.Y + height - 7 * outer_in_space, DLocation.Z), new Point3D(DLocation.X + outer_in_space, DLocation.Y + height - outer_in_space, DLocation.Z));
            DxfLine inLeftBottom = new DxfLine(new Point3D(DLocation.X + outer_in_space, DLocation.Y + outer_in_space, DLocation.Z), new Point3D(DLocation.X + outer_in_space, DLocation.Y + 7 * outer_in_space, DLocation.Z));
            DxfLine inLeftTopLine = new DxfLine(new Point3D(DLocation.X, DLocation.Y + height - 7 * outer_in_space, DLocation.Z), new Point3D(DLocation.X + outer_in_space, DLocation.Y + height - 7 * outer_in_space, DLocation.Z));
            DxfLine inLeftBettomLine = new DxfLine(new Point3D(DLocation.X, DLocation.Y + 7 * outer_in_space, DLocation.Z), new Point3D(DLocation.X + outer_in_space, DLocation.Y + 7 * outer_in_space, DLocation.Z));

            dxf.Entities.Add(inTop);
            dxf.Entities.Add(inRight);
            dxf.Entities.Add(inBottom);
            dxf.Entities.Add(inLeftTop);
            dxf.Entities.Add(inLeftBottom);
            dxf.Entities.Add(inLeftTopLine);
            dxf.Entities.Add(inLeftBettomLine);
        }
Пример #16
0
        //画表示门闩的小矩形
        public static void writeRepresentDoorBarRectangle(DxfModel doc, DLocation DLocation, string[] DxfText, double height, double width, double outer_mid_space, double outer_in_space, double barHeight, double barWidth)
        {
            DxfLine bottomDxfLine = new DxfLine(new Point3D(DLocation.X, DLocation.Y, DLocation.Z), new Point3D(DLocation.X + barWidth, DLocation.Y, DLocation.Z));

            DxfLine leftDxfLine = new DxfLine(new Point3D(DLocation.X, DLocation.Y, DLocation.Z), new Point3D(DLocation.X, DLocation.Y + barHeight, DLocation.Z));

            DxfLine topDxfLine = new DxfLine(new Point3D(DLocation.X, DLocation.Y + barHeight, DLocation.Z), new Point3D(DLocation.X + barWidth, DLocation.Y + barHeight, DLocation.Z));

            DxfLine rightDxfLine = new DxfLine(new Point3D(DLocation.X + barWidth, DLocation.Y + barHeight, DLocation.Z), new Point3D(DLocation.X + barWidth, DLocation.Y, DLocation.Z));

               //内部折线
            DxfLine upDxfLine = new DxfLine(new Point3D(DLocation.X + barWidth / 2-(outer_in_space-outer_mid_space)/2, DLocation.Y + barHeight, DLocation.Z), new Point3D(DLocation.X + barWidth / 2-(outer_in_space-outer_mid_space)/2, DLocation.Y + barHeight / 2, DLocation.Z));
            DxfLine midDxfLine = new DxfLine(new Point3D(DLocation.X + barWidth / 2 - (outer_in_space - outer_mid_space) / 2, DLocation.Y + barHeight / 2, DLocation.Z), new Point3D(DLocation.X + barWidth / 2 + (outer_in_space - outer_mid_space) / 2,DLocation.Y+barHeight/2,DLocation.Z));

            DxfLine downDxfLine = new DxfLine(new Point3D(DLocation.X + barWidth / 2 + (outer_in_space - outer_mid_space) / 2, DLocation.Y + barHeight / 2, DLocation.Z), new Point3D(DLocation.X+barWidth/2+(outer_in_space-outer_mid_space)/2, DLocation.Y, DLocation.Z));

            doc.Entities.Add(bottomDxfLine);
            doc.Entities.Add(leftDxfLine);
            doc.Entities.Add(topDxfLine);
            doc.Entities.Add(rightDxfLine);
            doc.Entities.Add(upDxfLine);
            doc.Entities.Add(midDxfLine);
            doc.Entities.Add(downDxfLine);
        }
Пример #17
0
        //最外围矩形
        public static void writeOuterDoorRectangle(DxfModel doc, DLocation DLocation,double height, double width)
        {
            //最外围矩形
            DxfLine outerBottomDxfLine = new DxfLine(new Point3D(DLocation.X, DLocation.Y, DLocation.Z), new Point3D(DLocation.X + width, DLocation.Y, DLocation.Z));

            DxfLine outerLeftDxfLine = new DxfLine(new Point3D(DLocation.X, DLocation.Y, DLocation.Z), new Point3D(DLocation.X, DLocation.Y + height, DLocation.Z));

            DxfLine outerTopDxfLine = new DxfLine(new Point3D(DLocation.X, DLocation.Y + height, DLocation.Z), new Point3D(DLocation.X + width, DLocation.Y + height, DLocation.Z));

            DxfLine outerRightDxfLine = new DxfLine(new Point3D(DLocation.X + width, DLocation.Y + height, DLocation.Z), new Point3D(DLocation.X + width, DLocation.Y, DLocation.Z));

            doc.Entities.Add(outerBottomDxfLine);
            doc.Entities.Add(outerLeftDxfLine);
            doc.Entities.Add(outerTopDxfLine);
            doc.Entities.Add(outerRightDxfLine);
        }
Пример #18
0
        //画两个门无门闩的设备
        public static void writeDoubleDoorRectangle(DxfModel doc,DLocation DLocation,string [] DxfText,double height,double width,double outer_mid_space,double outer_in_space)
        {
            DxfLine outerLeftDxfLine=new DxfLine(new Point3D(DLocation.X+width/2-width/14,DLocation.Y+outer_mid_space,DLocation.Z),new Point3D(DLocation.X+width/2-width/14,DLocation.Y+height-outer_mid_space,DLocation.Z));

            DxfLine inLeftDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 - width / 14 + 0.5f, DLocation.Y + outer_in_space, DLocation.Z), new Point3D(DLocation.X + width / 2 - width / 14 + 0.5f, DLocation.Y + height - outer_in_space, DLocation.Z));

            DxfLine inRightDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 + width / 14, DLocation.Y + outer_in_space, DLocation.Z), new Point3D(DLocation.X + width / 2 + width / 14, DLocation.Y + height - outer_in_space, DLocation.Z));

            DxfLine outerRightDxfLine = new DxfLine(new Point3D(DLocation.X + width / 2 + width / 14 + 0.5f, DLocation.Y + outer_mid_space, DLocation.Z), new Point3D(DLocation.X + width / 2 + width / 14 + 0.5f, DLocation.Y + height - outer_mid_space, DLocation.Z));

            doc.Entities.Add(outerLeftDxfLine);
            doc.Entities.Add(inLeftDxfLine);
            doc.Entities.Add(inRightDxfLine);
            doc.Entities.Add(outerRightDxfLine);
            writeDoorRectangle(doc, DLocation,DxfText, height, width, outer_mid_space, outer_in_space);
        }
Пример #19
0
        /// <summary>
        /// 绘制订单信息块
        /// </summary>
        /// <param name="dxf"></param>
        /// <param name="DLocation"></param>
        /// <param name="boxWidth"></param>
        /// <param name="configurations"></param>
        public static void Draw(DxfModel dxf, DLocation DLocation,double boxWidth, OrderEntity orderEntity)
        {
            double factor = 0.6f;
            Point3D v1 = new Point3D(DLocation.X,DLocation.Y,DLocation.Z);
            Point3D v2 = new Point3D(DLocation.X + boxWidth, DLocation.Y, DLocation.Z);
            Point3D v3 = new Point3D(DLocation.X + boxWidth, DLocation.Y + 40.0d * factor, DLocation.Z);
            Point3D v4 = new Point3D(DLocation.X, DLocation.Y + 40.0d * factor, DLocation.Z);

            Point3D v5 = new Point3D(DLocation.X, DLocation.Y + 10.0d * factor, DLocation.Z);
            Point3D v6 = new Point3D(DLocation.X + boxWidth / 4, DLocation.Y + 10.0d * factor, DLocation.Z);
            Point3D v7 = new Point3D(DLocation.X + boxWidth / 2, DLocation.Y + 10.0d * factor, DLocation.Z);
            Point3D v8 = new Point3D(DLocation.X + boxWidth * 3 / 4, DLocation.Y + 10.0d * factor, DLocation.Z);
            Point3D v9 = new Point3D(DLocation.X + boxWidth * 7 / 8, DLocation.Y + 10.0d * factor, DLocation.Z);

            Point3D v10 = new Point3D(DLocation.X + boxWidth / 4, DLocation.Y + 20.0d * factor, DLocation.Z);
            Point3D v11 = new Point3D(DLocation.X + boxWidth / 2, DLocation.Y + 20.0d * factor, DLocation.Z);
            Point3D v12 = new Point3D(DLocation.X + boxWidth * 3 / 4, DLocation.Y + 20.0d * factor, DLocation.Z);
            Point3D v13 = new Point3D(DLocation.X + boxWidth * 7 / 8, DLocation.Y + 20.0d * factor, DLocation.Z);
            Point3D v14 = new Point3D(DLocation.X + boxWidth, DLocation.Y + 20.0d * factor, DLocation.Z);

            Point3D v15 = new Point3D(DLocation.X + boxWidth / 4, DLocation.Y + 40.0d * factor, DLocation.Z);
            Point3D v16 = new Point3D(DLocation.X + boxWidth * 3 / 4, DLocation.Y + 40.0d * factor, DLocation.Z);

            Point3D v17 = new Point3D(DLocation.X + boxWidth / 4, DLocation.Y, DLocation.Z);
            Point3D v18 = new Point3D(DLocation.X + boxWidth / 2, DLocation.Y, DLocation.Z);
            Point3D v19 = new Point3D(DLocation.X + boxWidth * 3 / 4, DLocation.Y, DLocation.Z);

            Point3D v20 = new Point3D(DLocation.X + boxWidth, DLocation.Y + 10.0d * factor, DLocation.Z);

            //横向四道
            DxfLine DxfLine12 = new DxfLine(v1, v2);
            dxf.Entities.Add(DxfLine12);

            DxfLine DxfLine520 = new DxfLine(v5, v20);
            dxf.Entities.Add(DxfLine520);

            DxfLine DxfLine1014 = new DxfLine(v10, v14);
            dxf.Entities.Add(DxfLine1014);

            DxfLine DxfLine43 = new DxfLine(v4, v3);
            dxf.Entities.Add(DxfLine43);

            //纵向6道
            DxfLine DxfLine41 = new DxfLine(v4, v1);
            dxf.Entities.Add(DxfLine41);

            DxfLine DxfLine1517 = new DxfLine(v15, v17);
            dxf.Entities.Add(DxfLine1517);

            DxfLine DxfLine1118 = new DxfLine(v11, v18);
            dxf.Entities.Add(DxfLine1118);

            DxfLine DxfLine1619 = new DxfLine(v16, v19);
            dxf.Entities.Add(DxfLine1619);

            DxfLine DxfLine139 = new DxfLine(v13, v9);
            dxf.Entities.Add(DxfLine139);

            DxfLine DxfLine32= new DxfLine(v3, v2);
            dxf.Entities.Add(DxfLine32);

            //文字

            Point3D vt1 = new Point3D(v1.X + 1.0d, v1.Y + 2.5f, v1.Z);
            DxfText t1 = new DxfText("Celebrity 1.0.0", vt1, 2.0d);
            dxf.Entities.Add(t1);

            Point3D vt2 = new Point3D(v17.X + 1.0d, v17.Y + 2.5f, v1.Z);
            DxfText t2 = new DxfText("PREPARER:  "+orderEntity.Preparer, vt2, 2.0d);
            dxf.Entities.Add(t2);

            Point3D vt3 = new Point3D(v18.X + 1.0d, v18.Y + 2.5f, v1.Z);
            DxfText t3 = new DxfText("ENGINEER:  "+orderEntity.Engineer, vt3, 2.0d);
            dxf.Entities.Add(t3);

            Point3D vt4 = new Point3D(v19.X + 1.0d, v19.Y + 2.5f, v1.Z);
            DxfText t4 = new DxfText("SHIP ORDER NO:  "+orderEntity.ShipOrderNo, vt4, 2.0d);
            dxf.Entities.Add(t4);

            Point3D vt5 = new Point3D(v4.X + 1.0d, v10.Y + 2.5f, v1.Z);
            DxfText t5= new DxfText("     AAON  COIL  PRODUCTS  inc.", vt5, 3.0d);
            dxf.Entities.Add(t5);

            Point3D vt6 = new Point3D(v5.X + 1.0d, v5.Y + 2.5f, v1.Z);
            DxfText t6 = new DxfText("LONGVIEW  TEXAS", vt6, 2.0d);
            dxf.Entities.Add(t6);

            Point3D vt7 = new Point3D(v6.X + 1.0d, v6.Y + 2.5f, v1.Z);
            DxfText t7 = new DxfText("PURCHASER:  " + orderEntity.Purchaser, vt7, 2.0d);
            dxf.Entities.Add(t7);

            Point3D vt8 = new Point3D(v7.X + 1.0d, v7.Y + 2.5f, v1.Z);
            DxfText t8 = new DxfText("PURCHASE ORDER:  " + orderEntity.PurchaseOrder, vt8, 2.0d);
            dxf.Entities.Add(t8);

            Point3D vt9 = new Point3D(v8.X + 1.0d, v8.Y + 2.5f, v1.Z);
            DxfText t9 = new DxfText("SERIAL NO:  " + orderEntity.SeriaNo, vt9, 2.0d);
            dxf.Entities.Add(t9);

            Point3D vt10 = new Point3D(v9.X + 1.0d, v9.Y + 2.5f, v1.Z);
            DxfText t10 = new DxfText("DATE: "+DateTime.Now.ToShortDateString(), vt10, 2.0d);
            dxf.Entities.Add(t10);

            Point3D vt11 = new Point3D(v15.X + 1.0d, v15.Y - 7.5f, v1.Z);
            DxfText t11 = new DxfText("JOB NAME:", vt11, 2.0d);
            dxf.Entities.Add(t11);

            Point3D vt12 = new Point3D(v10.X + 10.0d, v10.Y + 2.5f, v1.Z);
            DxfText t12 = new DxfText(orderEntity.JobName, vt12, 2.0d);
            dxf.Entities.Add(t12);

            Point3D vt13 = new Point3D(v16.X + 1.0d, v16.Y - 7.5f, v1.Z);
            DxfText t13 = new DxfText("UNIT TAG:", vt13, 2.0d);
            dxf.Entities.Add(t13);

            Point3D vt14 = new Point3D(v12.X + 20.0d, v12.Y + 2.5f, v1.Z);
            DxfText t14 = new DxfText(orderEntity.UnitTag, vt14, 2.0d);
            dxf.Entities.Add(t14);
        }
Пример #20
0
        //画单门有门闩的矩形框
        public static void writeDoorBarRectangle(DxfModel doc, DLocation DLocation, string[] DxfText, double height, double width, double outer_mid_space, double outer_in_space,double barHeight,double barWidth)
        {
            //最外围矩形
            writeOuterDoorRectangle(doc, DLocation, height, width);

            //中间矩形
            DxfLine midBottomDxfLine = new DxfLine(new Point3D(DLocation.X + outer_mid_space, DLocation.Y + outer_mid_space, DLocation.Z), new Point3D(DLocation.X + width - outer_mid_space, DLocation.Y + outer_mid_space, DLocation.Z));

            DxfLine midDownLeftDxfLine = new DxfLine(new Point3D(DLocation.X + outer_mid_space, DLocation.Y + outer_mid_space, DLocation.Z), new Point3D(DLocation.X + outer_mid_space, DLocation.Y + height / 4, DLocation.Z));

            DxfLine midMidLeftDxfLine = new DxfLine(new Point3D(DLocation.X + outer_mid_space, DLocation.Y + height / 4 + barHeight, DLocation.Z), new Point3D(DLocation.X + outer_mid_space, DLocation.Y + 3 * height / 4 - barHeight, DLocation.Z));

            DxfLine midUpLeftDxfLine = new DxfLine(new Point3D(DLocation.X + outer_mid_space, DLocation.Y + 3*height / 4, DLocation.Z), new Point3D(DLocation.X + outer_mid_space, DLocation.Y +height-outer_mid_space, DLocation.Z));

            DxfLine midTopDxfLine = new DxfLine(new Point3D(DLocation.X + outer_mid_space, DLocation.Y + height - outer_mid_space, DLocation.Z), new Point3D(DLocation.X + width - outer_mid_space, DLocation.Y + height - outer_mid_space, DLocation.Z));

            DxfLine midRightDxfLine = new DxfLine(new Point3D(DLocation.X + width - outer_mid_space, DLocation.Y + height - outer_mid_space, DLocation.Z), new Point3D(DLocation.X + width - outer_mid_space, DLocation.Y + outer_mid_space, DLocation.Z));

            doc.Entities.Add(midBottomDxfLine);
            doc.Entities.Add(midDownLeftDxfLine);
            doc.Entities.Add(midMidLeftDxfLine);
            doc.Entities.Add(midUpLeftDxfLine);
            doc.Entities.Add(midTopDxfLine);
            doc.Entities.Add(midRightDxfLine);

            //内部矩形

            DxfLine inBottomDxfLine = new DxfLine(new Point3D(DLocation.X + outer_in_space, DLocation.Y + outer_in_space, DLocation.Z), new Point3D(DLocation.X + width - outer_in_space, DLocation.Y + outer_in_space, DLocation.Z));

            DxfLine inDownLeftDxfLine = new DxfLine(new Point3D(DLocation.X + outer_in_space, DLocation.Y + outer_in_space, DLocation.Z), new Point3D(DLocation.X + outer_in_space, DLocation.Y + height/4, DLocation.Z));

            DxfLine inmidLeftDxfLine = new DxfLine(new Point3D(DLocation.X + outer_in_space, DLocation.Y + height / 4 + barHeight, DLocation.Z), new Point3D(DLocation.X + outer_in_space, DLocation.Y + 3*height/4 - barHeight, DLocation.Z));

            DxfLine inUpLeftDxfLine = new DxfLine(new Point3D(DLocation.X + outer_in_space, DLocation.Y + 3*height / 4, DLocation.Z), new Point3D(DLocation.X + outer_in_space, DLocation.Y + height-outer_in_space, DLocation.Z));

            DxfLine inTopDxfLine = new DxfLine(new Point3D(DLocation.X + outer_in_space, DLocation.Y + height - outer_in_space, DLocation.Z), new Point3D(DLocation.X + width - outer_in_space, DLocation.Y + height - outer_in_space, DLocation.Z));

            DxfLine inRightDxfLine = new DxfLine(new Point3D(DLocation.X + width - outer_in_space, DLocation.Y + height - outer_in_space, DLocation.Z), new Point3D(DLocation.X + width - outer_in_space, DLocation.Y + outer_in_space, DLocation.Z));

            doc.Entities.Add(inBottomDxfLine);
            doc.Entities.Add(inDownLeftDxfLine);
            doc.Entities.Add(inmidLeftDxfLine);
            doc.Entities.Add(inUpLeftDxfLine);
            doc.Entities.Add(inTopDxfLine);
            doc.Entities.Add(inRightDxfLine);

            //门中文字
            double DxfTextHeight = DoorInitHeightAndWidth.DxfTextHeight;
            for (int i = 0; i < DxfText.Length; i++)
            {
                DxfText doorRectangleDxfText = new DxfText(DxfText[i], new Point3D(DLocation.X + width / 3, DLocation.Y + 3 * height / 4 - i * DxfTextHeight, DLocation.Z), DxfTextHeight);

                doc.Entities.Add(doorRectangleDxfText);
            }
        }