public void PolygonGrid() { var polygon = new RegularPolygon(5, 4, PolygonOrientation.OnEdge); var grid = new PolygonGrid(polygon) { Size = new SizeI(10, 10) }; Subdivision division = grid.ToSubdivision(PointD.Empty).Source; CheckSearch(division); grid.Element = new RegularPolygon(5, 4, PolygonOrientation.OnVertex); division = grid.ToSubdivision(PointD.Empty).Source; CheckSearch(division); grid.Element = new RegularPolygon(5, 6, PolygonOrientation.OnEdge); division = grid.ToSubdivision(PointD.Empty).Source; CheckSearch(division); grid.Element = new RegularPolygon(5, 6, PolygonOrientation.OnVertex); division = grid.ToSubdivision(PointD.Empty).Source; CheckSearch(division); }
public void PolygonGrid() { var grid = new PolygonGrid(new RegularPolygon(10, 4, PolygonOrientation.OnEdge)); grid.Size = new SizeI(6, 4); var division = grid.ToSubdivision(PointD.Empty); CheckGridDivision(division); grid = new PolygonGrid(new RegularPolygon(10, 4, PolygonOrientation.OnVertex)); grid.Size = new SizeI(4, 6); division = grid.ToSubdivision(PointD.Empty); CheckGridDivision(division); grid = new PolygonGrid(new RegularPolygon(10, 6, PolygonOrientation.OnEdge)); grid.Size = new SizeI(6, 4); division = grid.ToSubdivision(PointD.Empty); CheckGridDivision(division); grid = new PolygonGrid(new RegularPolygon(10, 6, PolygonOrientation.OnVertex)); grid.Size = new SizeI(4, 6); division = grid.ToSubdivision(PointD.Empty); CheckGridDivision(division); }