Ejemplo n.º 1
0
        /// <summary>
        /// 生成浏览dxf代码
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button3_Click(object sender, EventArgs e)
        {
            //DxfDocument dxf = new DxfDocument();
            DxfModel dxf = new DxfModel(DxfVersion.Dxf15);
            //获取dxf图纸左上角图纸说明信息
            List<string> dxfImageInfoList = FrontPhotoService.translateImageInfo(FrontPhotoService.productionDescription, imageBoxList);
            //缩放到真实比例
            List<ImageEntity> dxfPaintImageBoxList = new List<ImageEntity>();
            for (int i = 0; i < imageBoxList.Count;i++ )
            {
                ImageEntity dxfPaintEntity = new ImageEntity();
                dxfPaintEntity.Name = imageBoxList.ElementAt(i).Name;
                dxfPaintEntity.Rect = imageBoxList.ElementAt(i).Rect;
                dxfPaintEntity.imageWidth = imageBoxList.ElementAt(i).imageWidth;
                dxfPaintEntity.Type = imageBoxList.ElementAt(i).Type;
                dxfPaintEntity.Url = imageBoxList.ElementAt(i).Url;
                dxfPaintEntity.Text = imageBoxList.ElementAt(i).Text;
                dxfPaintEntity.firstDistance = imageBoxList.ElementAt(i).firstDistance;
                dxfPaintEntity.secondDistance = imageBoxList.ElementAt(i).secondDistance;
                dxfPaintEntity.coolingType = imageBoxList.ElementAt(i).coolingType;
                dxfPaintEntity.thirdDistance = imageBoxList.ElementAt(i).thirdDistance;
                dxfPaintEntity.topViewFirstDistance = imageBoxList.ElementAt(i).topViewFirstDistance;
                dxfPaintEntity.topViewSecondDistance = imageBoxList.ElementAt(i).topViewSecondDistance;
                dxfPaintImageBoxList.Add(dxfPaintEntity);
            }
                dxfPaintImageBoxList = FrontPhotoService.zoomOutImageEntity(dxfPaintImageBoxList, 1 / FrontPhotoService.factor);
            List<PictureBoxInfo> dxfReflectPictureNameList = new List<PictureBoxInfo>();
            for (int i = 0, len = dxfPaintImageBoxList.Count; i < len; i++)
            {
                ImageEntity imageEntity = dxfPaintImageBoxList.ElementAt(i);
               // if(imageEntity.Name!="virtualHRA"){
                     PictureBoxInfo pbi = new PictureBoxInfo();
                //pbi.location = new Location(tempDxfRelectPictureBox.Location.X,tempDxfRelectPictureBox.Location.Y,0);
                     pbi.DLocation = new DLocation(imageEntity.Rect.X, imageEntity.Rect.Y, 0);
                     pbi.height = imageEntity.Rect.Height;
                    //相当于设备的长度
                     pbi.width = imageEntity.Rect.Width;
                     pbi.topViewHeight = imageEntity.imageWidth;
                     pbi.name = imageEntity.Name;
                     pbi.text = TextSplitService.textSplit(imageEntity.Text);
                     pbi.firstDistance = imageEntity.firstDistance;
                     pbi.secondDistance = imageEntity.secondDistance;
                     pbi.coolingType = imageEntity.coolingType;
                     pbi.thirdDistance = imageEntity.thirdDistance;
                     pbi.topViewFirstDistance = imageEntity.topViewFirstDistance;
                     pbi.topViewSecondDistance = imageEntity.topViewSecondDistance;
                     dxfReflectPictureNameList.Add(pbi);
               // }
            }

            //dxfReflectPictureNameList = FrontPhotoService.getRanglePictureInfoList(dxfReflectPictureNameList);

            DataCenter dataCenter = new DataCenter();
            dataCenter.SectionEntity = new SectionEntity("40", "60");
            dataCenter.OrderEntity = new OrderEntity("jobname", "unittag");
            //图纸左上角说明信息
            dataCenter.Configurations = dxfImageInfoList;

            dataCenter.detailMechineConfigure=new DetailMechineConfigure(dxfReflectPictureNameList,
                 new string[] { "hello", "world", "helloworld" }, 44.0f, 18, 1.0f, 1.56f, 2.0f, 2.0f);
            dataCenter.topViewConfigure = new TopViewConfigure(dxfReflectPictureNameList, dxf, null, 50.0f, 18.0f, 2.0f, 2.86f, 2.0f, 2.0f);

            //float totalWidth = TotalWidthAndHeight.getWidth(dxfReflectPictureNameList);
            //获得下层链表
            List<ImageEntity> tempDownList = FrontPhotoService.getDownList(imageBoxList);
            double totalWidth = TotalWidthAndHeight.getWidth(tempDownList);
            //double totalWidth = TotalWidthAndHeight.getWidth(dxfReflectPictureNameList);
            if (AssembleDetailMechine.isTwoLayers(dxfReflectPictureNameList)!=-1)
            {
                //float[] upOrDownHeightOrViewHieght = new float[3];
                double[] upOrDownHeightOrViewHieght = new double[3];
                upOrDownHeightOrViewHieght = TotalWidthAndHeight.getEachLayerHight(dxfReflectPictureNameList);
                dataCenter.BoxEntity = new BoxEntity { DownHeight = upOrDownHeightOrViewHieght[0], UpHeight = upOrDownHeightOrViewHieght[1], Width = totalWidth, TopViewHeight = upOrDownHeightOrViewHieght[2], IsLeft =FrontPhotoService.mirrorDirection.Equals("mirrorRight")?true:false };
            }
            else
            {
                //float[] upOrDownHeightOrViewHieght = new float[3];
                double[] upOrDownHeightOrViewHieght = new double[3];
                upOrDownHeightOrViewHieght = TotalWidthAndHeight.getEachLayerHight(dxfReflectPictureNameList);
                dataCenter.BoxEntity = new BoxEntity { DownHeight = upOrDownHeightOrViewHieght[0], UpHeight = 0, Width = totalWidth, TopViewHeight = upOrDownHeightOrViewHieght[2], IsLeft = FrontPhotoService.mirrorDirection.Equals("mirrorRight") ? true : false };
            }

            OuterBox outerBox = new OuterBox();
            outerBox.dataCenter = dataCenter;
            //outerBox.Draw(dxf, new Location(500, 500), 306, 188, dxfReflectPictureNameList,5);
            outerBox.Draw(dxf, new DLocation(FrontPhotoService.leftStartX, FrontPhotoService.leftStartY), 306, 188, dxfReflectPictureNameList, 5);

            //dxf.Save("AutoCad2007.dxf", DxfVersion.AutoCad2007);
            //dxf.Save("AutoCad2004.dxf", DxfVersion.AutoCad2004);
            //dxf.Save("AutoCad2000.dxf", DxfVersion.AutoCad2000);
            //dxf.Save("AutoCad12.dxf", DxfVersion.AutoCad12);

            DxfWriter.Write("DxfWriteExample-R15-ascii.dxf", dxf, false);
            DxfWriter.Write("DxfWriteExample-R15-bin.dxf", dxf, true);

            DxfViewer dv = new DxfViewer();
            dv.setDxfFile("DxfWriteExample-R15-ascii.dxf");
            dv.Show();

            //MessageBox.Show("图纸生成成功!");
        }
