Skip to content

boundary_edges

boundary_edges(F)

Given a triangle mesh with face indices F, returns all unique oriented boundary edges as indices into the vertex array. 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
bE (be,2) numpy int array.

indices of boundary edges into the vertex array

Examples:

from gpytoolbox import read_mesh, boundary_edges
v,f = read_mesh("test/unit_tests_data/bunny_oded.obj")
be = boundary_edges(f)
Source code in src/gpytoolbox/boundary_edges.py
 3
 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
def boundary_edges(F):
    """Given a triangle mesh with face indices F, returns all unique oriented
    boundary edges as indices into the vertex array.
    Works only on manifold meshes.

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

    Returns
    -------
    bE : (be,2) numpy int array.
        indices of boundary edges into the vertex array

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

    E,b = edges(F, return_boundary_indices=True)
    return E[b,:]