parameters: (self,cut_data)
docstring: Add a plane to the output plane list.
docstring_summary: Add a plane to the output plane list.
docstring_tokens: Add a plane to the output plane list .
function: def __define_output_plane(self,cut_data):
          '''Add a plane to the output plane list.'''
  
          normal_data = cut_data["normal"]
          n = Vector(3)
          n[0] = normal_data[0].GetDouble()
          n[1] = normal_data[1].GetDouble()
          n[2] = normal_data[2].GetDouble()
          # Sanity check on normal
          norm2 = n[0]*n[0] + n[1]*n[1] + n[2]*n[2]
          if norm2 < 1e-12:
              raise Exception("{0} Error: something went wrong in output plane definition: plane {1} has a normal with module 0.".format(self.__class__.__name__,self.output_surface_index))
  
          point_data = cut_data["point"]
          p = Vector(3)
          p[0] = point_data[0].GetDouble()
          p[1] = point_data[1].GetDouble()
          p[2] = point_data[2].GetDouble()
  
          # And finally, define the plane
          self.output_surface_index += 1
          self.cut_manager.GenerateCut(   self.model_part,
                                          self.cut_model_part,
                                          n,
                                          p,
                                          self.output_surface_index,
                                          0.01)
function_tokens: def __define_output_plane ( self , cut_data ) : normal_data = cut_data [ "normal" ] n = Vector ( 3 ) n [ 0 ] = normal_data [ 0 ] . GetDouble ( ) n [ 1 ] = normal_data [ 1 ] . GetDouble ( ) n [ 2 ] = normal_data [ 2 ] . GetDouble ( ) # Sanity check on normal norm2 = n [ 0 ] * n [ 0 ] + n [ 1 ] * n [ 1 ] + n [ 2 ] * n [ 2 ] if norm2 < 1e-12 : raise Exception ( "{0} Error: something went wrong in output plane definition: plane {1} has a normal with module 0." . format ( self . __class__ . __name__ , self . output_surface_index ) ) point_data = cut_data [ "point" ] p = Vector ( 3 ) p [ 0 ] = point_data [ 0 ] . GetDouble ( ) p [ 1 ] = point_data [ 1 ] . GetDouble ( ) p [ 2 ] = point_data [ 2 ] . GetDouble ( ) # And finally, define the plane self . output_surface_index += 1 self . cut_manager . GenerateCut ( self . model_part , self . cut_model_part , n , p , self . output_surface_index , 0.01 )