parameters: (self, msg)
docstring: Creates the polydata for the deformable mesh specified in msg.
docstring_summary: Creates the polydata for the deformable mesh specified in msg.
docstring_tokens: Creates the polydata for the deformable mesh specified in msg .
function: def handle_init_message(self, msg):
          """Creates the polydata for the deformable mesh specified in msg."""
          folder = om.getOrCreateContainer(self._folder_name)
          for poly_item in self._poly_item_list:
              om.removeFromObjectModel(poly_item)
  
          self._names = []
          self._vertex_counts = []
          self._poly_data_list = []
          self._poly_item_list = []
          for mesh in msg.meshes:
              self._names.append(mesh.name)
              # Initial vertex positions are garbage; meaningful values will be
              # set by the update message.
              points = vtk.vtkPoints()
              self._vertex_counts.append(mesh.num_vertices)
              for i in range(mesh.num_vertices):
                  points.InsertNextPoint(0, 0, 0)
              triangles = vtk.vtkCellArray()
              for tri in mesh.tris:
                  triangles.InsertNextCell(3)
                  for i in tri.vertices:
                      triangles.InsertCellPoint(i)
              poly_data = vtk.vtkPolyData()
              poly_data.SetPoints(points)
              poly_data.SetPolys(triangles)
              poly_item = vis.showPolyData(
                  poly_data, mesh.name, parent=folder
              )
              poly_item.setProperty("Surface Mode", "Surface with edges")
              self._poly_data_list.append(poly_data)
              self._poly_item_list.append(poly_item)
function_tokens: def handle_init_message ( self , msg ) : folder = om . getOrCreateContainer ( self . _folder_name ) for poly_item in self . _poly_item_list : om . removeFromObjectModel ( poly_item ) self . _names = [ ] self . _vertex_counts = [ ] self . _poly_data_list = [ ] self . _poly_item_list = [ ] for mesh in msg . meshes : self . _names . append ( mesh . name ) # Initial vertex positions are garbage; meaningful values will be # set by the update message. points = vtk . vtkPoints ( ) self . _vertex_counts . append ( mesh . num_vertices ) for i in range ( mesh . num_vertices ) : points . InsertNextPoint ( 0 , 0 , 0 ) triangles = vtk . vtkCellArray ( ) for tri in mesh . tris : triangles . InsertNextCell ( 3 ) for i in tri . vertices : triangles . InsertCellPoint ( i ) poly_data = vtk . vtkPolyData ( ) poly_data . SetPoints ( points ) poly_data . SetPolys ( triangles ) poly_item = vis . showPolyData ( poly_data , mesh . name , parent = folder ) poly_item . setProperty ( "Surface Mode" , "Surface with edges" ) self . _poly_data_list . append ( poly_data ) self . _poly_item_list . append ( poly_item )