parameters: (mesh, order=1, method="simple")
return_statement: return subdivided_mesh
docstring: Subdivide the input mesh.
  
      Args:
          mesh: Input triangle mesh.
          order: (optional) Subdivision order.
          method: (optional) Subdivision method.  Choices are "simple" and "loop".
  
      Returns:
          Returns the subdivided mesh.  The per-face attribute "ori_face_index"
          tracks the original face index from the input mesh.
docstring_summary: Subdivide the input mesh.
docstring_tokens: Subdivide the input mesh .
function: def subdivide(mesh, order=1, method="simple"):
      """ Subdivide the input mesh.
  
      Args:
          mesh: Input triangle mesh.
          order: (optional) Subdivision order.
          method: (optional) Subdivision method.  Choices are "simple" and "loop".
  
      Returns:
          Returns the subdivided mesh.  The per-face attribute "ori_face_index"
          tracks the original face index from the input mesh.
  
      """
      subdiv = PyMesh.Subdivision.create(method)
      subdiv.subdivide(mesh.vertices, mesh.faces, order)
  
      vertices = subdiv.get_vertices()
      faces = subdiv.get_faces()
      ori_face_indices = subdiv.get_face_indices().ravel()
  
      subdivided_mesh = form_mesh(vertices, faces)
      subdivided_mesh.add_attribute("ori_face_index")
      subdivided_mesh.set_attribute("ori_face_index", ori_face_indices)
      return subdivided_mesh
function_tokens: def subdivide ( mesh , order = 1 , method = "simple" ) : subdiv = PyMesh . Subdivision . create ( method ) subdiv . subdivide ( mesh . vertices , mesh . faces , order ) vertices = subdiv . get_vertices ( ) faces = subdiv . get_faces ( ) ori_face_indices = subdiv . get_face_indices ( ) . ravel ( ) subdivided_mesh = form_mesh ( vertices , faces ) subdivided_mesh . add_attribute ( "ori_face_index" ) subdivided_mesh . set_attribute ( "ori_face_index" , ori_face_indices ) return subdivided_mesh