Variables | |
mode = sys.argv[1] | |
inputFileName = sys.argv[2] | |
outputFileName = sys.argv[3] | |
scaleX = float(sys.argv[4]) | |
scaleY = float(sys.argv[5]) | |
scaleZ = float(sys.argv[6]) | |
myMesh = mesh.Mesh.from_file(inputFileName) | |
dX = float(sys.argv[4]) | |
dY = float(sys.argv[5]) | |
dZ = float(sys.argv[6]) | |
axis = str(sys.argv[4]) | |
deg = float(sys.argv[5]) | |
float | theta = - deg * np.pi / 180.0 |
This script transforms the coordinates in a stl file. We support three modes: scale, translate, or rotate Usage: python dafoam_plot3dscale.py scale plot3d_file_input.xyz plot3d_file_output.xyz 2 2 2 This will scale the x, y, and z coordinates by a factor of 2 python dafoam_plot3dscale.py translate plot3d_file_input.xyz plot3d_file_output.xyz 1 2 3 This will translate the x, y, and z coordinates by 1, 2, and 3 python dafoam_plot3dscale.py rotate plot3d_file_input.xyz plot3d_file_output.xyz x 10 This will rotate the x, y, and z coordinates with respect to the x axis by 10 degree
mode = sys.argv[1] |
Definition at line 21 of file dafoam_stltransform.py.
inputFileName = sys.argv[2] |
Definition at line 23 of file dafoam_stltransform.py.
outputFileName = sys.argv[3] |
Definition at line 24 of file dafoam_stltransform.py.
scaleX = float(sys.argv[4]) |
Definition at line 27 of file dafoam_stltransform.py.
scaleY = float(sys.argv[5]) |
Definition at line 28 of file dafoam_stltransform.py.
scaleZ = float(sys.argv[6]) |
Definition at line 29 of file dafoam_stltransform.py.
myMesh = mesh.Mesh.from_file(inputFileName) |
Definition at line 36 of file dafoam_stltransform.py.
dX = float(sys.argv[4]) |
Definition at line 49 of file dafoam_stltransform.py.
dY = float(sys.argv[5]) |
Definition at line 50 of file dafoam_stltransform.py.
dZ = float(sys.argv[6]) |
Definition at line 51 of file dafoam_stltransform.py.
axis = str(sys.argv[4]) |
Definition at line 71 of file dafoam_stltransform.py.
deg = float(sys.argv[5]) |
Definition at line 72 of file dafoam_stltransform.py.
float theta = - deg * np.pi / 180.0 |
Definition at line 85 of file dafoam_stltransform.py.