Surface utilities: standardised argument naming and ordering

for input and output surface files
This commit is contained in:
Chris Greenshields
2017-05-12 14:43:10 +01:00
parent 3aec2ad4ac
commit da6b1bf361
29 changed files with 101 additions and 105 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -53,9 +53,9 @@ int main(int argc, char *argv[])
); );
argList::noParallel(); argList::noParallel();
argList::validArgs.append("surfaceFile"); argList::validArgs.append("surface file");
argList::validArgs.append("surfaceFile"); argList::validArgs.append("surface file");
argList::validArgs.append("output surfaceFile"); argList::validArgs.append("output surface file");
argList::addOption argList::addOption
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -45,8 +45,8 @@ using namespace Foam;
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
argList::noParallel(); argList::noParallel();
argList::validArgs.append("input surfaceFile"); argList::validArgs.append("surface file");
argList::validArgs.append("output surfaceFile"); argList::validArgs.append("output surface file");
argList::validArgs.append("includedAngle [0..180]"); argList::validArgs.append("includedAngle [0..180]");
argList args(argc, argv); argList args(argc, argv);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -395,9 +395,9 @@ void calcFeaturePoints(const pointField& points, const edgeList& edges)
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
argList::noParallel(); argList::noParallel();
argList::validArgs.append("surface file");
argList::validArgs.append("surface file");
argList::validArgs.append("action"); argList::validArgs.append("action");
argList::validArgs.append("surface file");
argList::validArgs.append("surface file");
argList::addBoolOption argList::addBoolOption
( (
@ -428,7 +428,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
word action(args.args()[1]); word action(args.args()[3]);
HashTable<booleanSurface::booleanOpType> validActions; HashTable<booleanSurface::booleanOpType> validActions;
validActions.insert("intersection", booleanSurface::INTERSECTION); validActions.insert("intersection", booleanSurface::INTERSECTION);
@ -442,7 +442,7 @@ int main(int argc, char *argv[])
<< "Supported actions:" << validActions.toc() << abort(FatalError); << "Supported actions:" << validActions.toc() << abort(FatalError);
} }
fileName surf1Name(args.args()[2]); fileName surf1Name = args[1];
Info<< "Reading surface " << surf1Name << endl; Info<< "Reading surface " << surf1Name << endl;
triSurface surf1(surf1Name); triSurface surf1(surf1Name);
@ -450,7 +450,7 @@ int main(int argc, char *argv[])
surf1.writeStats(Info); surf1.writeStats(Info);
Info<< endl; Info<< endl;
fileName surf2Name(args[3]); fileName surf2Name = args[2];
Info<< "Reading surface " << surf2Name << endl; Info<< "Reading surface " << surf2Name << endl;
triSurface surf2(surf2Name); triSurface surf2(surf2Name);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -172,7 +172,7 @@ labelList countBins
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
argList::noParallel(); argList::noParallel();
argList::validArgs.append("surfaceFile"); argList::validArgs.append("surface file");
argList::addBoolOption argList::addBoolOption
( (
"checkSelfIntersection", "checkSelfIntersection",

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -47,10 +47,10 @@ using namespace Foam;
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
argList::noParallel(); argList::noParallel();
argList::validArgs.append("surfaceFile"); argList::validArgs.append("surface file");
argList::validArgs.append("output surface file");
argList::validArgs.append("min length"); argList::validArgs.append("min length");
argList::validArgs.append("min quality"); argList::validArgs.append("min quality");
argList::validArgs.append("output surfaceFile");
argList::addBoolOption argList::addBoolOption
( (
"noClean", "noClean",
@ -59,9 +59,9 @@ int main(int argc, char *argv[])
argList args(argc, argv); argList args(argc, argv);
const fileName inFileName = args[1]; const fileName inFileName = args[1];
const scalar minLen = args.argRead<scalar>(2); const fileName outFileName = args[2];
const scalar minQuality = args.argRead<scalar>(3); const scalar minLen = args.argRead<scalar>(3);
const fileName outFileName = args[4]; const scalar minQuality = args.argRead<scalar>(4);
Info<< "Reading surface " << inFileName << nl Info<< "Reading surface " << inFileName << nl
<< "Collapsing all triangles with" << nl << "Collapsing all triangles with" << nl

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -66,14 +66,14 @@ int mapVertex(::List<int>& collapse_map, int a, int mx)
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
argList::noParallel(); argList::noParallel();
argList::validArgs.append("surfaceFile"); argList::validArgs.append("surface file");
argList::validArgs.append("output surface file");
argList::validArgs.append("reductionFactor"); argList::validArgs.append("reductionFactor");
argList::validArgs.append("output surfaceFile");
argList args(argc, argv); argList args(argc, argv);
const fileName inFileName = args[1]; const fileName inFileName = args[1];
const scalar reduction = args.argRead<scalar>(2); const fileName outFileName = args[2];
const fileName outFileName = args[3]; const scalar reduction = args.argRead<scalar>(3);
if (reduction <= 0 || reduction > 1) if (reduction <= 0 || reduction > 1)
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -65,8 +65,8 @@ int main(int argc, char *argv[])
); );
argList::noParallel(); argList::noParallel();
argList::validArgs.append("inputFile"); argList::validArgs.append("surface file");
argList::validArgs.append("outputFile"); argList::validArgs.append("output surface file");
argList::addBoolOption argList::addBoolOption
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -46,8 +46,8 @@ int main(int argc, char *argv[])
"Convert between edgeMesh formats" "Convert between edgeMesh formats"
); );
argList::noParallel(); argList::noParallel();
argList::validArgs.append("inputFile"); argList::validArgs.append("edge file");
argList::validArgs.append("outputFile"); argList::validArgs.append("output edge file");
argList::addOption argList::addOption
( (
"scale", "scale",

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -42,7 +42,7 @@ using namespace Foam;
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
argList::noParallel(); argList::noParallel();
argList::validArgs.append("surfaceFile"); argList::validArgs.append("surface file");
argList::addOption("x", "X", "The point x-coordinate (if non-zero)"); argList::addOption("x", "X", "The point x-coordinate (if non-zero)");
argList::addOption("y", "Y", "The point y-coordinate (if non-zero)"); argList::addOption("y", "Y", "The point y-coordinate (if non-zero)");
argList::addOption("z", "Z", "The point y-coordinate (if non-zero)"); argList::addOption("z", "Z", "The point y-coordinate (if non-zero)");

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -56,7 +56,7 @@ int main(int argc, char *argv[])
); );
argList::noParallel(); argList::noParallel();
argList::validArgs.append("surfaceFile"); argList::validArgs.append("surface file");
argList::addBoolOption argList::addBoolOption
( (
"shellProperties", "shellProperties",

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -130,11 +130,11 @@ int main(int argc, char *argv[])
{ {
argList::noParallel(); argList::noParallel();
argList::validOptions.clear(); argList::validOptions.clear();
argList::validArgs.append("surfaceFile"); argList::validArgs.append("surface file");
argList::validArgs.append("output surface file");
argList::validArgs.append("lambda (0..1)"); argList::validArgs.append("lambda (0..1)");
argList::validArgs.append("mu (0..1)"); argList::validArgs.append("mu (0..1)");
argList::validArgs.append("iterations"); argList::validArgs.append("iterations");
argList::validArgs.append("output surfaceFile");
argList::addOption argList::addOption
( (
"featureFile", "featureFile",
@ -143,10 +143,10 @@ int main(int argc, char *argv[])
argList args(argc, argv); argList args(argc, argv);
const fileName surfFileName = args[1]; const fileName surfFileName = args[1];
const scalar lambda = args.argRead<scalar>(2); const fileName outFileName = args[2];
const scalar mu = args.argRead<scalar>(3); const scalar lambda = args.argRead<scalar>(3);
const label iters = args.argRead<label>(4); const scalar mu = args.argRead<scalar>(4);
const fileName outFileName = args[5]; const label iters = args.argRead<label>(5);
if (lambda < 0 || lambda > 1) if (lambda < 0 || lambda > 1)
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -76,8 +76,8 @@ int main(int argc, char *argv[])
); );
argList::noParallel(); argList::noParallel();
argList::validArgs.append("inputFile"); argList::validArgs.append("surface file");
argList::validArgs.append("outputFile"); argList::validArgs.append("output surface file");
argList::addBoolOption argList::addBoolOption
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -78,8 +78,8 @@ int main(int argc, char *argv[])
); );
argList::noParallel(); argList::noParallel();
argList::validArgs.append("inputFile"); argList::validArgs.append("surface file");
argList::validArgs.append("outputFile"); argList::validArgs.append("output surface file");
argList::addBoolOption("clean"); argList::addBoolOption("clean");
argList::addBoolOption("orient"); argList::addBoolOption("orient");

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -77,7 +77,7 @@ int main(int argc, char *argv[])
); );
argList::noParallel(); argList::noParallel();
argList::validArgs.append("outputFile"); argList::validArgs.append("output surface file");
argList::addBoolOption argList::addBoolOption
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -77,7 +77,7 @@ int main(int argc, char *argv[])
); );
argList::noParallel(); argList::noParallel();
argList::validArgs.append("inputFile"); argList::validArgs.append("surface file");
argList::addBoolOption argList::addBoolOption
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -75,7 +75,7 @@ int main(int argc, char *argv[])
argList::noBanner(); argList::noBanner();
argList::noParallel(); argList::noParallel();
argList::validArgs.append("surfaceFile"); argList::validArgs.append("surface file");
argList::addOption argList::addOption
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -60,7 +60,7 @@ int main(int argc, char *argv[])
( (
"extract surface from a polyMesh" "extract surface from a polyMesh"
); );
argList::validArgs.append("output file"); argList::validArgs.append("output surface file");
#include "addRegionOption.H" #include "addRegionOption.H"
argList::addBoolOption argList::addBoolOption
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -47,9 +47,9 @@ int main(int argc, char *argv[])
); );
argList::noParallel(); argList::noParallel();
argList::validArgs.append("surfaceFile"); argList::validArgs.append("surface file");
argList::validArgs.append("output surface file");
argList::validArgs.append("visiblePoint"); argList::validArgs.append("visiblePoint");
argList::validArgs.append("output surfaceFile");
argList::addBoolOption argList::addBoolOption
( (
"inside", "inside",
@ -64,8 +64,8 @@ int main(int argc, char *argv[])
argList args(argc, argv); argList args(argc, argv);
const fileName surfFileName = args[1]; const fileName surfFileName = args[1];
const point visiblePoint = args.argRead<point>(2); const fileName outFileName = args[2];
const fileName outFileName = args[3]; const point visiblePoint = args.argRead<point>(3);
const bool orientInside = args.optionFound("inside"); const bool orientInside = args.optionFound("inside");
const bool usePierceTest = args.optionFound("usePierceTest"); const bool usePierceTest = args.optionFound("usePierceTest");

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -44,14 +44,14 @@ using namespace Foam;
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
argList::noParallel(); argList::noParallel();
argList::validArgs.append("surfaceFile"); argList::validArgs.append("surface file");
argList::validArgs.append("output surface file");
argList::validArgs.append("merge distance"); argList::validArgs.append("merge distance");
argList::validArgs.append("output surfaceFile");
argList args(argc, argv); argList args(argc, argv);
const fileName surfFileName = args[1]; const fileName surfFileName = args[1];
const scalar mergeTol = args.argRead<scalar>(2); const fileName outFileName = args[2];
const fileName outFileName = args[3]; const scalar mergeTol = args.argRead<scalar>(3);
Info<< "Reading surface from " << surfFileName << " ..." << endl; Info<< "Reading surface from " << surfFileName << " ..." << endl;
Info<< "Merging points within " << mergeTol << " metre." << endl; Info<< "Merging points within " << mergeTol << " metre." << endl;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -103,8 +103,8 @@ int main(int argc, char *argv[])
"redistribute a triSurface" "redistribute a triSurface"
); );
argList::validArgs.append("triSurfaceMesh"); argList::validArgs.append("surface file");
argList::validArgs.append("distributionType"); argList::validArgs.append("distribution type");
argList::addBoolOption argList::addBoolOption
( (
"keepNonMapped", "keepNonMapped",

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -46,8 +46,8 @@ using namespace Foam;
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
argList::noParallel(); argList::noParallel();
argList::validArgs.append("surfaceFile"); argList::validArgs.append("surface file");
argList::validArgs.append("output surfaceFile"); argList::validArgs.append("output surface file");
argList args(argc, argv); argList args(argc, argv);
const fileName surfFileName = args[1]; const fileName surfFileName = args[1];

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -44,7 +44,7 @@ int main(int argc, char *argv[])
); );
argList::noParallel(); argList::noParallel();
argList::validArgs.append("input surfaceFile"); argList::validArgs.append("surface file");
argList args(argc, argv); argList args(argc, argv);
const fileName surfName = args[1]; const fileName surfName = args[1];

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -40,7 +40,7 @@ int main(int argc, char *argv[])
{ {
argList::noParallel(); argList::noParallel();
argList::validOptions.clear(); argList::validOptions.clear();
argList::validArgs.append("input surface file"); argList::validArgs.append("surface file");
argList::validArgs.append("output surface file"); argList::validArgs.append("output surface file");
argList args(argc, argv); argList args(argc, argv);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -671,8 +671,8 @@ int main(int argc, char *argv[])
"split multiply connected surface edges by duplicating points" "split multiply connected surface edges by duplicating points"
); );
argList::noParallel(); argList::noParallel();
argList::validArgs.append("surfaceFile"); argList::validArgs.append("surface file");
argList::validArgs.append("output surfaceFile"); argList::validArgs.append("output surface file");
argList::addBoolOption argList::addBoolOption
( (
"debug", "debug",

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -51,19 +51,19 @@ using namespace Foam;
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
argList::noParallel(); argList::noParallel();
argList::validArgs.append("surface file");
argList::validArgs.append("output surface file");
argList::validArgs.append("surfaceSubsetDict"); argList::validArgs.append("surfaceSubsetDict");
argList::validArgs.append("surfaceFile");
argList::validArgs.append("output surfaceFile");
argList args(argc, argv); argList args(argc, argv);
Info<< "Reading dictionary " << args[1] << " ..." << endl; Info<< "Reading dictionary " << args[3] << " ..." << endl;
IFstream dictFile(args[1]); IFstream dictFile(args[3]);
dictionary meshSubsetDict(dictFile); dictionary meshSubsetDict(dictFile);
Info<< "Reading surface " << args[2] << " ..." << endl; Info<< "Reading surface " << args[1] << " ..." << endl;
triSurface surf1(args[2]); triSurface surf1(args[1]);
const fileName outFileName(args[3]); const fileName outFileName = args[2];
Info<< "Original:" << endl; Info<< "Original:" << endl;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -172,7 +172,7 @@ int main(int argc, char *argv[])
); );
argList::noParallel(); argList::noParallel();
argList::validArgs.append("surfaceFile"); argList::validArgs.append("surface file");
argList::addOption argList::addOption
( (
"faceSet", "faceSet",

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -62,8 +62,8 @@ int main(int argc, char *argv[])
"Like transformPoints but for surfaces." "Like transformPoints but for surfaces."
); );
argList::noParallel(); argList::noParallel();
argList::validArgs.append("surfaceFile"); argList::validArgs.append("surface file");
argList::validArgs.append("output surfaceFile"); argList::validArgs.append("output surface file");
argList::addOption argList::addOption
( (
"translate", "translate",

View File

@ -6,18 +6,19 @@ cd ${0%/*} || exit 1 # Run from this directory
runApplication -s cone \ runApplication -s cone \
surfaceOrient constant/triSurface/cone.stl \ surfaceOrient constant/triSurface/cone.stl \
-inside '(0 -0.5 0)' \ constant/triSurface/cone_orient.stl \
constant/triSurface/cone_orient.stl -inside '(0 -0.5 0)'
runApplication -s sphere \ runApplication -s sphere \
surfaceOrient constant/triSurface/sphere.stl \ surfaceOrient constant/triSurface/sphere.stl \
-inside '(0 -0.5 0)' \ constant/triSurface/sphere_orient.stl \
constant/triSurface/sphere_orient.stl -inside '(0 -0.5 0)'
runApplication \ runApplication \
surfaceBooleanFeatures intersection \ surfaceBooleanFeatures \
constant/triSurface/cone_orient.stl \ constant/triSurface/cone_orient.stl \
constant/triSurface/sphere_orient.stl constant/triSurface/sphere_orient.stl \
intersection
runApplication foamyHexMesh runApplication foamyHexMesh

View File

@ -4,11 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
# Make sure surface is oriented properly. Since the letters
# contain disconnected regions use
# surfaceOrient -usePierceTest
cp system/controlDict.mesher system/controlDict cp system/controlDict.mesher system/controlDict
runApplication surfaceFeatureExtract runApplication surfaceFeatureExtract