A very simple one, see if you can give me a hand...
I have multiple files, extension .tfm (which is actually a simple text file). The format inside each of them is always like this:
-2.90913045e-003 -6.36480816e-001 -7.71287046e-001 2.09995523e+001
-7.30901280e-004 7.71291457e-001 -6.36481700e-001 5.08653785e+002
9.99995501e-001 -1.28787360e-003 -2.70899210e-003 1.04250041e+003
0.00000000e+000 0.00000000e+000 0.00000000e+000 1.00000000e+000
Units: mm
# rotation x: 9.02438607e+001
# rotation y: -5.04696056e+001
# rotation z: 9.02618771e+001
# translation x: 2.09995523e+001
# translation y: 5.08653785e+002
# translation z: 1.04250041e+003
All I want to do is to remove the rotation, translate writing and stuff and leave it like this:
-2.90913045e-003 -6.36480816e-001 -7.71287046e-001 2.09995523e+001
-7.30901280e-004 7.71291457e-001 -6.36481700e-001 5.08653785e+002
9.99995501e-001 -1.28787360e-003 -2.70899210e-003 1.04250041e+003
0.00000000e+000 0.00000000e+000 0.00000000e+000 1.00000000e+000
Units: mm
9.02438607e+001
-5.04696056e+001
9.02618771e+001
2.09995523e+001
5.08653785e+002
1.04250041e+003
At the end, change the format to ".trm" and I don`t have to keep the original file.
Help?
THank you very much in advance.