Table of Contents

Method Find

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Find(CadDocument, CadSpace, GeoPoint2, Tolerance, DisplayBox?, IReadOnlyCollection<string>, double)

Finds the area round a point: its outer loop and every island inside it, each with its depth; null where no closed area is round the point, as AutoCAD says "Valid hatch boundary not found.".

public static IReadOnlyList<CadBoundaryLoop> Find(CadDocument document, CadSpace space, GeoPoint2 point, Tolerance tolerance, DisplayBox? within = null, IReadOnlyCollection<string> candidates = null, double gap = 0)

Parameters

document CadDocument

The document.

space CadSpace

The space whose objects are looked at.

point GeoPoint2

The point picked, in the world.

tolerance Tolerance

The tolerance: points within its point tolerance are one corner.

within DisplayBox?

The part of the drawing looked at, as AutoCAD looks at what is shown; null for all of it.

candidates IReadOnlyCollection<string>

The handles of the objects looked at, as HATCH's Boundary set holds them; null for every object of the space.

gap double

The widest gap between two loose ends that is taken as closed, as HPGAPTOL holds it: two open ends no further apart than this are joined by a straight edge, which belongs to no object; 0 for none.

Returns

IReadOnlyList<CadBoundaryLoop>

The loops, the outer first and then the islands by depth; or null.

Exceptions

ArgumentNullException

Thrown when the document or the space is null.