public void drawPlaceExp(ref string a)
        {
            int index = 0;

            if (points.Count < 2)
            {
                return;
            }
            for (int i = 0; i < points[index].Count - 1; i++)
            {
                a += AutocadExport.drawLine(points[index][i], points[index][i + 1]);
            }

            if (vinoska != null && vinoska[index] != null)
            {
                a += AutocadExport.drawLine(vinoska[index].startPoint, vinoska[index].vertex1);
                a += AutocadExport.drawLine(vinoska[index].vertex1, vinoska[index].vertex2);

                if (vinoska[index].vertex1.X < vinoska[index].vertex2.X)
                {
                    a += AutocadExport.drawText(new RectangleF(vinoska[index].vertex1.X, vinoska[index].vertex1.Y - 30, 100, 30), labels[index]);
                }
                else
                {
                    a += AutocadExport.drawText(new RectangleF(vinoska[index].vertex2.X, vinoska[index].vertex1.Y - 30, 100, 30), labels[index]);
                }
            }
        }
        public void drawStrExp(ref string a)
        {
            int index = 3;

            if (points.Count < 2)
            {
                return;
            }
            for (int i = 0; i < points[index].Count - 1; i++)
            {
                a += AutocadExport.drawLine(new Point(points[index][i].X + offsetConnection * 3, points[index][i].Y), new Point(points[index][i + 1].X + offsetConnection * 3, points[index][i + 1].Y));
            }

            if (vinoska != null && vinoska[index] != null)
            {
                a += AutocadExport.drawLine(new Point(vinoska[index].startPoint.X + offsetConnection * 3, vinoska[index].startPoint.Y), new Point(vinoska[index].vertex1.X + offsetConnection * 3, vinoska[index].vertex1.Y));
                a += AutocadExport.drawLine(new Point(vinoska[index].vertex1.X + offsetConnection * 3, vinoska[index].vertex1.Y), new Point(vinoska[index].vertex2.X + offsetConnection * 3, vinoska[index].vertex2.Y));

                if (vinoska[index].vertex1.X < vinoska[index].vertex2.X)
                {
                    a += AutocadExport.drawText(new RectangleF(vinoska[index].vertex1.X + offsetConnection * 3, vinoska[index].vertex1.Y - 30, 100, 30), labels[index]);
                }
                else
                {
                    a += AutocadExport.drawText(new RectangleF(vinoska[index].vertex2.X + offsetConnection * 3, vinoska[index].vertex1.Y - 30, 100, 30), labels[index]);
                }
            }
        }
예제 #3
0
        public override void drawConExp(ref string result)
        {
            int index = 1;

            result += AutocadExport.drawrect(new Rectangle(offsetConnection + locations[index].X, locations[index].Y, scales[index].X, scales[index].Y));
            result += AutocadExport.drawText(new RectangleF(offsetConnection + locations[index].X, locations[index].Y - 30, scales[index].X, 30), labels[index]);
        }
예제 #4
0
        public override void drawStrExp(ref string result)
        {
            int localSheetIndex = 3;

            if (!inbox)
            {
                return;
            }
            result += AutocadExport.drawrect(new  Rectangle(offsetConnection * 3 + locations[localSheetIndex].X, locations[localSheetIndex].Y, scales[localSheetIndex].X, scales[localSheetIndex].Y));
            //g.DrawLines(new Pen(Brushes.Black, 3), new Point[] { locations[localSheetIndex],
            //    new Point(locations[localSheetIndex].X + scales[localSheetIndex].X, locations[localSheetIndex].Y),
            //    new Point(locations[localSheetIndex].X + scales[localSheetIndex].X, locations[localSheetIndex].Y + scales[localSheetIndex].Y),
            //    new Point(locations[localSheetIndex].X, locations[localSheetIndex].Y + scales[localSheetIndex].Y),
            //    locations[localSheetIndex] });


            StringFormat f = new StringFormat();

            f.Alignment     = StringAlignment.Center;
            f.LineAlignment = StringAlignment.Center;
            //найти название
            if (Schemes_Editor.mainList.Find(x => x.id == globalId) != null)
            {
                result += AutocadExport.drawText(new RectangleF(offsetConnection * 3 + locations[localSheetIndex].X, locations[localSheetIndex].Y, scales[localSheetIndex].X, scales[localSheetIndex].Y), labels[localSheetIndex]);
                //  g.DrawString(labels[localSheetIndex], new Font("Arial", 7), Brushes.DarkRed, new RectangleF(locations[localSheetIndex].X, locations[localSheetIndex].Y, scales[localSheetIndex].X, scales[localSheetIndex].Y));
            }

            //if (vinoska != null)
            //{
            //    g.DrawLines(Pens.Blue, new Point[] { vinoska.startPoint, vinoska.vertex1, vinoska.vertex2 });
            //    g.DrawString(vinoska.text, new Font("Arial", 14), Brushes.DarkGreen, vinoska.vertex1.X, vinoska.vertex1.Y - 30);
            //}
        }
 public void drawExp(ref string a, int index)
 {
     if (index == 2)
     {
         return;
     }
     a += AutocadExport.drawrect(new Rectangle(locations[index].X + offsetConnection * index, locations[index].Y, locations[index].Width, locations[index].Height));
     a += AutocadExport.drawText(new RectangleF(locations[index].X + offsetConnection * index, locations[index].Y - 30, locations[index].Width, 30), labels[index]);
 }
