halfedge_edge_map
halfedge_edge_map(F, assume_manifold=True)
Computes unique edge indices, and a unique map from halfedges to edges, as well as its inverse. There is no particular ordering convention for edges. Boundary edges are guaranteed to be oriented as in F.
The ordering convention for halfedges is the following: [halfedge opposite vertex 0, halfedge opposite vertex 1, halfedge opposite vertex 2]
Parameters:
Name | Type | Description | Default |
---|---|---|---|
F |
(m,3) numpy int array
|
face index list of a triangle mesh |
required |
assume_manifold |
bool, optional (default True)
|
if this is true, will assume that F is manifold, and thus every edge can be incident to at most two halfedges. The algorithm is very slow if this is False. |
True
|
Returns:
Name | Type | Description |
---|---|---|
he |
(m,3,2) numpy int array
|
halfedge list as per above conventions |
E |
(e,2) numpy int array
|
indices of edges into the vertex array |
he_to_E |
(m,3) numpy int array
|
index map from he to corresponding row in E |
E_to_he |
(e,2,2) numpy int array of list of m (k,2) numpy int arrays
|
if assume_manifold, (e,2,2) index map from e to corresponding row and col in he for two halfedges (or -1 if only one halfedge exists); if not assume_manifold, python list with m entries of (k,2) arrays, where k is however many halfedges are adjacent to each edge. |
Examples:
TODO
Source code in src/gpytoolbox/halfedge_edge_map.py
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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|