Table of Contents

Method ToPolygon3

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

ToPolygon3()

Reads the triangle as a three-sided polygon.

public GeoPolygon3 ToPolygon3()

Returns

GeoPolygon3

Remarks

A triangle out of Triangulate had to be rebuilt from its three corners before anything that takes a polygon would accept it. This is that rebuild, named.

Exceptions

ArgumentException

Thrown when the triangle encloses no area. Ask IsDegenerate() first where that is possible: a polygon of three collinear points is not a polygon.

InvalidOperationException

Thrown when a corner has a coordinate that is not a finite number.

ToPolygon3(Tolerance)

Reads the triangle as a three-sided polygon, within a tolerance.

public GeoPolygon3 ToPolygon3(Tolerance tolerance)

Parameters

tolerance Tolerance

The tolerance that decides whether the three corners enclose an area.

Returns

GeoPolygon3

Exceptions

ArgumentException

Thrown when the triangle encloses no area.

InvalidOperationException

Thrown when a corner has a coordinate that is not a finite number.