Ejemplo n.º 2
0
 public static float getImageBlocksByNames(PictureBoxInfo pictureBoxInfo, int coolingPower)
 {
     using (var context = new AnnonContext())
     {
         try
         {
                 string name = pictureBoxInfo.name;
                 var imageBlock = context.ImageBlocks
                 .Where(s => s.CoolingPower == coolingPower
                 && s.ImageName == name)
                 .First();
             return imageBlock.ImageLength;
         }
         catch (Exception e)
         {
             return 0;
         }
     }
 }
Ejemplo n.º 3
0
        //上下层组装和单层组装函数
        public static void assembleDetailMechine(List<PictureBoxInfo> imageNameList, DxfDocument dxf, Location location, DetailMechineConfigure dmc,int coolingType)
        {
            if (isTwoLayers(imageNameList))
            {
                List<PictureBoxInfo> oneImageNameList = new List<PictureBoxInfo>();
                List<PictureBoxInfo> twoImageNameList = new List<PictureBoxInfo>();
                for (int i = 0, len = imageNameList.Count; i < len; i++)
                {
                    if (i == 0)
                    {

                        if (imageNameList.ElementAt(i).name.Equals("HRA"))
                        {
                            //这里的virtralPictrueBox和realPictureBox中设置的Y坐标只是为后面onelist和twolist判断是其作用,其他没什么实质作用
                            PictureBoxInfo virtualPictureBox = new PictureBoxInfo();
                            virtualPictureBox.name = "virtualHRA";
                            //主要为了记录虚拟的框的坐标,为了画dxf是提供依据
                            //virtualPictureBox.location = new Location(imageNameList.ElementAt(i).location.X, imageNameList.ElementAt(i).location.Y + 113 + 4, imageNameList.ElementAt(i).location.Z);
                            virtualPictureBox.location = new Location(imageNameList.ElementAt(i).location.X, imageNameList.ElementAt(i).location.Y, imageNameList.ElementAt(i).location.Z);
                            oneImageNameList.Add(virtualPictureBox);
                            PictureBoxInfo realPictureBox = new PictureBoxInfo();
                            realPictureBox.name = imageNameList.ElementAt(i).name;
                            realPictureBox.location = new Location(imageNameList.ElementAt(i).location.X,imageNameList.ElementAt(i).location.Y+113+4,imageNameList.ElementAt(i).location.Z);
                            twoImageNameList.Add(realPictureBox);
                        }
                        else
                        {
                            oneImageNameList.Add(imageNameList.ElementAt(i));
                        }
                    }
                    else
                    {
                        if (oneImageNameList.ElementAt(0).location.Y == imageNameList.ElementAt(i).location.Y)
                        {

                            if (imageNameList.ElementAt(i).name.Equals("HRA"))
                            {
                                PictureBoxInfo virtualPictureBox = new PictureBoxInfo();
                                virtualPictureBox.name = "virtualHRA";
                                virtualPictureBox.location = new Location(imageNameList.ElementAt(i).location.X, imageNameList.ElementAt(i).location.Y + 113 + 4, imageNameList.ElementAt(i).location.Z);
                                oneImageNameList.Add(virtualPictureBox);
                                twoImageNameList.Add(imageNameList.ElementAt(i));
                            }
                            else
                            {
                                oneImageNameList.Add(imageNameList.ElementAt(i));
                            }
                        }
                        else
                        {
                            if (imageNameList.ElementAt(i).name.Equals("HRA"))
                            {
                                PictureBoxInfo virtualPictureBox = new PictureBoxInfo();
                                virtualPictureBox.name = "virtualHRA";
                                virtualPictureBox.location = new Location(imageNameList.ElementAt(i).location.X, imageNameList.ElementAt(i).location.Y + 113 + 4, imageNameList.ElementAt(i).location.Z);
                                twoImageNameList.Add(virtualPictureBox);
                                oneImageNameList.Add(imageNameList.ElementAt(i));
                            }
                            else
                            {
                                twoImageNameList.Add(imageNameList.ElementAt(i));
                            }
                        }
                    }
                }
                //判断上下层进行判断
                if (oneImageNameList.Count > 0 && twoImageNameList.Count > 0)
                {
                    //这里的location.Y 是前台组图的Y坐标,他和dxf的启示坐标刚好相反,在左上角
                    if (oneImageNameList.ElementAt(0).location.Y <twoImageNameList.ElementAt(0).location.Y)
                    {
                        //下层
                        assembleDetailMechine(twoImageNameList, dxf, location, dmc.text, dmc.height, dmc.width,dmc.outer_mid_space,dmc.outer_in_space, dmc.barHeight, dmc.barWidth,"downLayer");
                        writeTopOrBottomDimension(storeLocationList,dxf,"bottom");
                        writeRightDimension(storeLocationList, dxf, dmc.height, "rightDownLayer");
                        //上层
                        Location upLocation = TotalWidthAndHeight.getUpLayerLocation(twoImageNameList, oneImageNameList, coolingType);
                        assembleDetailMechine(oneImageNameList, dxf, new Location(location.X+upLocation.X,location.Y+upLocation.Y,location.Z), dmc.text, dmc.height, dmc.width, dmc.outer_mid_space,dmc.outer_in_space, dmc.barHeight, dmc.barWidth,"upLayer");
                        writeRightDimension(storeLocationList, dxf, dmc.height, "rightUpLayer");
                    }
                    else
                    {
                        //下层
                        assembleDetailMechine(oneImageNameList, dxf, location, dmc.text, dmc.height, dmc.width, dmc.outer_mid_space, dmc.outer_in_space, dmc.barHeight, dmc.barWidth,"upLayer");
                        writeTopOrBottomDimension(storeLocationList, dxf, "bottom");
                        writeRightDimension(storeLocationList, dxf, dmc.height, "rightDownLayer");
                        //上层
                        Location upLocation = TotalWidthAndHeight.getUpLayerLocation(oneImageNameList,twoImageNameList, coolingType);
                        assembleDetailMechine(twoImageNameList, dxf, new Location(location.X + upLocation.X, location.Y + upLocation.Y, location.Z), dmc.text, dmc.height, dmc.width, dmc.outer_mid_space, dmc.outer_in_space, dmc.barHeight, dmc.barWidth,"upLayer");
                        writeRightDimension(storeLocationList, dxf, dmc.height, "rightUpLayer");
                    }
                }
            }
                //单层情况
            else
            {
                assembleDetailMechine(imageNameList, dxf, location, dmc.text, dmc.height, dmc.width, dmc.outer_mid_space,dmc.outer_in_space, dmc.barHeight, dmc.barWidth,"downLayer");
                writeTopOrBottomDimension(storeLocationList, dxf, "bottom");
                writeRightDimension(storeLocationList, dxf, dmc.height, "rightDownLayer");
            }
        }
