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

import collections.abc
from raygeo.mesh import types
__all__ = [
    "remesh",
]

def remesh(mesh: types.TriangleMesh, outer: collections.abc.Sequence[tuple[float, float]], max_edge_len: float = 1) -> types.TriangleMesh:
    r"""
    Refine a triangle mesh so no interior edge exceeds
    *max_edge_len*.
    
    Boundary edges are preserved; only edges with at least one
    free (non-boundary) vertex are subdivided.
    
    :param mesh: Input TriangleMesh to refine.
    :param outer: Outer boundary polygon (for retriangulation).
    :param max_edge_len: Maximum allowed edge length (default 1.0).
    :returns: A refined TriangleMesh.
    :raises RuntimeError: If retriangulation fails.
    :complexity: O(n log n) where n = number of edges
    """