예제 #6
0
        public override void drawStrExp(ref string result)
        {
            int offsetConnection = 3000;
            var target           = Schemes_Editor.mainList.Find(x => x.id == globalId);

            if (units == -1)
            {
                units = Convert.ToInt32(target.properties["Количество юнитов (шт)"]);
            }
            int i = 3;

            //  g.DrawRectangle(Pens.Black, locations[i].X, locations[i].Y, scales[i].X, scales[i].Y);
            //    g.DrawRectangle(Pens.Black, locations[i].X + 20, locations[i].Y + 30, scales[i].X - 40, scales[i].Y - 60);
            // unitSize = (scales[i].Y - 60) / (units * 1.0f);
            unitSize  = 40;
            scales[i] = new Point(scales[i].X, (int)(unitSize * equipInside.Count + 40));
            result   += AutocadExport.drawrect(new Rectangle(offsetConnection * 3 + locations[i].X, locations[i].Y, scales[i].X, scales[i].Y));
            //   g.DrawRectangle(Pens.Black, locations[i].X, locations[i].Y, scales[i].X, scales[i].Y);
            for (int j = 0; j < equipInside.Count; j++)
            {
                //equipInside[j].locations[i] = new Point(locations[i].X + 20, (int)(locations[i].Y + 30 + positions[j] * unitSize));
                //equipInside[j].scales[i] = new Point(scales[i].X - 40, (int)unitSize-30);////
                equipInside[j].locations[i] = new Point(locations[i].X + 20, (int)(locations[i].Y + 20 + j * unitSize));
                equipInside[j].scales[i]    = new Point(scales[i].X - 40, (int)unitSize - 20);////
            }

            if (equipInside.Count > 1)
            {
                for (int j = 1; j < equipInside.Count; j++)
                {
                    result += AutocadExport.drawLine(offsetConnection * 3 + locations[i].X + scales[i].X / 2 - 13, locations[i].Y + 20 + unitSize * j - 18, offsetConnection * 3 + locations[i].X + scales[i].X / 2 + 13, locations[i].Y + 20 + (unitSize * j - 2));
                    result += AutocadExport.drawLine(offsetConnection * 3 + locations[i].X + scales[i].X / 2 - 13, locations[i].Y + 20 + (unitSize) * j - 2, offsetConnection * 3 + locations[i].X + scales[i].X / 2 + 13, locations[i].Y + 20 + (unitSize * j - 18));
                    //g.DrawLine(new Pen(Color.Blue, 3), locations[i].X + scales[i].X / 2 - 13, locations[i].Y + 20 + unitSize * j - 18, locations[i].X + scales[i].X / 2 + 13, locations[i].Y + 20 + (unitSize * j - 2));
                    //g.DrawLine(new Pen(Color.Blue, 3), locations[i].X + scales[i].X / 2 - 13, locations[i].Y + 20 + (unitSize) * j - 2, locations[i].X + scales[i].X / 2 + 13, locations[i].Y + 20 + (unitSize * j - 18));
                }
            }

            //по надписи
            StringFormat f = new StringFormat();

            f.Alignment = StringAlignment.Center;
            //найти название
            if (Schemes_Editor.mainList.Find(x => x.id == globalId) != null)
            {
                //     string roomName = Schemes_Editor.mainList.Find(x => x.id == globalId).name;
                result += AutocadExport.drawText(new RectangleF(offsetConnection * 3 + locations[i].X, locations[i].Y - 30, scales[i].X, 30), labels[i]);
                //g.DrawString(labels[i], new Font("Arial", 10), Brushes.DarkRed, new RectangleF(locations[i].X, locations[i].Y - 30, scales[i].X, 30), f);
            }
        }
        public override void drawStrExp(ref string result)
        {
            int localSheetIndex             = 3;
            List <Equipment.VectorPic> list = new List <Equipment.VectorPic>();

            if (Schemes_Editor.mainList.Find(x => x.id == globalId).inPlacementScheme != null)
            {
                list.Add(Schemes_Editor.mainList.Find(x => x.id == globalId).inPlacementScheme.copy());
            }
            else
            {
                list.Add(null);
            }

            if (Schemes_Editor.mainList.Find(x => x.id == globalId).inConnectionScheme != null)
            {
                list.Add(Schemes_Editor.mainList.Find(x => x.id == globalId).inConnectionScheme.copy());
            }
            else
            {
                list.Add(null);
            }

            if (Schemes_Editor.mainList.Find(x => x.id == globalId).inBox != null)
            {
                list.Add(Schemes_Editor.mainList.Find(x => x.id == globalId).inBox.copy());
            }
            else
            {
                list.Add(null);
            }

            if (Schemes_Editor.mainList.Find(x => x.id == globalId).inStructural != null)
            {
                list.Add(Schemes_Editor.mainList.Find(x => x.id == globalId).inStructural.copy());
            }
            else
            {
                list.Add(null);
            }

            if (list[localSheetIndex] != null)
            {
                Equipment.Point WidthHeight = list[localSheetIndex].GetProp();
                float           Xprop       = WidthHeight.X / (scales[localSheetIndex].X * 1.0f),
                                Yprop = WidthHeight.Y / (scales[localSheetIndex].Y * 1.0f);
                list[localSheetIndex].divide(Xprop, Yprop);

                //foreach (var j in list[localSheetIndex].circles)
                //    g.DrawEllipse(Pens.Black, locations[localSheetIndex].X + (float)j.center.X - (float)j.radiusX, locations[localSheetIndex].Y + (float)j.center.Y - (float)j.radiusY, (float)j.radiusX * 2, (float)j.radiusY * 2);

                foreach (var j in list[localSheetIndex].polyLines)
                {
                    for (int k = 0; k < j.Count - 1; k++)
                    {
                        result += AutocadExport.drawLine(offsetConnection * 3 + j[k].X + locations[localSheetIndex].X, j[k].Y + locations[localSheetIndex].Y, offsetConnection * 3 + j[k + 1].X + locations[localSheetIndex].X, j[k + 1].Y + locations[localSheetIndex].Y);
                        //g.DrawLine(Pens.Black, j[k].X + locations[localSheetIndex].X, j[k].Y + locations[localSheetIndex].Y, j[k + 1].X + locations[localSheetIndex].X, j[k + 1].Y + locations[localSheetIndex].Y);
                    }
                }
            }
            //по надписи
            StringFormat f = new StringFormat();

            f.Alignment = StringAlignment.Center;
            //найти название
            if (Schemes_Editor.mainList.Find(x => x.id == globalId) != null)
            {
                string roomName = Schemes_Editor.mainList.Find(x => x.id == globalId).name;
                result += AutocadExport.drawText(new RectangleF(offsetConnection * 3 + locations[localSheetIndex].X, locations[localSheetIndex].Y - 30, scales[localSheetIndex].X, 30), roomName);
                //   g.DrawString(roomName, new Font("Arial", 10), Brushes.DarkRed, new RectangleF(locations[localSheetIndex].X, locations[localSheetIndex].Y - 30, scales[localSheetIndex].X, 30), f);
            }
        }
