Gets the triangles of the conforming Delaunay triangulation.

**Namespace:**
ceometric.ComputationalGeometry

**Assembly:**
ceometric.ComputationalGeometry (in ceometric.ComputationalGeometry.dll) Version: 2.4.0.0 (2.4.0.0)

# Syntax

C# |
---|

public List<Triangle> GetTriangles( bool throwOnError ) |

Visual Basic (Declaration) |
---|

Public Function GetTriangles ( _ throwOnError As Boolean _ ) As List(Of Triangle) |

Visual C++ |
---|

public: List<Triangle^>^ GetTriangles( bool throwOnError ) |

#### Parameters

- throwOnError
- Type: System..::.Boolean

True if the method shall throw if a triangle in the internal data structure can not be converted into a ceometric.VectorGeometry.Triangle.

#### Return Value

The triangles of the triangulation as a generic list of Triangle.# Remarks

This method converts the triangles of the internal data structure into triangles of type
Triangle. This takes O(n) time, which can be a considerable
while for very large point sets, so do not use this method excessively.

The triangles of the Delaunay triangulation were internally generated using exact arithmetic while the Triangle object uses floating point arithmetic. Due to this fact, a conversion may fail for extremely small triangles or for triangles with extremely small minimum angle. In such case, the throwOnError parameter decides if an error shall be thrown. If it is set to false, the respective triangle is not returned.

Set the AbsoluteEpsilon variable to 0 to get as many triangles as possible.

# Exceptions

Exception | Condition |
---|---|

System..::.InvalidOperationException | A valid triangulation does not exist. Compute the triangulation before. |