gustaf.utils.connec.faces_to_edges#

gustaf.utils.connec.faces_to_edges(faces)[source]#

Compute edges based on following edge scheme.

Ref: (node_ind), edge_ind

    (0)
     /\
  0 /  \2
   /____\
(1)  1   (2)

      2
(3)*-----*(2)
   |     |
 3 |     | 1
(0)*-----*(1)
      0

Note: if edges index matter for tets, reorder it!

Parameters:

faces ((n, 3) or (n, 4) np.ndarray)

Returns:

edges

Return type:

(n * 3, 2) or (n * 4, 2) np.ndarray