public void ProcessSlabs() { //for (int i = 0; i < Slabs.Count; i++) // Slabs[i] = Slabs[i].Select(p => new MWPoint2D(p.X * pictureScale, p.Y * pictureScale)).ToList(); Slabs = PicSlabs.Select(s => new Slab() { RawPoints = s.Select(p => new MWPoint2D(p.X, p.Y)).ToList() }).ToList(); }
public double GetPicLongestEdge() { List <List <MWPoint2D> > slabsClosed = PicSlabs.Select(s => s.Append(s[0]).ToList()).ToList(); double max = 0; for (int i = 0; i < slabsClosed.Count; i++) { for (int j = 0; j < slabsClosed[i].Count - 1; j++) { double dist = Points.Distance(slabsClosed[i][j], slabsClosed[i][j + 1]); max = dist > max ? dist : max; } } return(max); }