static void Main(string[] args) { //if (args.Length == 0) //{ // Console.WriteLine("Usage:ConcaveGenerator file"); //} //else //{ double value; List<Point2d> result = new List<Point2d>(); ProcessFile data = new ProcessFile(); List<Coordinate> points = new List<Coordinate>(); points = data.readFile("greencopy.txt"); //Console.WriteLine("输入分割阈值:"); //value = Convert.ToDouble(Console.ReadLine()); result = data.separate(points, 0.8); data.writeFile(result); //} }
private void checkEdge_Click(object sender, RoutedEventArgs e) { ProcessFile data = new ProcessFile(); List<Coordinate> cloud = data.readFile(); cloud.Sort(); for (int j = 0, i = 0; i < cloud.Count; i++) { if (cloud[i].z > cloud[j].z - 0.8) { surface.Add(cloud[i]); } else { addList(this.pointList, checkBall()); j = i; surface.Clear(); } } data.writeFile(this.pointList); }