Table of Contents

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

polygon GeoPolygon2
options MeshOptions

Returns

GeoMesh2

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

polygon GeoPolygon2

The polygon; one crossing itself is read as MakeValid() reads it.

options MeshOptions

How to break it up.

tolerance Tolerance

The 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

face GeoFace2
options MeshOptions

Returns

GeoMesh2

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

face GeoFace2

The face; its holes are left open.

options MeshOptions

How to break it up.

tolerance Tolerance

The 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

loop GeoPolygonArc2
options MeshOptions

Returns

GeoMesh2

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

loop GeoPolygonArc2

The loop.

options MeshOptions

How to break it up.

tolerance Tolerance

The 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

rectangle GeoRectangle2
options MeshOptions

Returns

GeoMesh2

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

rectangle GeoRectangle2

The rectangle.

options MeshOptions

How to break it up.

tolerance Tolerance

The 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

circle GeoCircle2
options MeshOptions

Returns

GeoMesh2

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

circle GeoCircle2

The circle.

options MeshOptions

How to break it up.

tolerance Tolerance

The 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.