New transformation option for utility: transformPoints
Hello and a Good Evening,
Today I had the need to rotate my mesh along a specific axis, which does not pass through the origin..... an arbitrary axis defined by two points.
As far as I can see, none of the rotation transforms in the mesh utility: "transformPoints" allows this kind of a rotation about an arbitrary line..... or am I wrong?
In order to achieve my requirement, I added on one more command line option to transformPoints: "-rotateAlongLine", which allows the mesh to be rotated along any arbitrary axis which does not need to pass through the origin, and is defined by:
1. A point which lies on the axis P1(x,y,z)
2. A direction vector which defines the axis, which would typically by P2 - P1 (where P2 is another point on the line which defines the axis)
3. The required rotation angle (in degrees)
Hence, the new command-line option looks like this:
The implementation of this option is as follows:
1. Translate the mesh such that the given point becomes the origin of the mesh....:
It would be great if someone could add this to the Git repository of the OpenFOAM-1.6-ext project....? Unless this kind of operation is already possible (without having do it manually by using three calls to transformPoints i.e. :-)!)
If required, I can put up a zipped copy of the modified "transformPoints" utility.
|All times are GMT -4. The time now is 19:09.|