Skip to content

Python: wildmeshing.viewer, a polyscope viewer for a chain of components - #1160

Open
udaykusupati wants to merge 1 commit into
mainfrom
uday/chain-viewer
Open

udaykusupati wants to merge 1 commit into
mainfrom
uday/chain-viewer

Conversation

@udaykusupati

Copy link
Copy Markdown
Collaborator

A polyscope viewer for a chain of components, wildmeshing.viewer: a pipeline such as simwild → topological_offset → prismatic_mesh, viewed stage by stage.

  • viewer.view([(name, outputs), ...]) takes each stage's outputs as the memory route returns them. python -m wildmeshing.viewer <checkpoint stem> ... views stages saved with wildmeshing.save.
  • Per stage, one item per label, grouped as volume tags, face tags and edge tags. Each item can be shown, shown alone, or shown with its envelope (the rows of the returned envelope carrying the label). Envelopes and ambient start hidden.
  • There is a slice plane, and a transform gizmo at each mesh's centre. A label keeps its colour across stages.
  • Non-tet cells are drawn as faces, because polyscope 2.6.1 crashes drawing prism and hex volume cells on macOS.
  • polyscope is optional: pip install -e ".[viewer]".

Test: python/tests/test_viewer.py uses polyscope's mock backend and is skipped without polyscope.

This is the first step. The goal is a UI that stacks components into a pipeline, with a log.

🤖 Generated with Claude Code

viewer.view([(name, outputs), ...]) shows each stage of a chain as the memory route returns it, or
as wildmeshing.save wrote it (python -m wildmeshing.viewer <checkpoint stem> ...). Per stage, one
item per label of its mesh, in three groups: volume tags (tets, prisms, pyramids, hexes, with the
numeric cell and vertex attributes), face tags (the tracked triangles) and edge tags (the curves).
Each item can be shown, shown alone, and shown with its envelope, that is, the rows of the
envelope the stage returned that carry the label. Envelopes start hidden, as does "ambient", the
background. A label keeps its colour in every stage. A slice plane cuts the volumes, and a
transform gizmo sits at each mesh's centre.

Non-tet cells are drawn as their deduplicated faces: polyscope 2.6.1 crashes drawing prism and hex
volume cells (bus error, macOS). polyscope is an optional dependency (pip install -e ".[viewer]").
New test python/tests/test_viewer.py registers every layer of a chain on polyscope's mock backend;
it is skipped without polyscope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant