• Extracts contour polygons from the bitmap region around chunk.

    The returned contours use world coordinates (per CLAUDE.md hard rule #4). Each contour's closed flag indicates whether the polyline closes within the sampled region; contours that pass through a chunk boundary may be reported as closed: false from a single chunk's perspective and will be stitched across chunks by the physics adapter (Phase 2).

    Parameters

    • chunk: Chunk

      The chunk whose contours to extract.

    • bitmap: ChunkedBitmap

      The owning bitmap. Used to sample the 1-pixel padding from neighboring chunks.

    Returns Contour[]