mymesh.converter.faces2unique#

mymesh.converter.faces2unique(Faces, return_idx=False, return_inv=False)[source]#

Reduce set of mesh faces to contain only unique faces, i.e. there will only be one entry to indicate a face shared between two elements.

Parameters:
  • Faces (list) – Nodal connectivity of mesh faces (as obtained by solid2faces)

  • return_idx (bool, optional) – If true, will return idx, the array of indices that relate the original list of faces to the list of unique faces (UFaces = Faces[idx]), by default False. See numpy.unique for additional details.

  • return_inv (bool, optional) – If true, will return inv, the array of indices that relate the unique list of faces to the list of original faces (Faces = UFaces[inv]), by default False See numpy.unique for additional details.

Returns:

  • UFaces (list) – Nodal connectivity of unique mesh faces.

  • idx (np.ndarray, optional) – The array of indices that relate the unique list of faces to the list of original faces (UFaces = Faces[idx]).

  • inv (np.ndarray, optional) – The array of indices that relate the unique list of faces to the list of original faces (Faces = UFaces[inv]).