CadBoundaryFinder
from OpenCAD2D import CadBoundaryFinder
class CadBoundaryFinder(System.Object) ยท CadBoundaryFinder in the .NET reference
Finds the areas HATCH and BOUNDARY fill, as AutoCAD finds them: round a point picked, the smallest area the lines, arcs, circles, polylines, ellipses and splines of a space close about it, with the islands inside it; or the loops of closed objects selected. A square 100 by 100 of four LINEs with a square 40 by 40 inside it, picked between the two, gives the outer square and the inner one as an island; picked inside the inner, the inner alone.
Methods
Find
@staticmethod
def Find(
document: CadDocument,
space: CadSpace,
point: GeoPoint2,
tolerance: Tolerance,
within: DisplayBox | None = ...,
candidates: System.Collections.Generic.IReadOnlyCollection[str] | None = ...,
gap: float = ...,
) -> System.Collections.Generic.IReadOnlyList[CadBoundaryLoop]
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.".
FromObjects
@staticmethod
def FromObjects(
document: CadDocument,
handles: System.Collections.Generic.IEnumerable[str],
tolerance: Tolerance,
) -> tuple[System.Collections.Generic.IReadOnlyList[CadBoundaryLoop], int]
Makes the loops of closed objects selected, as HATCH's Select objects takes them: a circle, a closed polyline, a whole ellipse or a closed spline each a loop, the depth of each the count of the others round it; the others passed over and counted.
Kept
@staticmethod
def Kept(
loops: System.Collections.Generic.IEnumerable[CadBoundaryLoop],
style: DxfHatchStyle,
) -> System.Collections.Generic.IReadOnlyList[CadBoundaryLoop]
The loops a hatch of an island style keeps: all for Normal, the outer and the islands just inside it for Outer, the outer alone for Ignore.