Method ToMesh
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
ToMesh(MeshKind)
Breaks the loop into faces of a kind, using the default tolerance. A grid needs the size of its cells, which ToMesh(MeshOptions) takes.
public GeoMesh2 ToMesh(MeshKind kind)
Parameters
kindMeshKindThe kind of faces.
Returns
- GeoMesh2
The mesh; one with no faces when there is no area.
Exceptions
- ArgumentException
Thrown for Grid, which needs the size of its cells.
ToMesh(MeshOptions)
Breaks the loop into faces as the options say, using the default tolerance.
public GeoMesh2 ToMesh(MeshOptions options)
Parameters
optionsMeshOptionsHow to break it up.
Returns
- GeoMesh2
The mesh; one with no faces when there is no area.
ToMesh(MeshOptions, Tolerance)
Breaks the loop into faces as the options say, within a tolerance: triangles, the cells of a grid, strips or convex pieces, each a simple polygon with no hole, counter-clockwise, meeting its neighbours edge to edge.
public GeoMesh2 ToMesh(MeshOptions options, Tolerance tolerance)
Parameters
optionsMeshOptionsHow to break it up.
toleranceToleranceThe tolerance the shape is read within: which of its rings touch, what has no area, and for a grid which cells are whole.
Returns
- GeoMesh2
The mesh; one with no faces when there is no area.
Remarks
Each arc is flattened first, by the options' chord tolerance, as Flatten(double) flattens it.
Exceptions
- ArgumentNullException
Thrown when the options are null.
- ArgumentException
Thrown when a grid's cell is no larger than the point tolerance, or the grid would lay more cells over the shape than a mesh may have.