﻿---
title: Mesh checks
description: Check a surface for problems before you use it, and find tetrahedral meshes that overlap.
url: https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/
---

# Mesh checks – Python API Reference – Deformable v0.7.0

[`verify_surface`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#verify_surface) checks a surface for problems before you use it and reports one [`MeshIssue`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissue) per problem it finds. [`meshes_intersect`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshes_intersect) tells whether two tetrahedral meshes overlap, so that objects do not start inside each other.

## SelfIntersectionCheck

**Enum** · `deformable.SelfIntersectionCheck`

```python
class SelfIntersectionCheck(enum.IntEnum):
    SKIP = 0
    PER_ISLAND = 1
    FULL = 2
```

How far the self-intersection stage of [`verify_surface`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#verify_surface) goes: the stage that reports an edge crossing a face it does not touch.

The stage also splits the surface into islands, the parts whose faces join through shared edges, which the inward-normal and nesting stage of [`MeshChecks.closed_boundary`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshchecks) needs.

**Values**

- `SKIP` (`0`): No self-intersection, island, inward-normal or nesting check.
- `PER_ISLAND` (`1`): The default: a face crossed by an edge of another island is not reported; the two islands count as intersecting for the inward-normal and nesting stage.
- `FULL` (`2`): Every face crossed by an edge is reported, whatever the islands.

**See also** [Guide: Check a mesh before you use it](https://help.tangerina.io/deformable/v0.7.0/user-guides/python/tools/#check-a-mesh-before-you-use-it) · [C `DeformableSelfIntersectionCheck`](https://help.tangerina.io/deformable/v0.7.0/api-references/c/mesh-checks/#deformableselfintersectioncheck) · [Rust `SelfIntersectionCheck`](https://help.tangerina.io/deformable/v0.7.0/api-references/rust/mesh-checks/#selfintersectioncheck)

## MeshChecks

**Data class** · `deformable.MeshChecks`

```python
@dataclasses.dataclass(frozen=True)
class MeshChecks:
    angle_threshold_degrees: float
    gap_threshold: float
    planar_threshold: float
    uv_threshold: float | None
    same_uv: bool
    convex: bool
    closed_boundary: bool
    self_intersection: SelfIntersectionCheck | int
```

Which checks [`verify_surface`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#verify_surface) runs, and their thresholds.

[`MeshChecks.default()`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshchecks-default) gives the defaults the fields list. Some checks run whatever the fields say: lone and co-located vertices, co-located, non-manifold, inverted and degenerate edges, degenerate faces and holes, corners of one face at one position, outer loops that do not wind once, and faces with holes.

The mesh radius is the largest distance of a vertex position from the mean of the distinct positions. A face's radius is the largest distance of its corners from the mean of its outer loop's corners.

**Fields**

- `angle_threshold_degrees` (`float`): A face whose outer loop has a corner angle below this many degrees is a [`SMALL_ANGLE`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissuekind-small_angle) issue. The angle is the one between the corner's two edges, from 0 to 180 degrees, so a reflex corner counts as 360 degrees minus its interior angle. `default()` gives `2.0`.
- `gap_threshold` (`float`): Two corners of a face at different positions closer than this fraction of the mesh radius are a [`NEAR_VERTICES`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissuekind-near_vertices) issue; a negative threshold counts as its absolute value. At 0, only corners whose squared distance is 0 are reported: as [`CO_LOCATED_FACE_VERTICES`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissuekind-co_located_face_vertices) when they sit at one position, which no threshold turns off, and as [`NEAR_VERTICES`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissuekind-near_vertices) when they are so close that the square of their distance rounds to 0. `default()` gives `0.001`.
- `planar_threshold` (`float`): A face with a corner farther from its outer loop's plane than this fraction of its radius is a [`NON_PLANAR`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissuekind-non_planar) issue, and skips the [`INCONSISTENT_UV`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissuekind-inconsistent_uv) check. A triangle without holes is always planar. `default()` gives `0.05`.
- `uv_threshold` (`float` or `None`): A corner farther than this fraction of the face radius from where the UV map of its face puts it is an [`INCONSISTENT_UV`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissuekind-inconsistent_uv) issue; None skips the check. `default()` gives `None`.
- `same_uv` (`bool`): Reports [`SAME_UV`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissuekind-same_uv): two corners of a face at different places with identical UVs. `default()` gives `False`.
- `convex` (`bool`): Reports [`NON_CONVEX`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissuekind-non_convex): a face with a reflex corner. `default()` gives `False`.
- `closed_boundary` (`bool`): Reports `NON_CLOSED_BOUNDARY`, an edge with one face, and runs the inward-normal and nesting stage last. `default()` gives `False`.
- `self_intersection` ([`SelfIntersectionCheck`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#selfintersectioncheck) or `int`): How far the self-intersection stage goes. An int that is no member's value makes [`verify_surface`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#verify_surface) raise [`DeformableError`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/errors/#deformableerror) with the status [`INVALID_ARGUMENT`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/errors/#status-invalid_argument), and one that does not fit in 32 bits ValueError. `default()` gives [`SelfIntersectionCheck.PER_ISLAND`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#selfintersectioncheck-per_island).

**Example**

```python
# A cage for tetrahedralize: every edge on two faces, none crossed.
checks = deformable.MeshChecks.default(
    closed_boundary=True,
    self_intersection=deformable.SelfIntersectionCheck.FULL,
)
surface = deformable.SurfaceMesh(polygons)
deformable.verify_surface(surface, checks=checks)
# []
```

**See also** [Guide: Check a mesh before you use it](https://help.tangerina.io/deformable/v0.7.0/user-guides/python/tools/#check-a-mesh-before-you-use-it) · [C `DeformableMeshChecks`](https://help.tangerina.io/deformable/v0.7.0/api-references/c/mesh-checks/#deformablemeshchecks) · [Rust `MeshChecks`](https://help.tangerina.io/deformable/v0.7.0/api-references/rust/mesh-checks/#meshchecks)

### MeshChecks.default

**Class method** · `deformable.MeshChecks.default`

```python
@classmethod
def default(
    cls,
    **changes: float | bool | SelfIntersectionCheck | None,
) -> MeshChecks
```

The defaults the fields list, with the given fields changed.

**Parameters**

- `**changes` (`float`, `bool`, [`SelfIntersectionCheck`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#selfintersectioncheck) or `None`): Field values that replace the defaults, by field name.

**Raises**

`TypeError` when `changes` names a field [`MeshChecks`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshchecks) does not have.

**See also** [C `deformable_mesh_checks_default`](https://help.tangerina.io/deformable/v0.7.0/api-references/c/mesh-checks/#deformable_mesh_checks_default)

## MeshIssueKind

**Enum** · `deformable.MeshIssueKind`

```python
class MeshIssueKind(enum.IntEnum):
    LONE_VERTEX = 0
    NON_CLOSED_BOUNDARY = 1
    NON_MANIFOLD = 2
    CO_LOCATED_VERTICES = 3
    CO_LOCATED_EDGES = 4
    INVERTED_NORMAL = 5
    DEGENERATE_EDGE = 6
    DEGENERATE_FACE = 7
    DEGENERATE_HOLE = 8
    CO_LOCATED_FACE_VERTICES = 9
    NEAR_VERTICES = 10
    SMALL_ANGLE = 11
    NON_PLANAR = 12
    NON_CONVEX = 13
    MULTIPLE_WINDING = 14
    SAME_UV = 15
    INCONSISTENT_UV = 16
    FACE_HAS_HOLES = 17
    SELF_INTERSECTION = 18
    INWARD_ISLAND_INTERSECTS = 19
    NESTED_ISLANDS = 20
    INWARD_NORMALS = 21
```

The kind of a [`MeshIssue`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissue): each member says which fields of the issue it fills; the others are 0 or empty.

**Values**

- `LONE_VERTEX` (`0`): No face uses the vertex `vertex`. It is reported for the vertex, then once more for its position, named by the lowest vertex there, when no vertex at that position is used.
- `NON_CLOSED_BOUNDARY` (`1`): The edge `edge` has one face; only with [`MeshChecks.closed_boundary`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshchecks).
- `NON_MANIFOLD` (`2`): The edge `edge` has more than two faces: `use_count` is its face count on an edge between vertex indices, its loop-edge count on an edge between positions.
- `CO_LOCATED_VERTICES` (`3`): The vertices `vertices`, ascending, sit at exactly one position; reported whatever the checks.
- `CO_LOCATED_EDGES` (`4`): The edges between vertex indices `edges`, in order of first use, join the same two positions.
- `INVERTED_NORMAL` (`5`): The two faces of the edge `edge` disagree on their orientation.
- `DEGENERATE_EDGE` (`6`): The two ends of the edge `edge` are at one position.
- `DEGENERATE_FACE` (`7`): The outer loop of the face `face` encloses no area, so it has no normal.
- `DEGENERATE_HOLE` (`8`): The loop of the hole `hole` of the face `face` encloses no area, so it has no normal.
- `CO_LOCATED_FACE_VERTICES` (`9`): The two corners `corners` of the face `face` sit at one position, across its outer loop and holes.
- `NEAR_VERTICES` (`10`): The two corners `corners` of the face `face` sit at different positions, closer than [`MeshChecks.gap_threshold`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshchecks) times the mesh radius: `distance` apart, `relative_distance` of the mesh radius.
- `SMALL_ANGLE` (`11`): The smallest corner angle of the outer loop of the face `face`, `degrees`, is below [`MeshChecks.angle_threshold_degrees`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshchecks). The angle is the one between the corner's two edges, from 0 to 180 degrees.
- `NON_PLANAR` (`12`): A corner of the face `face` lies farther from its outer loop's plane than [`MeshChecks.planar_threshold`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshchecks) times the face radius: `relative_deviation` is the largest distance of a corner from the plane, over the face radius.
- `NON_CONVEX` (`13`): The outer loop of the face `face` has a reflex corner; only with [`MeshChecks.convex`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshchecks). `interior_angle_degrees` is the interior angle of the most reflex one, in degrees, above 180.
- `MULTIPLE_WINDING` (`14`): The turns of the outer loop of the face `face` do not add up to one turn, within a quarter turn; reported whatever [`MeshChecks.convex`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshchecks) says.
- `SAME_UV` (`15`): The two corners `corners` of the face `face` sit at different places with identical coordinates in the UV set `uv_set`, 0 or 1; only with [`MeshChecks.same_uv`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshchecks). The two corners then drop out of the `INCONSISTENT_UV` check of that set.
- `INCONSISTENT_UV` (`16`): The corner `corner` of the face `face` lies farther than [`MeshChecks.uv_threshold`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshchecks) times the face radius from where the UV map of the face puts it, in the UV set `uv_set`: `relative_distance` is that distance over the face radius. The map is the affine one that fits the face's best-shaped triple of outer corners; only a face within the planar threshold, with a hole or more than three outer corners, is checked.
- `FACE_HAS_HOLES` (`17`): The face `face` has `hole_count` holes; reported for every face with holes, whatever the checks.
- `SELF_INTERSECTION` (`18`): The edge `edge` crosses the face `face`, which it does not touch. With [`SelfIntersectionCheck.PER_ISLAND`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#selfintersectioncheck-per_island), only an edge and a face of one island are reported.
- `INWARD_ISLAND_INTERSECTS` (`19`): From the inward-normal and nesting stage: the island `island`, whose face normals point inward, intersects another island. The stage reports nothing else then.
- `NESTED_ISLANDS` (`20`): From the inward-normal and nesting stage: the island `island` lies inside an island of the same orientation, its innermost container `container`; `inward` says whether both have inward face normals.
- `INWARD_NORMALS` (`21`): From the inward-normal and nesting stage: the islands `uncontained`, ascending, have inward face normals and no island contains them; `island_count` is the number of islands of the surface.

**See also** [Guide: Check a mesh before you use it](https://help.tangerina.io/deformable/v0.7.0/user-guides/python/tools/#check-a-mesh-before-you-use-it) · [C `DeformableMeshIssueKind`](https://help.tangerina.io/deformable/v0.7.0/api-references/c/mesh-checks/#deformablemeshissuekind)

## MeshIssue

**Data class** · `deformable.MeshIssue`

```python
@dataclasses.dataclass(frozen=True)
class MeshIssue:
    kind: MeshIssueKind
    vertex: int
    face: int
    hole: int
    corner: int
    uv_set: int
    island: int
    container: int
    use_count: int
    hole_count: int
    island_count: int
    edge: tuple[int, int]
    corners: tuple[int, int]
    inward: bool
    distance: float
    relative_distance: float
    degrees: float
    relative_deviation: float
    interior_angle_degrees: float
    vertices: list[int]
    edges: list[tuple[int, int]]
    uncontained: list[int]
```

One problem [`verify_surface`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#verify_surface) found, with the elements that locate it. Its kind says which fields it fills, as each [`MeshIssueKind`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissuekind) member lists; the others are 0 or empty.

Vertices are input vertex indices. An edge is named by the two vertex indices of the first loop edge on it, smaller first. Corners count within their polygon, outer loop first, then the holes; holes count within their face in corner order; islands, the parts of the surface whose faces join through shared edges, are numbered in order of their lowest face.

`NON_CLOSED_BOUNDARY` and [`NON_MANIFOLD`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissuekind-non_manifold) are checked twice: on the edges between distinct vertex indices, then on the edges between distinct positions. So an edge of a surface without co-located vertices is reported once by each; remove the duplicates before showing the issues.

**Fields**

- `kind` ([`MeshIssueKind`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissuekind)): What the issue is, which says the fields it fills.
- `vertex` (`int`): The unused vertex of [`LONE_VERTEX`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissuekind-lone_vertex).
- `face` (`int`): The face the issue names: the face of a face, corner or UV issue, or the face [`SELF_INTERSECTION`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissuekind-self_intersection) crosses.
- `hole` (`int`): The hole within the face.
- `corner` (`int`): The corner within the face.
- `uv_set` (`int`): The UV set, 0 or 1.
- `island` (`int`): The island an inward-normal or nesting issue names: the inward one, or the contained one.
- `container` (`int`): The innermost container island.
- `use_count` (`int`): The face count of a non-manifold edge between vertex indices, or the loop-edge count of one between positions.
- `hole_count` (`int`): The number of holes of the face.
- `island_count` (`int`): The number of islands of the surface.
- `edge` (`tuple[int, int]`): The edge's two vertices.
- `corners` (`tuple[int, int]`): The two corners within the face, smaller first.
- `inward` (`bool`): Whether both nested islands have inward face normals.
- `distance` (`float`): The distance between the two corners.
- `relative_distance` (`float`): The distance between the two corners over the mesh radius, or between a corner and where the UV map puts it over the face radius.
- `degrees` (`float`): The smallest corner angle of the outer loop, in degrees, measured between the corner's two edges.
- `relative_deviation` (`float`): The largest distance of a corner from the plane, over the face radius.
- `interior_angle_degrees` (`float`): The interior angle of the most reflex corner, in degrees, above 180.
- `vertices` (`list[int]`): The co-located vertices, ascending.
- `edges` (`list[tuple[int, int]]`): The co-located edges, in order of first use.
- `uncontained` (`list[int]`): The uncontained inward islands, ascending.

**See also** [Guide: Check a mesh before you use it](https://help.tangerina.io/deformable/v0.7.0/user-guides/python/tools/#check-a-mesh-before-you-use-it) · [C `DeformableMeshIssue`](https://help.tangerina.io/deformable/v0.7.0/api-references/c/mesh-checks/#deformablemeshissue) · [Rust `MeshIssue`](https://help.tangerina.io/deformable/v0.7.0/api-references/rust/mesh-checks/#meshissue)

## verify_surface

**Function** · `deformable.verify_surface`

```python
def verify_surface(
    mesh: SurfaceMesh,
    holes: Sequence[FaceHole] = (),
    checks: MeshChecks | None = None,
) -> list[MeshIssue]
```

Checks the polygon mesh of a surface mesh for problems before you use it, such as a cage before [`triangulate`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/tools/#triangulate), and returns one [`MeshIssue`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissue) per problem found.

The checks read the positions, the polygons, the holes and the first two UV sets of `mesh`, not its normals or colours. Malformed input is an error, not an issue. With [`MeshChecks.closed_boundary`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshchecks), a last stage looks for islands with inward face normals and for islands nested inside an island of the same orientation; it runs only when every check before it passed. Its containment rays come from a stream with a fixed seed, so equal calls give equal results.

**Parameters**

- `mesh` ([`SurfaceMesh`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/meshes/#surfacemesh)): The surface mesh to check.
- `holes` ([`Sequence[FaceHole]`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/meshes/#facehole)): The runs of polygon corners that form hole loops; empty when no polygon has a hole.
- `checks` ([`MeshChecks`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshchecks) or `None`): Which checks run, and their thresholds; None takes [`MeshChecks.default()`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshchecks-default).

**Returns**

[`list[MeshIssue]`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/mesh-checks/#meshissue): The issues in check order; an empty list means the mesh passes.

**Raises**

[`DeformableError`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/errors/#deformableerror) with one of these statuses:

- [`INDEX_OUT_OF_RANGE`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/errors/#status-index_out_of_range): A corner names a vertex past the end of the positions, a polygon has no corners, a hole names a polygon past the last, or a polygon's hole runs do not cover the corners after its outer loop end to end. Each run needs at least one corner, and so does the outer loop.
- [`LENGTH_MISMATCH`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/errors/#status-length_mismatch): The polygon sizes do not add up to the number of corners.
- [`NON_FINITE_VALUE`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/errors/#status-non_finite_value): A position or a UV of the first two sets is NaN or infinite, or so is `angle_threshold_degrees`, `gap_threshold`, `planar_threshold` or a `uv_threshold` that is not None.

`ValueError` when the positions or normals of `mesh` do not form whole groups of three numbers, a UV set does not hold one coordinate pair per corner, the colours do not form whole groups of four numbers, or a polygon size, corner or hole value is negative or does not fit in 32 bits, or the `self_intersection` of `checks` does not fit in 32 bits; after the checks ran, when the library reports an issue kind this package does not know, which only a newer library does.

`TypeError` when the `self_intersection` of `checks` is not an int.

**Example**

```python
# The unit cube without its last face.
open_box = deformable.PolygonMesh(
    polygons.positions, [4] * 5, polygons.polygon_vertices[:20]
)
checks = deformable.MeshChecks.default(closed_boundary=True)
surface = deformable.SurfaceMesh(open_box)
issues = deformable.verify_surface(surface, checks=checks)
issues[0].kind.name, issues[0].edge
# ('NON_CLOSED_BOUNDARY', (1, 3))
```

**See also** [Guide: Check a mesh before you use it](https://help.tangerina.io/deformable/v0.7.0/user-guides/python/tools/#check-a-mesh-before-you-use-it) · [C `deformable_verify_surface`](https://help.tangerina.io/deformable/v0.7.0/api-references/c/mesh-checks/#deformable_verify_surface) · [Rust `verify_surface`](https://help.tangerina.io/deformable/v0.7.0/api-references/rust/mesh-checks/#verify_surface)

## meshes_intersect

**Function** · `deformable.meshes_intersect`

```python
def meshes_intersect(
    first: TetrahedralMesh,
    second: TetrahedralMesh,
) -> bool
```

Whether two tetrahedral meshes in world space overlap, to find objects that start inside each other: True when a tetrahedron of `first` and one of `second` have bounding boxes that meet and an overlap volume above 1e-10 with a nonzero normal.

The normal of a pair is the summed area of the second tetrahedron's faces clipped to the first. It vanishes, and the pair does not count, when either tetrahedron lies inside the other, the two coincide, or their overlap is symmetric about its centre, as some partial overlaps are: two identical meshes do not intersect, and faces on each other's planes can make the answer depend on the argument order. The clipping tolerance, 1e-12 times the longest edge, also comes from the first tetrahedron alone.

**Parameters**

- `first` ([`TetrahedralMesh`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/meshes/#tetrahedralmesh)): One mesh, in world space.
- `second` ([`TetrahedralMesh`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/meshes/#tetrahedralmesh)): The other mesh, in world space.

**Raises**

[`DeformableError`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/errors/#deformableerror) with one of these statuses:

- [`EMPTY_MESH`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/errors/#status-empty_mesh): `first` or `second` has no tetrahedrons.
- [`INDEX_OUT_OF_RANGE`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/errors/#status-index_out_of_range): A tetrahedron names a node past the end of its mesh's positions.
- [`NON_FINITE_VALUE`](https://help.tangerina.io/deformable/v0.7.0/api-references/python/errors/#status-non_finite_value): A position is NaN or infinite.

`ValueError` when the positions of a mesh do not form whole groups of three numbers, its tetrahedrons do not form whole groups of four indices, or an index is negative or does not fit in 32 bits.

**Example**

```python
# A copy of mesh moved half a unit along x overlaps it.
positions = [(x + 0.5, y, z) for x, y, z in mesh.positions]
moved = deformable.TetrahedralMesh(positions, mesh.tetrahedrons)
deformable.meshes_intersect(mesh, moved)
# True
```

**See also** [Guide: Find objects that start inside each other](https://help.tangerina.io/deformable/v0.7.0/user-guides/python/tools/#find-objects-that-start-inside-each-other) · [C `deformable_meshes_intersect`](https://help.tangerina.io/deformable/v0.7.0/api-references/c/mesh-checks/#deformable_meshes_intersect) · [Rust `meshes_intersect`](https://help.tangerina.io/deformable/v0.7.0/api-references/rust/mesh-checks/#meshes_intersect)
