#!/usr/bin/env python3 """Build the versioned L56 flat-field and sparse-motif fixture.""" from __future__ import annotations import argparse import json import os from pathlib import Path ROOT = Path(__file__).resolve().parents[4] OWNER = Path(os.environ.get("VOXELFORGE_OWNER_DATA", ROOT / "Standalone/data/owner_world.json")) OUT_DEFAULT = Path(os.environ.get("VOXELFORGE_VERIFY_OUT", ROOT / "Saved/Linux/l56")) def main() -> None: parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--out", type=Path, default=OUT_DEFAULT / "fixtures") args = parser.parse_args() args.out.mkdir(parents=True, exist_ok=True) fixture = json.loads(OWNER.read_text(encoding="utf-8")) fixture["surface_profile_override"] = { "version": 1, "kind": "flatField", "minimum_arena_clearance_m": 0.0, } fixture["motif_family_override"] = { "version": 1, "strate_index": 1, "placement_policy": "seed,strate,stable_id", "motifs": [ { "stable_id": "motif/monolith-01-v1", "kind": "cappedCylinder", "radius_m": 1.4, "height_m": 24.0, "route_side_offset_m": 28.0, "placement_radius_m": 4.0, "fillet_radius_m": 0.55, "blend_width_m": 1.6, "minimum_spacing_m": 15.0, "yaw_quarter_turns": 0, "attachment": "seated_floor", }, { "stable_id": "motif/platform-01-v1", "kind": "roundedBox", "half_extents_m": [3.2, 2.8, 0.75], "route_side_offset_m": -35.0, "placement_radius_m": 4.0, "fillet_radius_m": 0.55, "blend_width_m": 1.6, "minimum_spacing_m": 15.0, "yaw_quarter_turns": 0, "attachment": "seated_floor", }, ], } path = args.out / "style-override-motifs-slice1.json" path.write_text(json.dumps(fixture, indent=2) + "\n", encoding="utf-8") print(f"[L56MotifFixture] path={path} profile=flatField motifs=2 " "placement=seed,strate,stable_id status=PASS") if __name__ == "__main__": main()