# Sandbox.PolygonMesh.RemoveBadGeometry

```csharp
void RemoveBadGeometry()
```

Remove all invalid geometry from the mesh: degenerate faces, edges not attached
to any face and vertices not attached to any edge.

Declared in [Sandbox.PolygonMesh](/api/Sandbox.PolygonMesh).
Assembly: `Sandbox.Engine`.
