> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# FillHoles - ComfyUI Built-in Node Documentation

> This node fills holes in a 3D mesh by detecting open boundary edges and creating new faces to close them.

This node fills holes in a 3D mesh by detecting open boundary edges and creating new faces to close them. It runs on the GPU, preserves existing geometry and UVs, and can process single meshes, lists of meshes, or batches of meshes.

## Inputs

| Parameter          | Description                                                                                                                | Data Type | Required | Range                 |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------- | --------- | -------- | --------------------- |
| `mesh`             | The 3D mesh to process. Accepts a single mesh, a list of meshes, or a batched mesh.                                        | MESH      | Yes      | -                     |
| `max_perimeter`    | Max hole perimeter to fill. 0 disables. (default: 0.03)                                                                    | FLOAT     | Yes      | 0.0 to no upper limit |
| `weld_epsilon_rel` | Pre-weld tolerance (fraction of bounding box diagonal); boundary detection needs welded vertices. 0 skips. (default: 1e-5) | FLOAT     | Yes      | 0.0 to no upper limit |
| `max_vertices`     | Cap boundary vertices per cycle; centroid-fan only works for small near-planar holes. Keep ≤16. (default: 16)              | INT       | Yes      | 3 to 1024             |
| `fill_chains`      | Also fill open chains (not just cycles). Noisy; OFF matches cumesh. (default: False)                                       | BOOLEAN   | Yes      | True or False         |

Note: When `weld_epsilon_rel` is greater than 0, the node pre-welds duplicate vertices before detecting holes. The welding tolerance starts at the given fraction of the bounding box diagonal and automatically increases by doubling until the mesh is considered welded or the tolerance reaches a cap of 1e-2. Holes with more than 8 boundary vertices use a centroid-fan fill (inserting a new centroid vertex), while smaller holes use a vertex-fan fill that reuses an existing boundary vertex.

## Outputs

| Output Name | Description                                                  | Data Type |
| ----------- | ------------------------------------------------------------ | --------- |
| `mesh`      | The mesh with holes filled, matching the input batch format. | MESH      |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/FillHoles/en.md)

***

**Source fingerprint (SHA-256):** `c0fd7f0c2d6eea098efb1dcfd80eaa52997e185b9c442b483f75318eea082196`
