surfaceTransformPoints, transformPoints: documented transformations in '-help' option

This commit is contained in:
Chris Greenshields
2021-08-14 17:42:51 +01:00
parent f3454baa08
commit 57a4460d08
2 changed files with 49 additions and 34 deletions

View File

@ -71,27 +71,34 @@ int main(int argc, char *argv[])
{
#include "removeCaseOptions.H"
const wordList supportedTransformations
argList::addNote
(
{"translate", "rotate", "Rx", "Ry", "Rz", "Ra", "scale"}
"Transforms a surface geometry "
"by translation, rotation and/or scaling.\n"
"The <transformations> are listed comma-separated in a string "
"and executed in sequence.\n\n"
"transformations:\n"
" translate=<vector> "
"translation by vector, e.g. (1 2 3)\n"
" rotate=(<n1> <n2>) "
"rotation from unit vector n1 to n2\n"
" Rx=<angle> "
"rotation by given angle [deg], e.g. 90, about x-axis\n"
" Ry=<angle> "
"rotation by given angle [deg] about y-axis\n"
" Rz=<angle> "
"rotation by given angle [deg] about z-axis\n"
" Ra=<axis vector> <angle> "
"rotation by given angle [deg] about specified axis\n"
" scale=<vector> "
"scale by factors from vector in x, y, z directions,\n"
" "
"e.g. (0.001 0.001 0.001) to scale from mm to m\n\n"
"example:\n"
" surfaceTransformPoints \"translate=(1.2 0 0), Rx=90\" "
"in.stl out.obj"
);
{
OStringStream supportedTransformationsStr;
supportedTransformationsStr << supportedTransformations << endl;
argList::addNote
(
"Transforms a surface e.g.\n"
"surfaceTransformPoints "
"\"translate=(-0.586 0 -0.156), "
"Ry=3.485, "
"translate=(0.586 0 0.156)\" "
"surf.stl tranformedSurf.obj\n\n"
"Supported transformations " + supportedTransformationsStr.str()
);
}
argList::noParallel();
argList::validArgs.append("transformations");
argList::validArgs.append("surface file");