Merge commit '62dd0f06504a50c4c37f6aa782d4a306cccd8f9b' into nextRelease
This commit is contained in:
commit
e0fcb25386
1 changed files with 30 additions and 1 deletions
|
@ -44,6 +44,14 @@ Usage
|
||||||
-scale vector
|
-scale vector
|
||||||
Scales the points by the given vector.
|
Scales the points by the given vector.
|
||||||
|
|
||||||
|
-cylToCart (vector vector)
|
||||||
|
Assumes that constant/points is defined in cylindrical coordinates:
|
||||||
|
(radialPosition tangentialPosition axialPosition) for a coordinate
|
||||||
|
system with origin: first vec, axis: second vec, direction: third vec
|
||||||
|
Radial and axial positions should be in [m].
|
||||||
|
Tangential positions should be in [radians].
|
||||||
|
Transforms the points to Cartesian positions.
|
||||||
|
|
||||||
The any or all of the three options may be specified and are processed
|
The any or all of the three options may be specified and are processed
|
||||||
in the above order.
|
in the above order.
|
||||||
|
|
||||||
|
@ -69,6 +77,7 @@ Usage
|
||||||
#include "transformGeometricField.H"
|
#include "transformGeometricField.H"
|
||||||
#include "IStringStream.H"
|
#include "IStringStream.H"
|
||||||
#include "RodriguesRotation.H"
|
#include "RodriguesRotation.H"
|
||||||
|
#include "cylindricalCS.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
using namespace Foam::mathematicalConstant;
|
using namespace Foam::mathematicalConstant;
|
||||||
|
@ -151,6 +160,7 @@ int main(int argc, char *argv[])
|
||||||
argList::validOptions.insert("yawPitchRoll", "(yaw pitch roll)");
|
argList::validOptions.insert("yawPitchRoll", "(yaw pitch roll)");
|
||||||
argList::validOptions.insert("rotateFields", "");
|
argList::validOptions.insert("rotateFields", "");
|
||||||
argList::validOptions.insert("scale", "vector");
|
argList::validOptions.insert("scale", "vector");
|
||||||
|
argList::validOptions.insert("cylToCart", "(originVec axisVec directionVec)");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
@ -186,7 +196,7 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
FatalErrorIn(args.executable())
|
FatalErrorIn(args.executable())
|
||||||
<< "No options supplied, please use one or more of "
|
<< "No options supplied, please use one or more of "
|
||||||
"-translate, -rotate or -scale options."
|
"-translate, -rotate, -scale, or -cylToCart options."
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,6 +311,25 @@ int main(int argc, char *argv[])
|
||||||
points.replace(vector::Z, scaleVector.z()*points.component(vector::Z));
|
points.replace(vector::Z, scaleVector.z()*points.component(vector::Z));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (args.optionFound("cylToCart"))
|
||||||
|
//HN, 140523
|
||||||
|
{
|
||||||
|
vectorField n1n2(args.optionLookup("cylToCart")());
|
||||||
|
n1n2[1] /= mag(n1n2[1]);
|
||||||
|
n1n2[2] /= mag(n1n2[2]);
|
||||||
|
|
||||||
|
cylindricalCS ccs
|
||||||
|
(
|
||||||
|
"ccs",
|
||||||
|
n1n2[0],
|
||||||
|
n1n2[1],
|
||||||
|
n1n2[2],
|
||||||
|
false // Use radians
|
||||||
|
);
|
||||||
|
|
||||||
|
points = ccs.globalPosition(points);
|
||||||
|
}
|
||||||
|
|
||||||
// Set the precision of the points data to 10
|
// Set the precision of the points data to 10
|
||||||
IOstream::defaultPrecision(10);
|
IOstream::defaultPrecision(10);
|
||||||
|
|
||||||
|
|
Reference in a new issue