private int getFEnumber(List <MyNode> nodes, MyPoint CenterPoint, FESearchSpace space, int currentModel)
        {
            int    numberFE = 0;
            double radius   = Mathematics.FindDist(new MyPoint(nodes[0].X, nodes[0].Y, MyPoint.PointType.IsAreaNode), CenterPoint);

            foreach (MyNode thisnode in nodes)
            {
                MyFiniteElement thisFE = this.parent.currentFullModel.FiniteElementModels[currentModel].FiniteElements.Find(
                    FE => (FE.Nodes[0].X == thisnode.X && FE.Nodes[0].Y == thisnode.Y) ||
                    (FE.Nodes[1].X == thisnode.X && FE.Nodes[1].Y == thisnode.Y) ||
                    (FE.Nodes[2].X == thisnode.X && FE.Nodes[2].Y == thisnode.Y));
                foreach (MyNode FEnode in thisFE.Nodes)
                {
                    if (space == FESearchSpace.outside)
                    {
                        if (Mathematics.FindDist(new MyPoint(FEnode.X, FEnode.Y, MyPoint.PointType.IsAreaNode), CenterPoint) > radius)
                        {
                            numberFE++;
                        }
                    }
                    else if (space == FESearchSpace.inside)
                    {
                        if (Mathematics.FindDist(new MyPoint(FEnode.X, FEnode.Y, MyPoint.PointType.IsAreaNode), CenterPoint) < radius)
                        {
                            numberFE++;
                        }
                    }
                }
            }
            return(numberFE);
        }
        private int getFEnumber(List <MyNode> nodes, LineAngleType angleType, FESearchSpace space, int currentModel)
        {
            int numberFE = 0;

            foreach (MyNode thisnode in nodes)
            {
                MyFiniteElement thisFE = this.parent.currentFullModel.FiniteElementModels[currentModel].FiniteElements.Find(
                    FE => (FE.Nodes[0].X == thisnode.X && FE.Nodes[0].Y == thisnode.Y) ||
                    (FE.Nodes[1].X == thisnode.X && FE.Nodes[1].Y == thisnode.Y) ||
                    (FE.Nodes[2].X == thisnode.X && FE.Nodes[2].Y == thisnode.Y));
                foreach (MyNode FEnode in thisFE.Nodes)
                {
                    if (angleType == LineAngleType.right_up)
                    {
                        if (space == FESearchSpace.up)
                        {
                            if ((FEnode.X < thisnode.X && FEnode.Y <= thisnode.Y) ||
                                (FEnode.X < thisnode.X && FEnode.Y >= thisnode.Y))
                            {
                                numberFE++;
                            }
                        }
                        else if (space == FESearchSpace.down)
                        {
                            if ((FEnode.Y < thisnode.Y && FEnode.X <= thisnode.X) ||
                                (FEnode.Y < thisnode.Y && FEnode.X >= thisnode.X))
                            {
                                numberFE++;
                            }
                        }
                    }
                    else if (angleType == LineAngleType.left_up)
                    {
                        if (space == FESearchSpace.up)
                        {
                            if ((FEnode.Y > thisnode.Y && FEnode.X <= thisnode.X) ||
                                (FEnode.Y > thisnode.Y && FEnode.X >= thisnode.X))
                            {
                                numberFE++;
                            }
                        }
                        else if (space == FESearchSpace.down)
                        {
                            if ((FEnode.X < thisnode.X && FEnode.Y <= thisnode.X) ||
                                (FEnode.X < thisnode.X && FEnode.Y >= thisnode.X))
                            {
                                numberFE++;
                            }
                        }
                    }
                }
            }
            return(numberFE);
        }