Table of Contents

Method TryGetPlane

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

TryGetPlane(out GeoPlane3)

Gets the plane the whole chain lies in, when it lies in one.

public bool TryGetPlane(out GeoPlane3 plane)

Parameters

plane GeoPlane3

Returns

bool

TryGetPlane(out GeoPlane3, Tolerance)

Gets the plane the whole chain lies in, when it lies in one, within a tolerance.

public bool TryGetPlane(out GeoPlane3 plane, Tolerance tolerance)

Parameters

plane GeoPlane3

The plane, when there is one.

tolerance Tolerance

The tolerance; the planar threshold decides how flat is flat enough.

Returns

bool

true if one plane holds every vertex and every arc; otherwise, false.

Remarks

The vertices alone are not enough to settle it: two straight runs and the bends between them can all share a plane while an arc bulges out of it, so every arc is asked how far it stands off the plane, and the planar tolerance decides. The angle of its own plane decides nothing: a half circle 1 000 across turned 0.99 degrees out stands 8.64 off, and a bend that barely bows lies in the plane however it is turned.

The plane is the one the vertices lie in (see TryGetPlane(out GeoPlane3, Tolerance)). Where the vertices all lie on one line, as the two ends of a half circle do, the first arc's own plane is taken, and holds the chain when the vertices lie in it and every other arc turns in it too.