Ejemplo n.º 4
0
 //比较器
 private static int comparison(PictureBoxInfo pictureInfo1, PictureBoxInfo pictureInfo2)
 {
     return pictureInfo1.DLocation.X.CompareTo(pictureInfo2.DLocation.X);
 }
Ejemplo n.º 5
0
 public static void writeTotalBottomDimension(PictureBoxInfo startpictureBoxInfo,int totalWidth,DxfModel dxf, string topOrBottom, double DxfTextHeight = 16, double DxfTextWidth = 3, double dimensionHeight = 8)
 {
     DLocation secondDLocation = new DLocation(startpictureBoxInfo.DLocation.X + totalWidth, startpictureBoxInfo.DLocation.Y, startpictureBoxInfo.DLocation.Z);
     DoorRectangle.writeDimension(dxf, startpictureBoxInfo.DLocation, secondDLocation, DxfTextHeight, DxfTextWidth, dimensionHeight, topOrBottom);
 }
Ejemplo n.º 6
0
 //风中top或bottom的dimension
 public static void writeTopOrBottomDimension(PictureBoxInfo pictureBoxInfo, DxfModel dxf, string topOrBottom, double DxfTextHeight = 16, double DxfTextWidth = 3, double dimensionHeight = 10)
 {
     if (topOrBottom.Equals("top"))
     {
         DLocation secondDLocation = new DLocation(pictureBoxInfo.DLocation.X + pictureBoxInfo.width, pictureBoxInfo.DLocation.Y+pictureBoxInfo.height, pictureBoxInfo.DLocation.Z);
         DoorRectangle.writeDimension(dxf, new DLocation(pictureBoxInfo.DLocation.X,pictureBoxInfo.DLocation.Y+pictureBoxInfo.height,pictureBoxInfo.DLocation.Z), secondDLocation, DxfTextHeight, DxfTextWidth, dimensionHeight, topOrBottom);
     }
     else if (topOrBottom.Equals("bottom"))
     {
         DLocation secondDLocation = new DLocation(pictureBoxInfo.DLocation.X + pictureBoxInfo.width, pictureBoxInfo.DLocation.Y, pictureBoxInfo.DLocation.Z);
         DoorRectangle.writeDimension(dxf, pictureBoxInfo.DLocation, secondDLocation, DxfTextHeight, DxfTextWidth, dimensionHeight, topOrBottom);
     }
 }
