Task: Implement the Globe Box feature
TASK-DESCRIPTION
Implement feature prompts/features/03-globe-box.md (Globe Box) in scripts/globe-box-build.sh plus a Python module scripts/globe_box_build.py that the script drives.
The build renders the Earth’s surface from the ETOPO 2022 source tiles (/datasets/dataset-etopo-2022/, read-only) into three watertight binary-STL pieces (north half, south half, twist-lock cylinder) in dataflow.out/box/ with a manifest, plus a --check validation mode.
TASK-CONTEXT
- The geometry decisions are recorded in
documents/05-globe-box-approach.md: 100 mm sea-level globe (radius 50), land relief over the global ETOPO range with flat oceans, two hollow hemisphere halves with flat rims at z = 0, an inner sphere of radiusradius_mm - wall_mmwith a cylindrical socket (bore) of radiussocket_radius_mmforsocket_depth_mm, and a hollow twist-lock cylinder with a knurled band whose outer surface mates with the halves’ sockets. Bayonet pins on the cylinder engage L-shaped grooves in the sockets; one twist of the band locks both halves while the relief seam stays aligned (south-half grooves are mirror images). - The shell script owns the log file and the GDAL VRT over the source tiles; the Python module owns the parameter plan, per-piece sampling (average resampling via
osgeo.gdal.Warp), mesh construction, STL writing, manifest, and--checkvalidation. - The geometry math must be importable without
osgeoornumpy(pure Python), sotests/04-globe-box-math.shstays portable. - Tests: tool-gated
tests/03-globe-box-build.sh(builds the full set at coarse sampling, then validates), portabletests/04-globe-box-math.sh(parameter and mating-geometry invariants).
TASK-FILES
create scripts/globe-box-build.shcreate scripts/globe_box_build.pycreate tests/03-globe-box-build.shcreate tests/04-globe-box-math.shmodify Makefile(wirebuildandchecktargets)modify scripts/site-state-fetch.sh(box piece state keys for the dashboard)modify TODO.md(mark the globe-box tasks complete after verification)
TASK-OUTPUT
- Implement the files, then run
make build,make check, andmake testfrom the repository root. - Report the piece counts, sizes, and verification results.