Hi! First off—GeometryPack is already super useful for getting “clean” surface meshes inside ComfyUI (repair/remesh/unwrap/preview). I’m trying to push the pipeline one step further into simulation, and I’m missing one key building block:
Please add a tetrahedralization (“tet mesher”) node based on pytetwild (Python wrapper of fTetWild / TetWild).
- Node name idea:
Tetrahedralize (TetWild / fTetWild)
- Input: triangle surface mesh (watertight preferred; optionally auto-fix using existing repair nodes)
- Output: tetrahedral volume mesh (vertices + tet connectivity), plus optional surface extraction
Why this matters (FEM / physics sim)
Most FEM solvers (soft-body, stress/strain, heat, modal analysis, etc.) need a volumetric tetra mesh, not just a surface triangle mesh. Having tetrahedralization inside GeometryPack would make ComfyUI a complete mesh-to-sim-ready preprocessing graph:
Example workflow
- Load mesh
- Repair / make watertight
- Remesh / simplify
- ✅ Tetrahedralize (TetWild)
- Export to solver format (or visualize quality)
That’s a big win for anyone doing FEM in external tools (Gmsh/FEniCS/SOFA/CalculiX/Abaqus/etc.) or future in-Comfy physics nodes.
Suggested backend: pytetwild
pytetwild is a Python wrapper around fTetWild and ships wheels on PyPI (so users don’t need to compile C++ locally in most cases).
Refs:
- PyPI:
https://pypi.org/project/pytetwild/
- fTetWild repo:
https://github.com/wildmeshing/fTetWild
- Paper (SIGGRAPH 2020):
https://doi.org/10.1145/3386569.3392385
Parameters to expose (matching pytetwild)
These map cleanly to a ComfyUI node UI and are already documented in pytetwild:
edge_length_fac (default ~0.05 of bbox diagonal)
edge_length_abs (override)
optimize (quality vs speed)
simplify (preprocess surface)
epsilon (envelope / feature fidelity)
stop_energy, num_opt_iter
coarsen
num_threads
quiet/loglevel (optional)
Output / interop
For FEM users, exports matter as much as generating tets. Any of these would be awesome:
- Export .msh (Gmsh) or .vtu/.vtk (ParaView) or .xdmf
- At minimum: provide raw arrays (V, T) + a “save” node later
Implementation notes (high level)
- Convert GeometryPack mesh representation →
(vertices, faces) numpy arrays
- Call
pytetwild.tetrahedralize(vertices, faces, ...)
- Return a new “tet mesh” object type (or a dict payload) that downstream nodes can consume
- Optional: surface extraction node (tet boundary triangles) for preview
Dependency / env note
If you’d rather isolate this dependency: GeometryPack already uses comfy-env patterns for dependency management and isolation, so this could be added either in the main env or as an isolated sub-env if needed.
If this is something you’d accept, I can help test on a few nasty meshes (non-manifold, holes, self-intersections) and share expected outputs + solver compatibility notes.
Thanks!
Hi! First off—GeometryPack is already super useful for getting “clean” surface meshes inside ComfyUI (repair/remesh/unwrap/preview). I’m trying to push the pipeline one step further into simulation, and I’m missing one key building block:
Please add a tetrahedralization (“tet mesher”) node based on
pytetwild(Python wrapper of fTetWild / TetWild).Tetrahedralize (TetWild / fTetWild)Why this matters (FEM / physics sim)
Most FEM solvers (soft-body, stress/strain, heat, modal analysis, etc.) need a volumetric tetra mesh, not just a surface triangle mesh. Having tetrahedralization inside GeometryPack would make ComfyUI a complete mesh-to-sim-ready preprocessing graph:
Example workflow
That’s a big win for anyone doing FEM in external tools (Gmsh/FEniCS/SOFA/CalculiX/Abaqus/etc.) or future in-Comfy physics nodes.
Suggested backend:
pytetwildpytetwildis a Python wrapper around fTetWild and ships wheels on PyPI (so users don’t need to compile C++ locally in most cases).Refs:
https://pypi.org/project/pytetwild/https://github.com/wildmeshing/fTetWildhttps://doi.org/10.1145/3386569.3392385Parameters to expose (matching pytetwild)
These map cleanly to a ComfyUI node UI and are already documented in pytetwild:
edge_length_fac(default ~0.05 of bbox diagonal)edge_length_abs(override)optimize(quality vs speed)simplify(preprocess surface)epsilon(envelope / feature fidelity)stop_energy,num_opt_itercoarsennum_threadsquiet/loglevel(optional)Output / interop
For FEM users, exports matter as much as generating tets. Any of these would be awesome:
Implementation notes (high level)
(vertices, faces)numpy arrayspytetwild.tetrahedralize(vertices, faces, ...)Dependency / env note
If you’d rather isolate this dependency: GeometryPack already uses
comfy-envpatterns for dependency management and isolation, so this could be added either in the main env or as an isolated sub-env if needed.If this is something you’d accept, I can help test on a few nasty meshes (non-manifold, holes, self-intersections) and share expected outputs + solver compatibility notes.
Thanks!