Skip to content

read_msh

read_msh(msh_file)

Reads .msh file generated by TetWild.

Parameters:

Name Type Description Default
msh_file str

path to Tet mesh .msh file (usually generated by TetWild)

required

Returns:

Name Type Description
V (n, 3) float numpy array

vertex positions

F (f, 3) int numpy array

triangle indices

T (m, 4) int numpy array

tetrahedra indices

Source code in src\fast_cody\read_msh.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
def read_msh(msh_file):
    """
    Reads .msh file generated by TetWild.

    Parameters
    ----------
    msh_file : str
        path to Tet mesh .msh file (usually generated by TetWild)

    Returns
    -------
    V : (n, 3) float numpy array
        vertex positions
    F : (f, 3) int numpy array
        triangle indices
    T : (m, 4) int numpy array
        tetrahedra indices

    """

    [V, F, T] = fcdp.readMSH(msh_file)
    return V, F, T