pyvale.verif.renderverif module

DEVELOPER VERIFICATION MODULE

This module contains developer utility functions used for verification testing of the render toolbox in pyvale.

Specifically, this module contains hard-coded verification scenes, packaged- case loaders shared between the gold generation scripts and the render tests, and image-regression assertions.

assert_render_allclose(actual, reference, case_ident, *, rtol=1e-09, atol=1e-09)[source]

Assert image equality and save useful diagnostics when it fails.

Parameters:
  • actual (numpy.ndarray) – Rendered and trusted reference image arrays with matching shapes.

  • reference (numpy.ndarray) – Rendered and trusted reference image arrays with matching shapes.

  • case_ident (str) – Stable case identifier used for the failure output directory.

  • rtol (float, optional) – Relative and absolute tolerances passed to numpy.allclose().

  • atol (float, optional) – Relative and absolute tolerances passed to numpy.allclose().

Raises:

AssertionError – If arrays differ. Raw NumPy diagnostics are saved to render-fails/<case_ident> before the error is raised. Scaled TIFF images are also saved when Pillow is installed.

render_triangle(output_dir)[source]

Render the deterministic common-API Blender triangle scene.

riley_memory_config()[source]

Return a single-frame Riley raster configuration kept in memory.

riley_rabbit_scene()[source]

Build the committed multi-mesh rabbit regression scene.

Returns:

render.Scene3D – The packaged TRI3 rabbit meshes viewed by a camera filled from their combined extent.

scaled_mechanical_2d()[source]

Load the mechanical 2D case scaled to millimetres for Blender scenes.