Skip to content

boundary_vertices

boundary_vertices(F)

Given a triangle mesh with face indices F, returns the indices of all boundary vertices. Works only on manifold meshes.

Parameters:

Name Type Description Default
F (m,3) numpy int array

face index list of a triangle mesh

required

Returns:

Name Type Description
bV (bv,) numpy int array

list of indices into F of boundary vertices

Examples:

from gpytoolbox import read_mesh, boundary_vertices
v,f = read_mesh("test/unit_tests_data/bunny_oded.obj")
bv = boundary_vertices(f)
Source code in src/gpytoolbox/boundary_vertices.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
def boundary_vertices(F):
    """Given a triangle mesh with face indices F, returns the indices of all
    boundary vertices.
    Works only on manifold meshes.

    Parameters
    ----------
    F : (m,3) numpy int array
        face index list of a triangle mesh

    Returns
    -------
    bV : (bv,) numpy int array
        list of indices into F of boundary vertices

    Examples
    --------
    ```python
    from gpytoolbox import read_mesh, boundary_vertices
    v,f = read_mesh("test/unit_tests_data/bunny_oded.obj")
    bv = boundary_vertices(f)
    ```

    """

    return np.unique(boundary_edges(F))