v0.14.0
Functions | Variables
make_mesh_png Namespace Reference

Functions

def make_png (file, args)
 
def is_not_vtk (files)
 

Variables

bool debug = True
 
 parser
 
 help
 
 nargs
 
 dest
 
 default
 
 type
 
 args = parser.parse_args()
 
 display = Display(backend="xvfb", visible=False, size=(800, 800))
 

Function Documentation

◆ is_not_vtk()

def make_mesh_png.is_not_vtk (   files)

Definition at line 37 of file make_mesh_png.py.

37 def is_not_vtk(files):
38  return not files.endswith('vtk')
39 

◆ make_png()

def make_mesh_png.make_png (   file,
  args 
)

Definition at line 12 of file make_mesh_png.py.

12 def make_png(file, args):
13  my_cmap = plt.cm.get_cmap("turbo", 124)
14  mesh = pv.read(file)
15 
16  if args.wrap_vector:
17  mesh = mesh.warp_by_vector(args.wrap_vector, factor=1)
18 
19  p = pv.Plotter(notebook=False, off_screen=True)
20  if args.field:
21  p.add_mesh(
22  mesh,
23  scalars=args.field,
24  show_edges=False,
25  smooth_shading=False, cmap=my_cmap)
26  else:
27  p.add_mesh(
28  mesh,
29  show_edges=True, edge_color='white', color='white')
30  if args.d2:
31  p.camera_position = args.d2
32  p.camera.zoom(args.zoom)
33  p.camera.roll += args.roll
34  p.camera.azimuth += args.azimuth
35  image = p.screenshot('%spng' % file[:-3])
36 

Variable Documentation

◆ args

make_mesh_png.args = parser.parse_args()

Definition at line 51 of file make_mesh_png.py.

◆ debug

bool make_mesh_png.debug = True

Definition at line 10 of file make_mesh_png.py.

◆ default

make_mesh_png.default

Definition at line 45 of file make_mesh_png.py.

◆ dest

make_mesh_png.dest

Definition at line 45 of file make_mesh_png.py.

◆ display

make_mesh_png.display = Display(backend="xvfb", visible=False, size=(800, 800))

Definition at line 57 of file make_mesh_png.py.

◆ help

make_mesh_png.help

Definition at line 44 of file make_mesh_png.py.

◆ nargs

make_mesh_png.nargs

Definition at line 44 of file make_mesh_png.py.

◆ parser

make_mesh_png.parser
Initial value:
1 = argparse.ArgumentParser(
2  description="Convert multiple vtk files to png files using the pyvista.")

Definition at line 41 of file make_mesh_png.py.

◆ type

make_mesh_png.type

Definition at line 46 of file make_mesh_png.py.

make_mesh_png.make_png
def make_png(file, args)
Definition: make_mesh_png.py:12
make_mesh_png.is_not_vtk
def is_not_vtk(files)
Definition: make_mesh_png.py:37