def launchCmd(self, inputs, tmpStore, stdout_file):
mesh = inputs['mesh']
absPath = os.path.abspath(os.path.join('/data', mesh.path))
env = Environment(
loader=PackageLoader('pkg_codeaster.tools', 'templates')
)
templatePara = env.get_template('paraview_stress_warp_template.py')
with open('stress_warp_output_script.py', 'w') as file:
file.write(templatePara.render(input_mesh=absPath))
return {'script_file': 'stress_warp_output_script.py'
}
评论列表
文章目录