Ejemplo n.º 7
0
 //封装左边或右边一次画两个标注
 public static void writeLeftOrRightDimension(PictureBoxInfo pictureBoxInfo, DLocation DLocation, DxfModel dxf, string leftOrRight,double DxfTextHeight = 16, double DxfTextWidth = 3, double dimensionHeight = 8)
 {
     if (leftOrRight.Equals("right"))
     {
         DLocation secondDLocation = new DLocation(DLocation.X+pictureBoxInfo.width, DLocation.Y + pictureBoxInfo.firstDistance, DLocation.Z);
         DoorRectangle.writeDimension(dxf, new DLocation(DLocation.X+pictureBoxInfo.width,DLocation.Y,DLocation.Z), secondDLocation, DxfTextHeight, DxfTextWidth, dimensionHeight, leftOrRight);
         DoorRectangle.writeDimension(dxf, secondDLocation, new DLocation(secondDLocation.X, secondDLocation.Y + pictureBoxInfo.secondDistance, secondDLocation.Z), DxfTextHeight, DxfTextWidth, dimensionHeight, leftOrRight);
     }
     else if (leftOrRight.Equals("left"))
     {
         DLocation secondDLocation = new DLocation(DLocation.X, DLocation.Y + pictureBoxInfo.firstDistance, DLocation.Z);
         DoorRectangle.writeDimension(dxf, DLocation, secondDLocation, DxfTextHeight, DxfTextWidth, dimensionHeight, leftOrRight);
         DoorRectangle.writeDimension(dxf, secondDLocation, new DLocation(secondDLocation.X, secondDLocation.Y + pictureBoxInfo.secondDistance, secondDLocation.Z), DxfTextHeight, DxfTextWidth, dimensionHeight, leftOrRight);
     }
 }
