Method ToMesh
- Namespace
- GeometryHelper.Meshing
- Assembly
- GeometryHelper.dll
ToMesh(GeoPolygon2, MeshOptions)
Breaks a polygon into faces as the options say, using the default tolerance.
public static GeoMesh2 ToMesh(GeoPolygon2 polygon, MeshOptions options)
Parameters
polygonGeoPolygon2optionsMeshOptions
Returns
ToMesh(GeoPolygon2, MeshOptions, Tolerance)
Breaks a polygon into faces as the options say, within a tolerance.
public static GeoMesh2 ToMesh(GeoPolygon2 polygon, MeshOptions options, Tolerance tolerance)
Parameters
polygonGeoPolygon2The polygon; one crossing itself is read as MakeValid() reads it.
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 the polygon encloses no area.
Exceptions
- ArgumentNullException
Thrown when the shape or 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.
ToMesh(GeoFace2, MeshOptions)
Breaks a face into faces with no hole as the options say, using the default tolerance.
public static GeoMesh2 ToMesh(GeoFace2 face, MeshOptions options)
Parameters
faceGeoFace2optionsMeshOptions
Returns
ToMesh(GeoFace2, MeshOptions, Tolerance)
Breaks a face into faces with no hole as the options say, within a tolerance.
public static GeoMesh2 ToMesh(GeoFace2 face, MeshOptions options, Tolerance tolerance)
Parameters
faceGeoFace2The face; its holes are left open.
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 the face encloses no area.
Exceptions
- ArgumentNullException
Thrown when the shape or 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.
ToMesh(GeoPolygonArc2, MeshOptions)
Breaks a loop with arcs into faces as the options say, using the default tolerance.
public static GeoMesh2 ToMesh(GeoPolygonArc2 loop, MeshOptions options)
Parameters
loopGeoPolygonArc2optionsMeshOptions
Returns
ToMesh(GeoPolygonArc2, MeshOptions, Tolerance)
Breaks a loop with arcs into faces as the options say, within a tolerance, each arc flattened by the options' chord tolerance first.
public static GeoMesh2 ToMesh(GeoPolygonArc2 loop, MeshOptions options, Tolerance tolerance)
Parameters
loopGeoPolygonArc2The loop.
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 of the flattened loop; one with no faces when it encloses no area.
Exceptions
- ArgumentNullException
Thrown when the shape or 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.
ToMesh(GeoRectangle2, MeshOptions)
Breaks a rectangle into faces as the options say, using the default tolerance.
public static GeoMesh2 ToMesh(GeoRectangle2 rectangle, MeshOptions options)
Parameters
rectangleGeoRectangle2optionsMeshOptions
Returns
ToMesh(GeoRectangle2, MeshOptions, Tolerance)
Breaks a rectangle into faces as the options say, within a tolerance, a grid and strips running along its own width unless the options give an angle.
public static GeoMesh2 ToMesh(GeoRectangle2 rectangle, MeshOptions options, Tolerance tolerance)
Parameters
rectangleGeoRectangle2The rectangle.
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 the rectangle has no area.
Remarks
A grid of a rectangle along its own sides, starting at its lower left corner, lays its cells from there: with no joint, and a width and height that divide by the cell's, that is Divide(GeoRectangle2, int, int).
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.
ToMesh(GeoCircle2, MeshOptions)
Breaks a disc into faces as the options say, using the default tolerance.
public static GeoMesh2 ToMesh(GeoCircle2 circle, MeshOptions options)
Parameters
circleGeoCircle2optionsMeshOptions
Returns
ToMesh(GeoCircle2, MeshOptions, Tolerance)
Breaks a disc into faces as the options say, within a tolerance, its rim flattened by the options' chord tolerance first.
public static GeoMesh2 ToMesh(GeoCircle2 circle, MeshOptions options, Tolerance tolerance)
Parameters
circleGeoCircle2The circle.
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 of the polygon ToPolygonByChordTolerance(double) gives; its triangles fanned from the center, as TriangulateSurface(double, Tolerance) fans them. None when the radius is nought.
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.