# This file is automatically generated by pyo3_stub_gen
# ruff: noqa: E501, F401, F403, F405
r"""
Overcut operations for closed contours.

Extends closed contours past their start point to ensure complete
cuts through the material, particularly useful in cutting applications
where the tool may not fully penetrate at the start/end point.
"""

from raygeo import geo
__all__ = [
    "apply_overcut",
]

def apply_overcut(geometry: geo.Geometry, overcut: float) -> geo.Geometry:
    r"""
    Extend a closed contour past its start point.
    
    When cutting closed contours, the tool slows down at
    corners and may not cut through completely. This function
    extends the path by ``overcut`` distance past the start point
    to ensure a clean cut.
    
    If the geometry is not closed, empty, or overcut is <= 0, the
    geometry is returned unchanged.
    
    :param geometry: The input geometry (must be closed).
    :param overcut: Distance to extend past the start point.
    :returns: A new geometry with the overcut applied.
    :complexity: O(n) time, O(n) space
    """

