# This file is automatically generated by pyo3_stub_gen
# ruff: noqa: E501, F401, F403, F405

import collections.abc
__all__ = [
    "find_regions",
]

def find_regions(boundary: collections.abc.Sequence[tuple[float, float]], islands: collections.abc.Sequence[collections.abc.Sequence[tuple[float, float]]] | None = None, tool_radius: float = 3, tolerance: float = 0.5) -> list[tuple[list[tuple[float, float]], float, tuple[float, float], float]]:
    r"""
    Detect disconnected wide sub-regions of a pocket.
    
    Analyses the pocket boundary (with optional islands) for narrow
    passages that separate the pocket into disconnected wide sub-regions.
    Each sub-region is returned as a tuple of
    ``(polygon, area, entry_pt, r_max)``.
    
    * ``polygon`` — list of ``(x, y)`` vertices of the wide region.
    * ``area`` — area of the sub-region in mm².
    * ``entry_pt`` — ``(x, y)`` centre of the largest inscribed circle.
    * ``r_max`` — radius of the largest inscribed circle in mm.
    
    Results are sorted by area descending (largest region first).
    Returns an empty list when the pocket is entirely narrow/slot.
    
    :param boundary: Outer pocket boundary as ``[(x, y), ...]``.
    :param islands: List of island polygons, each as ``[(x, y), ...]``.
    :param tool_radius: Tool radius in mm.
    :param tolerance: Additional clearance tolerance in mm.
    :returns: List of ``(polygon, area, entry_pt, r_max)`` tuples.
    """

