forked from 1b-agent/fieldcraft-upstream
The thinnest wall (measured to a facing wall) and narrowest patch give the cell size the grid needs; the requested size refined that deep comes first, a root shrunk so one level fewer is exact second; beyond the levels or cells allowed meshing fails at once naming the wall, levels and cells. max_depth is a cap (default 4); rebuilds stay within the planned levels; lattice positions no longer depend on the lattice depth; the report gives root size, levels, wall, patch and cells per level before and after closure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo