"""
Path measurement utilities for calculating arc-lengths and point positions.

This module provides the PathMeasurement class for measuring distances along
shape outlines, including curved paths with Bezier segments.
"""

from __future__ import annotations

import logging
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from .shapes.base import Shape

logger = logging.getLogger(__name__)


class PathMeasurement:
    """
    Utility for measuring distances along shape outlines.

    Provides arc-length calculation and parametric point evaluation
    for dash segment positioning.
    """

    def __init__(self, shape: Shape):
        """
        Create measurement utility for a shape.

        Args:
            shape: Shape instance to measure.
        """
        self.shape = shape
        self._cached_arc_length: float | None = None
        self._segment_lengths: list[float] | None = None