Ejemplo n.º 8
0
        public static void assembleDetailMechine(PictureBoxInfo pictureBoxInfo, DxfModel dxf, DLocation DLocation, string[] DxfText, double height, double width, double outer_mid_space, double outer_in_space, double barHeight, double barWidth, string upOrDownLayer="downUpLayer")
        {
            string imageName = pictureBoxInfo.name;

            if (imageName.Equals("FTA") || imageName.Equals("FTC") || imageName.Equals("FTF") || imageName.Equals("FTH") || imageName.Equals("FTE"))
                {
                   // DoorRectangle.writeRighStand(dxf, DLocation, 6 , 3, outer_in_space/21);
                    DoorRectangle.writeWholeSingleDoor(dxf, DLocation, DxfText, height, width, outer_mid_space, outer_in_space, barHeight, barWidth, upOrDownLayer);

                }
                else if(imageName.Equals("MBA")||imageName.Equals("MBD")||imageName.Equals("MBG"))
                {

                    DoorRectangle.writeLeftFasnSingleDoor(dxf, DLocation, DxfText, height, width, outer_mid_space, outer_in_space, barHeight, barWidth, upOrDownLayer);

                }
                else if (imageName.Equals("MBE") || imageName.Equals("MBB"))
                {
                    DoorRectangle.writeTopFanSingleDoor(dxf, DLocation, DxfText, height, width, outer_mid_space, outer_in_space, barHeight, barWidth, upOrDownLayer);
                }
                else if (imageName.Equals("MBH") || imageName.Equals("MBJ"))
                {
                    DoorRectangle.writeTopLeftFasnSingleDoor(dxf, DLocation, DxfText, height, width, outer_mid_space, outer_in_space, barHeight, barWidth, upOrDownLayer);
                }
                else if (imageName.Equals("MBF") || imageName.Equals("MBI"))
                {
                    DoorRectangle.writeBottoFanSingleDoor(dxf, DLocation, DxfText, height, width, outer_mid_space, outer_in_space, barHeight, barWidth, upOrDownLayer);
                }
                else if (imageName.Equals("MBC") || imageName.Equals("MBK"))
                {
                    DoorRectangle.writeLeftBottomFansSingleDoor(dxf, DLocation, DxfText, height, width, outer_mid_space, outer_in_space, barHeight, barWidth, upOrDownLayer);
                }
                else if (imageName.Equals("PHB"))
                {
                    DoorRectangle.writeWholeSingleDoorTwoCirle(dxf, DLocation, DxfText, height, width, outer_mid_space, outer_in_space);

                }
                else if (imageName.Equals("PHA"))
                {
                    DoorRectangle.writeDoorRectangle(dxf, DLocation, DxfText, height, width, outer_mid_space, outer_in_space);
                }
                else if (imageName.Equals("PHC") || imageName.Equals("PHD"))
                {
                    DoorRectangle.writeWholeSingleTwoBarAndTwoCirle(dxf, DLocation, DxfText, height, width, outer_mid_space, outer_in_space, barHeight, barWidth);
                }

                else if (imageName.Equals("HRA"))
                {

                    DoorRectangle.writeWholeSingleDoor(dxf, DLocation, DxfText, height, width, outer_mid_space, outer_in_space, barHeight, barWidth, upOrDownLayer);

                }
                else if (imageName.Equals("virtualHRA"))
                {

                }
                else if (imageName.Equals("CLC") || imageName.Equals("CLB") || imageName.Equals("CLM") || imageName.Equals("CLG") || imageName.Equals("CLI"))
                {
                    DoorRectangle.writeWholeSingleDoorTwoCirle(dxf, DLocation, DxfText, height, width, outer_mid_space, outer_in_space);
                }
                else if (imageName.Equals("CLF"))
                {
                    DoorRectangle.writeFourCircleDoor(dxf, DLocation, DxfText, height, width, outer_mid_space, outer_in_space);
                }
            else if (imageName.Equals("SFA") || imageName.Equals("SFC") || imageName.Equals("SDB") || imageName.Equals("SDD"))
                {

                    DoorRectangle.writeWholeDoorFourHandle(dxf, DLocation, DxfText, height, width, outer_mid_space, outer_in_space, barHeight, barWidth, upOrDownLayer);

                }
            else if (imageName.Equals("PEA") || imageName.Equals("PEC") || imageName.Equals("RFA") || imageName.Equals("EDB") || imageName.Equals("RDB"))
                {
                    DoorRectangle.writeWholeSingleDoor(dxf, DLocation, DxfText, height, width, outer_mid_space, outer_in_space, barHeight, barWidth, upOrDownLayer);
                }
                else if (imageName.Equals("SFD"))
                {
                    DoorRectangle.writeWholeSingleDoor(dxf, DLocation, DxfText, height, width, outer_mid_space, outer_in_space, barHeight, barWidth, upOrDownLayer);
                }
            else if (imageName.Equals("BBA") || imageName.Equals("BBB") || imageName.Equals("BBC") || imageName.Equals("BBD") || imageName.Equals("BBE") || imageName.Equals("BBF"))
                {

                    DoorRectangle.writeDoorRectangle(dxf, DLocation, DxfText, height, width, outer_mid_space, outer_in_space);

                }
            else if (imageName.Equals("TRA") || imageName.Equals("TRB") || imageName.Equals("TRC") || imageName.Equals("TRD") || imageName.Equals("TRE") || imageName.Equals("TRF"))
                {
                    DoorRectangle.writeDoorRectangle(dxf, DLocation, DxfText, height, width, outer_mid_space, outer_in_space);
                }
        }
