Table of Contents

Method FromLoops

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

FromLoops(IEnumerable<GeoPoint3>, IEnumerable<IEnumerable<GeoPoint3>>)

Makes the faces that cover a boundary less its holes, from loops of corners that need not lie flat, using the default tolerance.

public static GeoFace3[] FromLoops(IEnumerable<GeoPoint3> boundary, IEnumerable<IEnumerable<GeoPoint3>> holes)

Parameters

boundary IEnumerable<GeoPoint3>

The corners of the outer loop, in order.

holes IEnumerable<IEnumerable<GeoPoint3>>

The corners of each hole, in order and wound either way; null is read as none.

Returns

GeoFace3[]

The faces; see FromLoops(IEnumerable<GeoPoint3>, IEnumerable<IEnumerable<GeoPoint3>>, Tolerance).

Exceptions

ArgumentNullException

Thrown when boundary is null.

ArgumentException

Thrown when a hole is null.

FromLoops(IEnumerable<GeoPoint3>, IEnumerable<IEnumerable<GeoPoint3>>, Tolerance)

Makes the faces that cover a boundary less its holes, from loops of corners that need not lie flat, within a tolerance.

public static GeoFace3[] FromLoops(IEnumerable<GeoPoint3> boundary, IEnumerable<IEnumerable<GeoPoint3>> holes, Tolerance tolerance)

Parameters

boundary IEnumerable<GeoPoint3>

The corners of the outer loop, in order.

holes IEnumerable<IEnumerable<GeoPoint3>>

The corners of each hole, in order and wound either way; null is read as none.

tolerance Tolerance

The tolerance deciding which corners are one, which loops enclose an area, and which lie flat.

Returns

GeoFace3[]

One face, holes and all, as the constructors would make it, when every loop lies flat on the plane of the boundary within the planar tolerance. Otherwise triangles on the corners themselves, wound as the boundary is, covering the boundary less its holes. None when the boundary encloses no area, or when, seen along its normal, it crosses itself or a hole reaches out of it.

Remarks

This is the way to read the faces of a body a modeller gives as loops of corners. A face can come a little out of flat, as a face Tekla Structures cuts can, and a polygon refuses it; left out, it is a hole in the body. Split into triangles on the corners it came with, each exactly flat, it keeps every edge it shares with its neighbours, so the body is as closed as it was given, and no corner moves. A hole enclosing no area is left out.

Exceptions

ArgumentNullException

Thrown when boundary is null.

ArgumentException

Thrown when a hole is null.