Table of Contents

Method AsRectangle

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

AsRectangle(IReadOnlyList<GeoPoint2>, double)

Gets the boundary a rectangle is kept as: its two opposite corners, as AutoCAD keeps a rectangle picked by Rectangular and a polyline of four corners square to the axes of the clip system; the polygon's own points otherwise.

public static IReadOnlyList<GeoPoint2> AsRectangle(IReadOnlyList<GeoPoint2> points, double tolerance)

Parameters

points IReadOnlyList<GeoPoint2>

The points of a polygon, the last not repeating the first.

tolerance double

How far a side may lie from an axis and be square to it.

Returns

IReadOnlyList<GeoPoint2>

Two points where the polygon is such a rectangle, else the points.

Exceptions

ArgumentNullException

Thrown when the points are null.