Ejemplo n.º 9
0
        public static void assembleTopView(List<PictureBoxInfo> imageNameList, DxfDocument dxf, Location location, TopViewConfigure tvc)
        {
            if (AssembleDetailMechine.isTwoLayers(imageNameList))
            {
                List<PictureBoxInfo> oneImageNameList = new List<PictureBoxInfo>();
                List<PictureBoxInfo> twoImageNameList = new List<PictureBoxInfo>();
                for (int i = 0, len = imageNameList.Count; i < len; i++)
                {
                    if (i == 0)
                    {

                        if (imageNameList.ElementAt(i).name.Equals("HRA"))
                        {
                            //这里的virtralPictrueBox和realPictureBox中设置的Y坐标只是为后面onelist和twolist判断是其作用,其他没什么实质作用
                            PictureBoxInfo virtualPictureBox = new PictureBoxInfo();
                            virtualPictureBox.name = "virtualHRA";
                            //主要为了记录虚拟的框的坐标,为了画dxf是提供依据
                            //virtualPictureBox.location = new Location(imageNameList.ElementAt(i).location.X, imageNameList.ElementAt(i).location.Y + 113 + 4, imageNameList.ElementAt(i).location.Z);
                            virtualPictureBox.location = new Location(imageNameList.ElementAt(i).location.X, imageNameList.ElementAt(i).location.Y, imageNameList.ElementAt(i).location.Z);
                            oneImageNameList.Add(virtualPictureBox);
                            PictureBoxInfo realPictureBox = new PictureBoxInfo();
                            realPictureBox.name = imageNameList.ElementAt(i).name;
                            realPictureBox.location = new Location(imageNameList.ElementAt(i).location.X, imageNameList.ElementAt(i).location.Y + 113 + 4, imageNameList.ElementAt(i).location.Z);
                            twoImageNameList.Add(realPictureBox);
                        }
                        else
                        {
                            oneImageNameList.Add(imageNameList.ElementAt(i));
                        }
                    }
                    else
                    {
                        if (oneImageNameList.ElementAt(0).location.Y == imageNameList.ElementAt(i).location.Y)
                        {

                            if (imageNameList.ElementAt(i).name.Equals("HRA"))
                            {
                                PictureBoxInfo virtualPictureBox = new PictureBoxInfo();
                                virtualPictureBox.name = "virtualHRA";
                                virtualPictureBox.location = new Location(imageNameList.ElementAt(i).location.X, imageNameList.ElementAt(i).location.Y + 113 + 4, imageNameList.ElementAt(i).location.Z);
                                oneImageNameList.Add(virtualPictureBox);
                                twoImageNameList.Add(imageNameList.ElementAt(i));
                            }
                            else
                            {
                                oneImageNameList.Add(imageNameList.ElementAt(i));
                            }
                        }
                        else
                        {
                            if (imageNameList.ElementAt(i).name.Equals("HRA"))
                            {
                                PictureBoxInfo virtualPictureBox = new PictureBoxInfo();
                                virtualPictureBox.name = "virtualHRA";
                                virtualPictureBox.location = new Location(imageNameList.ElementAt(i).location.X, imageNameList.ElementAt(i).location.Y + 113 + 4, imageNameList.ElementAt(i).location.Z);
                                twoImageNameList.Add(virtualPictureBox);
                                oneImageNameList.Add(imageNameList.ElementAt(i));
                            }
                            else
                            {
                                twoImageNameList.Add(imageNameList.ElementAt(i));
                            }
                        }
                    }
                }
                if (oneImageNameList.Count > twoImageNameList.Count)
                {
                    assembleTopView(oneImageNameList, dxf, location, tvc.text, tvc.height, tvc.width, tvc.outer_mid_space, tvc.outer_in_space, tvc.barHeight, tvc.barWidth);
                }
                else
                {
                    assembleTopView(twoImageNameList, dxf, location, tvc.text, tvc.height, tvc.width, tvc.outer_mid_space, tvc.outer_in_space, tvc.barHeight, tvc.barWidth);
                }
            }
            else
            {
                assembleTopView(imageNameList, dxf, location, tvc.text, tvc.height, tvc.width, tvc.outer_mid_space, tvc.outer_in_space, tvc.barHeight, tvc.barWidth);
            }
        }