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

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

def find_plunge_point(near: tuple[float, float], cleared_polygons: collections.abc.Sequence[collections.abc.Sequence[tuple[float, float]]], boundary: collections.abc.Sequence[tuple[float, float]], islands: collections.abc.Sequence[collections.abc.Sequence[tuple[float, float]]] | None = None, tool_radius: float = 3, search_radius: float = 10) -> tuple[float, float] | None:
    r"""
    Find a plunge point near the given position within the cleared area.
    
    Searches for a valid tool placement point inside the union of
    ``cleared_polygons`` that is within ``search_radius`` of ``near``,
    fully inside ``boundary``, and does not overlap any ``island``.
    
    The algorithm first checks ``near`` itself, then searches outward
    on concentric rings with a step of ``tool_radius / 2``.
    
    :param near: Target point ``(x, y)`` to search near.
    :param cleared_polygons: List of cleared-area polygons.
    :param boundary: Outer boundary polygon.
    :param islands: List of island polygons (optional).
    :param tool_radius: Tool radius in mm.
    :param search_radius: Maximum search distance from ``near`` in mm.
    :returns: ``(x, y)`` plunge point or ``None`` if no valid point found.
    """

