Preview Mesh (Analysis)
A viewer with buttons that compute things on your mesh
- trimesh
The other preview nodes show you a mesh and stop. Preview Mesh (Analysis) shows you a mesh in a VTK.js viewer and gives you buttons that compute and visualize analysis fields on demand - without rerunning your whole graph. Click "open edges," and the boundary lights up. Click "connected components," and each piece gets a color. It turns the preview from a passive render into a mini analysis tool, which is exactly the right idea when you're debugging geometry.
It's part of ComfyUI-GeometryPack ("ComfyUI libigl") by Andrea Pozzetti. One input, no outputs, marked as an output node.
How it works
Feed it a trimesh and the node exports the mesh to a VTP file (falling back to STL if the VTP export fails), caches a copy, and hands the frontend viewer a mesh_id plus basic stats - vertex/face counts, bounds, watertight status, and any field names already on the mesh. The widget then makes calls back into the running backend with that mesh_id to compute fields:
- Open edges - boundary vertices get flagged so the holes in your surface are visible at a glance.
- Connected components - every disconnected chunk gets its own
part_id, so "is this one object or five objects that happen to be close?" becomes a visual answer instead of a guess. - Self-intersections - the classic silent killer for booleans and 3D printing, made visible.
Each computed field gets cached per mesh and added to the mesh's stored copy, so you can layer analyses in one session. This is the node that pairs with Mesh Quality or Open Edges when the numbers say "something's wrong" and you need to see where.
Why this one instead of the plain viewer
The plain Preview Mesh (Three.js) shows you geometry and nothing else. This one shows you geometry plus computed structure - and it computes on click rather than forcing you to rebuild the graph for every analysis you want to run. For "I loaded a scan, is it even one connected surface, are there holes, does it self-intersect?" this is the fastest honest answer the pack offers.
The trade-offs: it's VTK.js-based (heavier widget than the Three.js viewer), it needs the VTP export path to work (output folder must be writable), and the compute-on-click behavior only exists while that session's backend is running - don't expect the analysis to persist as saved graph state. If you want the analysis as a reproducible graph step rather than an interactive check, use the explicit Open Edges or Mesh Quality nodes instead and let a field-aware viewer render the result.
Install
Pack standard: search "GeometryPack" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/PozzettiAndrea/ComfyUI-GeometryPack.git
cd ComfyUI-GeometryPack
pip install -r requirements.txt --upgrade
python install.py
Restart after. The pack's comfy-env installer (with pixi) pulls a heavy isolated environment on first launch, and the viewer files get copied into place at startup - so a blank analysis pane usually means "restart ComfyUI," not "reinstall."
One honest note: this pack is WIP with fast development, and the interactive API behind these buttons is exactly the kind of surface that shifts between versions. If the buttons stop computing after an update, check the console, restart, and if it persists, report it on GitHub Discussions - the author's README explicitly invites it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| trimesh | TRIMESH | — |
Outputs (0)
No outputs