Method ToMesh
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
ToMesh(MeshKind)
Breaks the disc into faces of a kind, its grid level, using the default tolerance. A grid needs the size of its cells, which ToMesh(MeshOptions) takes.
public GeoMesh3 ToMesh(MeshKind kind)
Parameters
kindMeshKindThe kind of faces.
Returns
- GeoMesh3
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 disc into faces as the options say, its grid level, with the second axis up the slope, using the default tolerance.
public GeoMesh3 ToMesh(MeshOptions options)
Parameters
optionsMeshOptionsHow to break it up.
Returns
- GeoMesh3
The mesh; one with no faces when there is no area.
ToMesh(MeshOptions, Tolerance)
Breaks the disc into faces as the options say, its grid level, with the second axis up the slope, within a tolerance.
public GeoMesh3 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
- GeoMesh3
The mesh; one with no faces when there is no area.
ToMesh(MeshOptions, MeshPlacement3)
Breaks the disc into faces as the options say, its grid standing as the placement says, using the default tolerance.
public GeoMesh3 ToMesh(MeshOptions options, MeshPlacement3 placement)
Parameters
optionsMeshOptionsHow to break it up.
placementMeshPlacement3Which way the grid or the strips run in the plane, and where a cell starts.
Returns
- GeoMesh3
The mesh; one with no faces when there is no area.
ToMesh(MeshOptions, MeshPlacement3, Tolerance)
Breaks the disc into faces as the options say, its grid standing as the placement says, within a tolerance: triangles, the cells of a grid, strips or convex pieces, each a simple polygon with no hole, counter-clockwise about the normal, meeting its neighbours edge to edge.
public GeoMesh3 ToMesh(MeshOptions options, MeshPlacement3 placement, Tolerance tolerance)
Parameters
optionsMeshOptionsHow to break it up.
placementMeshPlacement3Which way the grid or the strips run in the plane, and where a cell starts.
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
- GeoMesh3
The mesh; one with no faces when the minor radius is no more than the point tolerance.
Remarks
The rim is flattened by the options' chord tolerance first, as ToPolygonByChordTolerance(double) flattens it, and the triangles fanned from the centre. The mesh's normal is the ellipse's.
Exceptions
- ArgumentNullException
Thrown when the options or the placement are null.
- ArgumentException
Thrown when the options give an origin of the plane, a grid's cell is no larger than the point tolerance, the grid would lay more cells over the shape than a mesh may have, or the placement's direction stands square to the plane.