mymesh.mesh.mesh.addFaces#

mesh.addFaces(NewFaces, FaceSet=None)[source]#

Add new faces to the mesh. These faces will be appended to the end of the list of faces (mesh.Faces()). This should be done very carefully and only used for advanced manipulation of the mesh, as added faces may not make sense with the rest of the mesh. If the mesh has been changed and updated faces are desired, it’s safest to use mesh.reset() then recompute the faces with (mesh.Faces()). Note that if Faces hasn’t been referenced before (mesh._Faces==[]) they will be obtained in this function, so if the new faces are already part of the mesh, this may produce redundant faces.

Parameters:
  • NewFaces (array_like) – Node connectivities of the new face(s). This can either be a single face (shape=(1,m)) or multiple faces (shape=(n,m) or list of lists with length n for mixed element type faces). If a single face, it must be a 2D array or list of a single list (i.e. [[a,b,c]]).

  • FaceSet (str, optional) – If provided, name of a face set that the new faces will be added to in mesh.FaceSets[<FaceSet>], by default None.