Method Grid
- Namespace
- GeometryHelper.Meshing
- Assembly
- GeometryHelper.dll
Grid(double, double, double, GridAlignment, GridAlignment)
A grid of cells along the X and Y axes, or along a rectangle's own sides, standing against the shape as the alignments say.
public static MeshOptions Grid(double cellWidth, double cellHeight, double joint = 0, GridAlignment alignU = GridAlignment.Start, GridAlignment alignV = GridAlignment.Start)
Parameters
cellWidthdoubleThe size of a cell along the grid's first axis.
cellHeightdoubleThe size of a cell along the grid's second axis.
jointdoubleThe gap between two neighbouring cells, along both axes; nought for none.
alignUGridAlignmentWhere the grid stands along its first axis.
alignVGridAlignmentWhere the grid stands along its second axis.
Returns
Exceptions
- ArgumentOutOfRangeException
Thrown when a cell size is not a finite number above nought, the joint is negative or not a finite number, or an alignment is not one of GridAlignment.
Grid(double, double, GeoPoint2, double)
A grid of cells along the X and Y axes, or along a rectangle's own sides, with a cell starting at a point.
public static MeshOptions Grid(double cellWidth, double cellHeight, GeoPoint2 origin, double joint = 0)
Parameters
cellWidthdoubleThe size of a cell along the grid's first axis.
cellHeightdoubleThe size of a cell along the grid's second axis.
originGeoPoint2Where a cell has its first corner, the one it starts from along both axes.
jointdoubleThe gap between two neighbouring cells, along both axes; nought for none.
Returns
Exceptions
- ArgumentOutOfRangeException
Thrown when a cell size is not a finite number above nought, the joint is negative or not a finite number, or the origin is not a finite point.