Table of Contents

Method TryReadFaces

Namespace
GeometryHelper.TeklaConvert
Assembly
GeometryHelper.TeklaConvert.dll

TryReadFaces(Face, Tolerance, out GeoFace3[])

Converts one face of a Tekla solid into the faces that cover it: one face where it lies flat, and triangles on its own corners where it does not.

public static bool TryReadFaces(this Face face, Tolerance tolerance, out GeoFace3[] result)

Parameters

face Face

The face to read.

tolerance Tolerance

The tolerance deciding duplicate corners and flatness.

result GeoFace3[]

The faces, turned to agree with the normal Tekla gives the face, when the method returns true.

Returns

bool

false when the face encloses no area.

Remarks

Tekla's own cuts leave faces a little out of flat. A face further out than the planar tolerance, or with a hole off its plane, is not refused but comes as triangles on the corners Tekla gave (see FromLoops(IEnumerable<GeoPoint3>, IEnumerable<IEnumerable<GeoPoint3>>, Tolerance)), which keep every edge it shares with its neighbours, so a solid read this way is as closed as Tekla holds it. The first loop is the boundary and the rest are holes, the order Tekla walks them in; a hole with no area is left out. There is no reader of one face only: a face out of flat cannot be one face without moving its corners off the edges it shares, and refusing it, or dropping its hole, would leave the body open.

Exceptions

ArgumentNullException

Thrown when face is null.