Name the generator Random Stroke Pattern

Align the Blender script and documentation with the stroke geometry. Verify the existing CLI output is byte-identical and the focused tests pass.
This commit is contained in:
ykcheungab
2026-10-03 20:54:19 +08:00
parent 59f48d6d06
commit 6b0694d6cb
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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
@@ -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
+1 -1
View File
@@ -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)],
+1 -1
View File
@@ -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