changeset 2:415160ef2f85 draft

Uploaded
author greg
date Sat, 05 Dec 2015 10:31:14 -0500
parents b18f4c1c852d
children 5297e76f839f
files icqsol_translate_shape.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/icqsol_translate_shape.py	Sat Dec 05 10:31:03 2015 -0500
+++ b/icqsol_translate_shape.py	Sat Dec 05 10:31:14 2015 -0500
@@ -23,7 +23,7 @@
 tmp_dir = icqsol_utils.get_temp_dir()
 
 # Instantiate a ShapeManager for loading the input.
-if input_format == 'vtk':
+if input_format == icqsol_utils.VTK:
     shape_mgr = ShapeManager(file_format=input_format, vtk_dataset_type=args.input_dataset_type)
 else:
     shape_mgr = ShapeManager(file_format=input_format)
@@ -35,8 +35,9 @@
 displ = (args.displacement_x, args.displacement_y, args.displacement_z)
 shape_mgr.translateVtkPolyData(vtk_poly_data, displ=displ)
 
+# Save the output.
 output_format, output_file_type = icqsol_utils.get_format_and_type(args.output_vtk_type)
 tmp_dir = icqsol_utils.get_temp_dir()
-tmp_output_path = icqsol_utils.get_temporary_file_path(tmp_dir, 'vtk')
+tmp_output_path = icqsol_utils.get_temporary_file_path(tmp_dir, icqsol_utils.VTK)
 shape_mgr.saveVtkPolyData(vtk_poly_data, file_name=tmp_output_path, file_type=output_file_type)
 shutil.move(tmp_output_path, args.output)