예제 #8
0
        public override void drawBoxExp(ref string result)
        {
            var target = Schemes_Editor.mainList.Find(x => x.id == globalId);

            if (units == -1)
            {
                units = Convert.ToInt32(target.properties["Количество юнитов (шт)"]);
            }

            int scheme = 2;



            result += AutocadExport.drawrect(new Rectangle(offsetConnection * 2 + locations[scheme].X, locations[scheme].Y, scales[scheme].X, scales[scheme].Y));
            result += AutocadExport.drawrect(new Rectangle(offsetConnection * 2 + locations[scheme].X + 20, locations[scheme].Y + 30, scales[scheme].X - 40, scales[scheme].Y - 60));

            unitSize = (scales[scheme].Y - 60) / (units * 1.0f);


            //найти название
            if (Schemes_Editor.mainList.Find(x => x.id == globalId) != null)
            {
                string boxName = Schemes_Editor.mainList.Find(x => x.id == globalId).name;

                result += AutocadExport.drawText(new Rectangle(offsetConnection * 2 + locations[scheme].X, locations[scheme].Y - 30, scales[scheme].X, 30), boxName);
            }

            //по таблице
            //leftupper point
            int one = 30, two = 100, three = 150;
            int total  = one + two + three;
            int heigth = 30;

            Point lu = new Point(locations[scheme].X + scales[scheme].X + 30, locations[scheme].Y);

            //heaader
            result += AutocadExport.drawText(offsetConnection * 2 + lu.X, lu.Y, one, heigth, "Поз");
            result += AutocadExport.drawText(offsetConnection * 2 + lu.X + one, lu.Y, two, heigth, "Наименование");
            result += AutocadExport.drawText(offsetConnection * 2 + lu.X + one + two, lu.Y, three, heigth, "Описание");

            for (int i = 0; i < equipInside.Count + 2; i++)
            {
                result += AutocadExport.drawLine(offsetConnection * 2 + lu.X, lu.Y + heigth * i, offsetConnection * 2 + lu.X + total, lu.Y + heigth * i);
            }

            result += AutocadExport.drawLine(offsetConnection * 2 + lu.X, lu.Y, offsetConnection * 2 + lu.X, lu.Y + heigth * (equipInside.Count + 1));
            result += AutocadExport.drawLine(offsetConnection * 2 + lu.X + one, lu.Y, offsetConnection * 2 + lu.X + one, lu.Y + heigth * (equipInside.Count + 1));
            result += AutocadExport.drawLine(offsetConnection * 2 + lu.X + one + two, lu.Y, offsetConnection * 2 + lu.X + one + two, lu.Y + heigth * (equipInside.Count + 1));
            result += AutocadExport.drawLine(offsetConnection * 2 + lu.X + one + two + three, lu.Y, offsetConnection * 2 + lu.X + one + two + three, lu.Y + heigth * (equipInside.Count + 1));

            for (int i = 1; i < equipInside.Count + 1; i++)
            {
                result += AutocadExport.drawText(offsetConnection * 2 + lu.X, lu.Y + i * heigth, one, heigth, i.ToString());
                result += AutocadExport.drawText(offsetConnection * 2 + lu.X + one, lu.Y + i * heigth, two, heigth, equipInside[i - 1].labels[scheme]);
                result += AutocadExport.drawText(offsetConnection * 2 + lu.X + one + two, lu.Y + i * heigth, three, heigth, Schemes_Editor.mainList.Find(x => x.id == equipInside[i - 1].globalId).description);
            }
            //мерная палка left doen start point
            lu      = new Point(locations[scheme].X - 100, (int)(locations[scheme].Y + scales[scheme].Y - 30 - unitSize));
            result += AutocadExport.drawLine(offsetConnection * 2 + locations[scheme].X - 100, locations[scheme].Y + scales[scheme].Y - 30, offsetConnection * 2 + locations[scheme].X - 80, locations[scheme].Y + scales[scheme].Y - 30);
            //  g.DrawLine(Pens.Black, locations[scheme].X - 100, locations[scheme].Y + scales[scheme].Y - 30, locations[scheme].X - 80, locations[scheme].Y + scales[scheme].Y - 30);
            for (int i = 0; i < units; i++)
            {
                result += AutocadExport.drawrect(new Rectangle(offsetConnection * 2 + lu.X, (int)(lu.Y - unitSize * i), 3, (int)unitSize));
                //   g.DrawRectangle(Pens.Black, lu.X, lu.Y - unitSize * i, 3, unitSize);
                if ((i + 1) % 5 == 0)
                {
                    result += AutocadExport.drawText(new RectangleF(offsetConnection * 2 + lu.X + 4, lu.Y - unitSize * i, 30, 20), (i + 1).ToString());
                    // g.DrawString((i + 1).ToString(), new Font("Arial", 7), Brushes.Black, lu.X + 4, lu.Y - unitSize * i);
                }
            }
            result += AutocadExport.drawLine(offsetConnection * 2 + locations[scheme].X - 100, locations[scheme].Y + scales[scheme].Y - 30 - unitSize * units, offsetConnection * 2 + locations[scheme].X - 80, locations[scheme].Y + scales[scheme].Y - 30 - unitSize * units);
            //g.DrawLine(Pens.Black, locations[scheme].X - 100, locations[scheme].Y + scales[scheme].Y - 30 - unitSize * units, locations[scheme].X - 80, locations[scheme].Y + scales[scheme].Y - 30 - unitSize * units);


            //    g.DrawString(j.ToString(), new Font("Arial", 7), Brushes.Black, new RectangleF(lu.X, lu.Y + 30 * i, one, 30), f);
            //    g.DrawString(equipInside[j - 1].boxLabel, new Font("Arial", 7), Brushes.Black, new RectangleF(lu.X + one, lu.Y + 30 * i, two, 30), f);
            //    g.DrawString(Schemes_Editor.mainList.Find(x => x.id == equipInside[j - 1].globalId).description, new Font("Arial", 7), Brushes.Black, new RectangleF(lu.X + one + two, lu.Y + 30 * i, three, 30), f);

            //int num = 1;
            //foreach (var j in equipInside)
            //{

            //    if (j.vinoska != null)
            //    {
            //        result += $"pline {j.vinoska.startPoint.X},{-j.vinoska.startPoint.Y} {j.vinoska.vertex1.X},{-j.vinoska.vertex1.Y}  {j.vinoska.vertex2.X},{-j.vinoska.vertex2.Y} \r\n";
            //        result += $"text {j.vinoska.vertex2.X},{-j.vinoska.vertex2.Y} 0 {num}\r\n";
            //    }
            //    num++;
            //}
        }
