---
title: "Make a mesh watertight for your simulator | Spatial Compiler"
description: "Send a mesh with holes and overlapping parts and get it back closed, with its texture, so your physics engine can find its volume and mass. Over MCP or the API."
canonical: https://appliedmanifold.com/sim-ready/watertight-mesh/
site: "Applied Manifold: The spatial compute cloud for 3D reality"
---

1.  [Home](https://appliedmanifold.com/)
2.  [Sim-ready meshes](https://appliedmanifold.com/sim-ready/)
3.  Watertight mesh

# Make a mesh watertight

A simulator needs a closed solid to know what is inside it. Send a mesh with holes and overlapping parts, and get it back closed, at real size, with its texture.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys&job=sim-scene) [Start with your agent](https://appliedmanifold.com/sim-ready/watertight-mesh/#get-started)

![A textured lantern post with red marks where the source mesh has holes, at the beam end and at the chain](/use-cases/jobs/watertight-mesh/before.webp)

![The same textured lantern post after one hosted compile, with no holes](/use-cases/jobs/watertight-mesh/after.webp)

Source, holes in red

Closed solids

-   **7 to 0**holes in the mesh
-   **52 to 0**open edges, where the surface has a gap
-   **506 to 0**places where parts pass through each other
-   **1.8 m**tall, set to real-world size

The Lantern sample model from Khronos, compiled on the hosted API on 3 December 2026.

## Holes break simulations

A physics engine finds an object's volume, mass and center by treating its mesh as a sealed solid. A single gap, or two parts that pass through each other, leaves it guessing, so the mass can come out wrong and the object tips, sinks or jitters.

Generated models and scans arrive full of these gaps. Closing them by hand in a mesh editor does not scale to a scene with hundreds of props.

## What the terms mean

-   ### Watertight

    Every edge of the surface joins exactly two faces, so the mesh has a clear inside and outside.

    Volume, mass and center of mass are only defined for a closed surface.

-   ### Open edge

    An edge with a face on one side only, the border of a hole.

    Each one is a spot where the simulator cannot tell inside from outside.

-   ### Self-intersection

    Two parts of the surface pass through each other.

    Contact and volume calculations disagree about which side is inside.

## How it works

1.  ### Send each model

    Your agent uploads GLB, FBX, OBJ, STL or PLY files up to 64 MB, one compile per model.

2.  ### Ask for a closed mesh

    The spec fills holes, rebuilds each part as a closed solid and sets the height in meters. Your first 50 mesh Drafts are free with the $5 signup credit.

3.  ### Check the result

    You get a GLB with its texture and a report that says whether every part is closed, and how many holes and overlaps are left.

[What is a watertight mesh](https://appliedmanifold.com/learn/watertight-mesh/)

## Questions

### What does watertight mean for a mesh?

A watertight mesh has no holes: every edge joins exactly two faces, so the surface fully encloses a volume. Simulators need that to find an object's volume, mass and center of mass.

### Does making a mesh watertight change its shape?

Slightly. Parts are rebuilt as closed solids. On the lantern post the average surface shift was 1.2 mm and the worst point moved 7.3 cm on a 1.8 m post, near the holes. The report lists both so your agent can decide whether to keep the result.

### What if the mesh cannot be closed?

The report says which parts are still open and names the spec setting that is blocking it, so your agent can retry with that setting changed. A mesh with a few thousand non-manifold edges, such as some generated models, can need more than one try.

### Does it keep my textures?

Yes. The lantern post kept its wood, stone and metal textures, because the spec keeps the original UV layout.

### Which files can I send?

GLB, FBX, OBJ, STL or PLY files up to 64 MB, one compile per model.

### How much does a watertight compile cost?

Your first 50 mesh Drafts are free with the $5 signup credit. Your agent sees the price before anything runs.

[All use cases](https://appliedmanifold.com/use-cases/)

## Use with your agent

Paste the prompt into Claude Code, Cursor or Codex. Your agent connects to Spatial Compiler and comes back with a GLB with closed parts and a report that says whether every part is closed.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys&job=sim-scene) [Try it in the Playground →](https://console.appliedmanifold.com/playground?module=meshfx&item=washing_machine)

New accounts start with $5 of usage, and you see the price of each job before it runs.

Agent prompt

Connect the Spatial Compiler MCP server at https://spatialcompiler.dev/mcp if it isn't connected yet. Use meshfx to make my GLB watertight: fill all holes, rebuild each part as a closed solid, keep its texture, set it to its real height in meters, and tell me if any part is still open. Run a Draft first. Your first 50 mesh Drafts are free with the $5 signup credit. Ask before running a final compile.

Or add the server yourself in Claude Code:

`claude mcp add --transport http spatial-compiler https://spatialcompiler.dev/mcp`

[Set it up in Cursor, Codex or another agent](https://appliedmanifold.com/docs/mcp/)

Once connected, your agent can call the `starter` tool for a ready fire Draft spec and the exact call that runs it. Your first 100 fire Drafts are free with the $5 signup credit.
