forked from gacevedobolton/myVTKPythonLibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
exportDynaDeformationGradients.py
46 lines (41 loc) · 2.01 KB
/
exportDynaDeformationGradients.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#coding=utf8
########################################################################
### ###
### Created by Martin Genet, 2012-2016 ###
### ###
### University of California at San Francisco (UCSF), USA ###
### Swiss Federal Institute of Technology (ETH), Zurich, Switzerland ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
import os
import myVTKPythonLibrary as myVTK
########################################################################
def exportDynaDeformationGradients(d3plot_file_basename):
lspp_filename = d3plot_file_basename+'.lspp'
lspp_file = open(lspp_filename, 'w')
lspp_file.write('''\
open d3plot "''' + d3plot_file_basename + '''.d3plot"
selectpart shell off
fringe 91
output "''' + d3plot_file_basename + '''.history#11" 102 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1.000000
fringe 92
output "''' + d3plot_file_basename + '''.history#12" 102 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1.000000
fringe 93
output "''' + d3plot_file_basename + '''.history#13" 102 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1.000000
fringe 94
output "''' + d3plot_file_basename + '''.history#14" 102 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1.000000
fringe 95
output "''' + d3plot_file_basename + '''.history#15" 102 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1.000000
fringe 96
output "''' + d3plot_file_basename + '''.history#16" 102 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1.000000
fringe 97
output "''' + d3plot_file_basename + '''.history#17" 102 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1.000000
fringe 98
output "''' + d3plot_file_basename + '''.history#18" 102 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1.000000
fringe 99
output "''' + d3plot_file_basename + '''.history#19" 102 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1.000000
exit
''')
lspp_file.close()
os.system('lspp -nographics c='+lspp_filename)