diff --git a/README.md b/README.md index cb969d7..992d0b2 100644 --- a/README.md +++ b/README.md @@ -227,7 +227,7 @@ blender -b sensors/finger/r01/source/geometry.blend -P blender/scripts/random_pa --vector-width-mm 164 --vector-height-mm 160 ``` -`binary-preview` derives PNG-only tracking trials from the existing color job +`binary-preview` makes Random Stroke Pattern (RSP) PNG trials from a color job in a separate directory; `--views` selects the multiview job. Stroke width follows camera-cell print size, bounded to 0.11–0.28 mm. These image-space trials are for probe comparisons, not print masters; UV views may select diff --git a/blender/scripts/binary_pattern_from_color.py b/blender/scripts/random_stroke_pattern.py similarity index 99% rename from blender/scripts/binary_pattern_from_color.py rename to blender/scripts/random_stroke_pattern.py index cebeaed..da164b4 100644 --- a/blender/scripts/binary_pattern_from_color.py +++ b/blender/scripts/random_stroke_pattern.py @@ -1,9 +1,9 @@ -"""Generate binary pattern trials from existing colour texture jobs. +"""Generate Random Stroke Pattern (RSP) trials from colour texture jobs. Run after the colour texture command has produced its PNGs:: blender -b -t 2 --python-exit-code 1 \ - -P blender/scripts/binary_pattern_from_color.py -- \ + -P blender/scripts/random_stroke_pattern.py -- \ --job build/textures/finger/r01/_texture_views_job.json \ --output-dir .scratch/binary-pattern-from-color/run-01 diff --git a/src/orisys_sensor_design/cli.py b/src/orisys_sensor_design/cli.py index 26fb644..f99fbf5 100644 --- a/src/orisys_sensor_design/cli.py +++ b/src/orisys_sensor_design/cli.py @@ -520,7 +520,7 @@ def cmd_binary_preview(revision_dir: Path, args: argparse.Namespace) -> int: file=sys.stderr) return 2 code = _run_blender_script( - "binary_pattern_from_color.py", paths.source_blend, + "random_stroke_pattern.py", paths.source_blend, ["--job", str(job_path), "--output-dir", str(output_dir), "--modes", "camera_compensated_width", "--camera-width-fraction", str(args.camera_width_fraction)], diff --git a/tests/test_binary_preview_cli.py b/tests/test_binary_preview_cli.py index 930af66..58b2ce6 100644 --- a/tests/test_binary_preview_cli.py +++ b/tests/test_binary_preview_cli.py @@ -45,7 +45,7 @@ def test_binary_preview_uses_job_and_preserves_colour_source(tmp_path, monkeypat monkeypatch.setattr(cli, "_run_blender_script", run_blender) assert cli.cmd_binary_preview(REVISION, _args(job_path, output_dir)) == 0 assert colour.read_bytes() == b"original colour" - assert calls[0][0] == "binary_pattern_from_color.py" + assert calls[0][0] == "random_stroke_pattern.py" assert "--camera-width-fraction" in calls[0][2] assert cli.cmd_binary_preview(REVISION, _args(job_path, output_dir)) == 2 assert len(calls) == 1