gustaf.utils.connec.subdivide_tri#

gustaf.utils.connec.subdivide_tri(mesh, return_dict=False)[source]#

Subdivide triangles. Each triangle is divided into 4 meshes.

Subdivided Faces

Triangles

Ref: (node_ind), face_ind

         (0)
             _/|
           _/ 0|
    (3)  _/____|(5)
       _/|    /|
     _/ 1| 3/ 2|
    /____|/____|
  (1)   (4)    (2)

face_ind | node_ind
---------|----------
0        | 0 3 5
1        | 1 4 3
2        | 2 5 4
3        | 3 4 5
Parameters:
  • mesh (Mesh)

  • return_dict (bool)

Returns:

  • new_vertices ((n, d) np.ndarray)

  • subdivided_faces ((m, 3) np.ndarray)

  • mesh_dict (dict) – iff return_dict=True, returns dict(vertices=new_vertices, faces=subdivided_faces).