Skip to content

Sanitize fire time-hull mesh inputs to prevent disappearing Plotly meshes#212

Merged
ttuff merged 1 commit intomainfrom
codex/fix-disappearing-fireplot-issue
Mar 28, 2026
Merged

Sanitize fire time-hull mesh inputs to prevent disappearing Plotly meshes#212
ttuff merged 1 commit intomainfrom
codex/fix-disappearing-fireplot-issue

Conversation

@ttuff
Copy link
Copy Markdown
Contributor

@ttuff ttuff commented Mar 28, 2026

Motivation

  • Users observed fire_plot renders that disappear when the Plotly scene is interacted with, which is consistent with unstable WebGL behavior caused by non-finite mesh arrays.
  • The intent is to make plot_climate_filled_hull robust to imperfect hull geometry (NaNs or invalid triangle references) so visualizations remain stable.

Description

  • Add _sanitize_mesh_inputs to plot_climate_filled_hull which drops vertices with non-finite coordinates or per-vertex times, remaps triangle indices after compaction, and discards triangles that reference removed or out-of-bounds vertices, with clear errors if nothing renderable remains.
  • Run sanitization before building the vertex->slice mapping so climate scalar coloring stays aligned with surviving vertices.
  • Add a regression test test_plot_climate_filled_hull_drops_nonfinite_vertices_and_remaps_tris that injects a NaN vertex and asserts the produced Mesh3d arrays are finite, in-bounds, and that intensity length matches the surviving vertex count.

Testing

  • Ran the focused viewer/scalar tests with pytest tests/test_fire_hull_viewer_scalars.py -q which passed.
  • Ran additional smoke/regression tests with pytest tests/test_fire_plot_cube_first.py tests/test_gridmet_safety.py -q which passed.
  • All executed automated tests completed successfully (all tests run in this rollout passed).

Codex Task

@ttuff ttuff merged commit c5b0c6d into main Mar 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant