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
documentCadDocumentThe document.
spaceCadSpaceThe space whose objects are looked at.
pointGeoPoint2The point picked, in the world.
toleranceToleranceThe tolerance: points within its point tolerance are one corner.
withinDisplayBox?The part of the drawing looked at, as AutoCAD looks at what is shown; null for all of it.
candidatesIReadOnlyCollection<string>The handles of the objects looked at, as HATCH's Boundary set holds them; null for every object of the space.
gapdoubleThe 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.