예제 #9
0
        public override void drawBoxExp(ref string result)
        {
            if (labels == null)
            {
                string name = Schemes_Editor.mainList.Find(x => x.id == globalId).name;
                labels = new string[] { name, name, name, name };
            }
            int localSheetIndex             = 2;
            List <Equipment.VectorPic> list = new List <Equipment.VectorPic>();

            if (Schemes_Editor.mainList.Find(x => x.id == globalId).inPlacementScheme != null)
            {
                list.Add(Schemes_Editor.mainList.Find(x => x.id == globalId).inPlacementScheme.copy());
            }
            else
            {
                list.Add(null);
            }

            if (Schemes_Editor.mainList.Find(x => x.id == globalId).inConnectionScheme != null)
            {
                list.Add(Schemes_Editor.mainList.Find(x => x.id == globalId).inConnectionScheme.copy());
            }
            else
            {
                list.Add(null);
            }

            if (Schemes_Editor.mainList.Find(x => x.id == globalId).inBox != null)
            {
                list.Add(Schemes_Editor.mainList.Find(x => x.id == globalId).inBox.copy());
            }
            else
            {
                list.Add(null);
            }

            if (Schemes_Editor.mainList.Find(x => x.id == globalId).inStructural != null)
            {
                list.Add(Schemes_Editor.mainList.Find(x => x.id == globalId).inStructural.copy());
            }
            else
            {
                list.Add(null);
            }

            if (list[localSheetIndex] != null)
            {
                Equipment.Point WidthHeight = list[localSheetIndex].GetProp();
                float           Xprop       = WidthHeight.X / (scales[localSheetIndex].X * 1.0f),
                                Yprop = WidthHeight.Y / (scales[localSheetIndex].Y * 1.0f);
                list[localSheetIndex].divide(Xprop, Yprop);

                //foreach (var j in list[localSheetIndex].circles)
                //    g.DrawEllipse(Pens.Black, locations[localSheetIndex].X + (float)j.center.X - (float)j.radiusX, locations[localSheetIndex].Y + (float)j.center.Y - (float)j.radiusY, (float)j.radiusX * 2, (float)j.radiusY * 2);

                foreach (var j in list[localSheetIndex].polyLines)
                {
                    for (int k = 0; k < j.Count - 1; k++)
                    {
                        result += AutocadExport.drawLine(offsetConnection * 2 + j[k].X + locations[localSheetIndex].X, j[k].Y + locations[localSheetIndex].Y, offsetConnection * 3 + j[k + 1].X + locations[localSheetIndex].X, j[k + 1].Y + locations[localSheetIndex].Y);
                        //g.DrawLine(Pens.Black, j[k].X + locations[localSheetIndex].X, j[k].Y + locations[localSheetIndex].Y, j[k + 1].X + locations[localSheetIndex].X, j[k + 1].Y + locations[localSheetIndex].Y);
                    }
                }
            }
            if (vinoska != null && vinoska[localSheetIndex] != null)
            {
                if (localSheetIndex == 2 && inbox)
                {
                    int index = 0;
                    //найти коробку в которой он
                    foreach (boxes i in Schemes_Editor.mainWorkList.Where(x => x is boxes))
                    {
                        int founded = i.equipInside.FindIndex(x => x.localID == localID);
                        if (founded != -1)
                        {
                            index = i.positions[founded] + 1;
                            break;
                        }
                    }
                    result += AutocadExport.drawLine(new Point(offsetConnection * 2 + vinoska[localSheetIndex].startPoint.X, vinoska[localSheetIndex].startPoint.Y), new Point(offsetConnection * 3 + vinoska[localSheetIndex].vertex1.X, vinoska[localSheetIndex].vertex1.Y));
                    //   g.DrawLines(Pens.Blue, new Point[] { vinoska[localSheetIndex].startPoint, vinoska[localSheetIndex].vertex1, vinoska[localSheetIndex].vertex2 });
                    if (vinoska[localSheetIndex].vertex1.X < vinoska[localSheetIndex].vertex2.X)
                    {
                        result += AutocadExport.drawText(offsetConnection * 2 + vinoska[localSheetIndex].vertex1.X, vinoska[localSheetIndex].vertex1.Y - 30, 50, 30, index.ToString());
                    }
                    //   g.DrawString(index.ToString(), new Font("Arial", 14), Brushes.DarkGreen, vinoska[localSheetIndex].vertex1.X, vinoska[localSheetIndex].vertex1.Y - 30);
                    else
                    {
                        result += AutocadExport.drawText(offsetConnection * 2 + vinoska[localSheetIndex].vertex2.X, vinoska[localSheetIndex].vertex1.Y - 30, 50, 30, index.ToString());
                    }
                    //   g.DrawString(index.ToString(), new Font("Arial", 14), Brushes.DarkGreen, vinoska[localSheetIndex].vertex2.X, vinoska[localSheetIndex].vertex1.Y - 30);
                }
                else
                {
                    result += AutocadExport.drawLine(new Point(offsetConnection * 2 + vinoska[localSheetIndex].startPoint.X, vinoska[localSheetIndex].startPoint.Y), new Point(offsetConnection * 3 + vinoska[localSheetIndex].vertex1.X, vinoska[localSheetIndex].vertex1.Y));
                    //   g.DrawLines(Pens.Blue, new Point[] { vinoska[localSheetIndex].startPoint, vinoska[localSheetIndex].vertex1, vinoska[localSheetIndex].vertex2 });
                    if (vinoska[localSheetIndex].vertex1.X < vinoska[localSheetIndex].vertex2.X)
                    {
                        result += AutocadExport.drawText(offsetConnection * 2 + vinoska[localSheetIndex].vertex1.X, vinoska[localSheetIndex].vertex1.Y - 30, 50, 30, labels[localSheetIndex]);
                    }
                    // g.DrawString(labels[localSheetIndex], new Font("Arial", 14), Brushes.DarkGreen, vinoska[localSheetIndex].vertex1.X, vinoska[localSheetIndex].vertex1.Y - 30);
                    else
                    {
                        result += AutocadExport.drawText(offsetConnection * 2 + vinoska[localSheetIndex].vertex2.X, vinoska[localSheetIndex].vertex1.Y - 30, 50, 30, labels[localSheetIndex]);
                    }
                    // g.DrawString(labels[localSheetIndex], new Font("Arial", 14), Brushes.DarkGreen, vinoska[localSheetIndex].vertex2.X, vinoska[localSheetIndex].vertex1.Y - 30);
                }
            }
        }