mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into cvm
Conflicts: applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C
This commit is contained in:
@ -45,14 +45,27 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("Foam surface file");
|
||||
argList::validArgs.append("Foam surface file");
|
||||
argList::validArgs.append("Foam output file");
|
||||
argList::addNote
|
||||
(
|
||||
"add two surfaces via a geometric merge on points."
|
||||
);
|
||||
|
||||
argList::addOption("points", "pointsFile");
|
||||
argList::addBoolOption("mergeRegions");
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("surfaceFile");
|
||||
argList::validArgs.append("surfaceFile");
|
||||
argList::validArgs.append("output surfaceFile");
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
"points",
|
||||
"file",
|
||||
"provide additional points"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"mergeRegions",
|
||||
"combine regions from both surfaces"
|
||||
);
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
|
||||
@ -46,18 +46,16 @@ using namespace Foam;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("input surface file");
|
||||
argList::validArgs.append("output surface file");
|
||||
argList::validArgs.append("included angle [0..180]");
|
||||
argList::validArgs.append("input surfaceFile");
|
||||
argList::validArgs.append("output surfaceFile");
|
||||
argList::validArgs.append("includedAngle [0..180]");
|
||||
argList args(argc, argv);
|
||||
|
||||
const fileName inFileName = args[1];
|
||||
const fileName outFileName = args[2];
|
||||
const scalar includedAngle = args.argRead<scalar>(3);
|
||||
|
||||
Info<< "Surface : " << inFileName << nl
|
||||
<< endl;
|
||||
Info<< "Surface : " << inFileName << nl << endl;
|
||||
|
||||
|
||||
// Read
|
||||
|
||||
@ -173,12 +173,17 @@ labelList countBins
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("surface file");
|
||||
|
||||
argList::addBoolOption("checkSelfIntersection");
|
||||
argList::addBoolOption("verbose");
|
||||
argList::validArgs.append("surfaceFile");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"checkSelfIntersection",
|
||||
"also check for self-intersection"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"verbose",
|
||||
"verbose operation"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"blockMesh",
|
||||
@ -224,8 +229,8 @@ int main(int argc, char *argv[])
|
||||
<<" hex (0 1 2 3 4 5 6 7) (10 10 10) simpleGrading (1 1 1)\n"
|
||||
<<");\n" << nl;
|
||||
|
||||
Info<<"edges();" << nl
|
||||
<<"patches();" << endl;
|
||||
Info<<"edges\n();" << nl
|
||||
<<"patches\n();" << endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -46,12 +46,11 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validArgs.clear();
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("surface file");
|
||||
argList::validArgs.append("surfaceFile");
|
||||
argList::validArgs.append("min length");
|
||||
argList::validArgs.append("output surface file");
|
||||
argList::argList args(argc, argv);
|
||||
argList::validArgs.append("output surfaceFile");
|
||||
argList args(argc, argv);
|
||||
|
||||
const fileName inFileName = args[1];
|
||||
const scalar minLen = args.argRead<scalar>(2);
|
||||
|
||||
@ -64,10 +64,9 @@ int mapVertex(::List<int>& collapse_map, int a, int mx)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("Foam surface file");
|
||||
argList::validArgs.append("reduction factor");
|
||||
argList::validArgs.append("Foam output file");
|
||||
argList::validArgs.append("surfaceFile");
|
||||
argList::validArgs.append("reductionFactor");
|
||||
argList::validArgs.append("output surfaceFile");
|
||||
argList args(argc, argv);
|
||||
|
||||
const fileName inFileName = args[1];
|
||||
|
||||
@ -58,14 +58,31 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"convert between surface formats"
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("inputFile");
|
||||
argList::validArgs.append("outputFile");
|
||||
|
||||
argList::addBoolOption("clean");
|
||||
argList::addBoolOption("group");
|
||||
argList::addOption("scale", "scale");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"clean",
|
||||
"perform some surface checking/cleanup on the input surface"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"group",
|
||||
"reorder faces into groups; one per region"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"scale",
|
||||
"factor",
|
||||
"geometry scaling factor - default is 1"
|
||||
);
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -96,8 +113,7 @@ int main(int argc, char *argv[])
|
||||
Info<< endl;
|
||||
}
|
||||
|
||||
bool sortByRegion = args.optionFound("group");
|
||||
|
||||
const bool sortByRegion = args.optionFound("group");
|
||||
if (sortByRegion)
|
||||
{
|
||||
Info<< "Reordering faces into groups; one per region." << endl;
|
||||
|
||||
@ -53,7 +53,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
"scale",
|
||||
"factor",
|
||||
"specify a scaling factor for the points"
|
||||
"geometry scaling factor - default is 1"
|
||||
);
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -93,19 +93,50 @@ void deleteBox
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"extract and write surface features to file"
|
||||
);
|
||||
argList::noParallel();
|
||||
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("surface");
|
||||
argList::validArgs.append("output set");
|
||||
|
||||
argList::addOption("includedAngle", "included angle [0..180]");
|
||||
argList::addOption("set", "input feature set");
|
||||
|
||||
argList::addOption("minLen", "cumulative length of feature");
|
||||
argList::addOption("minElem", "number of edges in feature");
|
||||
argList::addOption("subsetBox", "((x0 y0 z0)(x1 y1 z1))");
|
||||
argList::addOption("deleteBox", "((x0 y0 z0)(x1 y1 z1))");
|
||||
argList::addOption
|
||||
(
|
||||
"includedAngle",
|
||||
"degrees",
|
||||
"construct feature set from included angle [0..180]"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"set",
|
||||
"name",
|
||||
"use existing feature set from file"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"minLen",
|
||||
"scalar",
|
||||
"remove features shorter than the specified cumulative length"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"minElem",
|
||||
"int",
|
||||
"remove features with fewer than the specified number of edges"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"subsetBox",
|
||||
"((x0 y0 z0)(x1 y1 z1))",
|
||||
"remove edges outside specified bounding box"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"deleteBox",
|
||||
"((x0 y0 z0)(x1 y1 z1))",
|
||||
"remove edges within specified bounding box"
|
||||
);
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
@ -148,7 +179,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else if (args.optionFound("includedAngle"))
|
||||
{
|
||||
scalar includedAngle = args.optionRead<scalar>("includedAngle");
|
||||
const scalar includedAngle = args.optionRead<scalar>("includedAngle");
|
||||
|
||||
Info<< "Constructing feature set from included angle " << includedAngle
|
||||
<< endl;
|
||||
@ -180,8 +211,6 @@ int main(int argc, char *argv[])
|
||||
<< endl;
|
||||
|
||||
|
||||
|
||||
|
||||
// Trim set
|
||||
// ~~~~~~~~
|
||||
|
||||
@ -205,7 +234,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Subset
|
||||
// ~~~~~~
|
||||
|
||||
|
||||
@ -40,16 +40,14 @@ using namespace Foam;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("surfaceFile");
|
||||
argList::addOption("x", "X", "The point x-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::validArgs.append("surface file");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
point samplePt
|
||||
const point samplePt
|
||||
(
|
||||
args.optionLookupOrDefault<scalar>("x", 0),
|
||||
args.optionLookupOrDefault<scalar>("y", 0),
|
||||
|
||||
@ -289,8 +289,12 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("surface file");
|
||||
argList::addBoolOption("shellProperties");
|
||||
argList::validArgs.append("surfaceFile");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"shellProperties",
|
||||
"inertia of a thin shell"
|
||||
);
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
|
||||
@ -71,6 +71,11 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"convert between surface formats"
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("inputFile");
|
||||
argList::validArgs.append("outputFile");
|
||||
@ -83,14 +88,14 @@ int main(int argc, char *argv[])
|
||||
argList::addOption
|
||||
(
|
||||
"scaleIn",
|
||||
"scale",
|
||||
"specify input geometry scaling factor"
|
||||
"factor",
|
||||
"geometry scaling factor on input"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"scaleOut",
|
||||
"scale",
|
||||
"specify output geometry scaling factor"
|
||||
"factor",
|
||||
"geometry scaling factor on output"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
|
||||
@ -71,6 +71,13 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"convert between surface formats, "
|
||||
"but primarily for testing functionality\n"
|
||||
"Normally use surfaceMeshConvert instead."
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("inputFile");
|
||||
argList::validArgs.append("outputFile");
|
||||
@ -82,7 +89,12 @@ int main(int argc, char *argv[])
|
||||
argList::addBoolOption("unsorted");
|
||||
argList::addBoolOption("triFace");
|
||||
|
||||
argList::addOption("scale", "scale");
|
||||
argList::addOption
|
||||
(
|
||||
"scale",
|
||||
"factor",
|
||||
"geometry scaling factor - default is 1"
|
||||
);
|
||||
|
||||
# include "setRootCase.H"
|
||||
|
||||
|
||||
@ -48,10 +48,10 @@ Usage
|
||||
Specify an alternative dictionary for constant/coordinateSystems.
|
||||
|
||||
@param -from \<coordinateSystem\> \n
|
||||
Specify a coordinate System when reading files.
|
||||
Specify a coordinate system when reading files.
|
||||
|
||||
@param -to \<coordinateSystem\> \n
|
||||
Specify a coordinate System when writing files.
|
||||
Specify a coordinate system when writing files.
|
||||
|
||||
Note
|
||||
The filename extensions are used to determine the file format type.
|
||||
@ -72,17 +72,56 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"export from surfMesh to various third-party surface formats"
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("outputFile");
|
||||
|
||||
argList::addBoolOption("clean");
|
||||
|
||||
argList::addOption("name", "name");
|
||||
argList::addOption("scaleIn", "scale");
|
||||
argList::addOption("scaleOut", "scale");
|
||||
argList::addOption("dict", "coordinateSystemsDict");
|
||||
argList::addOption("from", "sourceCoordinateSystem");
|
||||
argList::addOption("to", "targetCoordinateSystem");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"clean",
|
||||
"perform some surface checking/cleanup on the input surface"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"name",
|
||||
"name",
|
||||
"specify an alternative surface name when reading - "
|
||||
"default is 'default'"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"scaleIn",
|
||||
"factor",
|
||||
"geometry scaling factor on input - default is 1"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"scaleOut",
|
||||
"factor",
|
||||
"geometry scaling factor on output - default is 1"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"dict",
|
||||
"file",
|
||||
"specify an alternative dictionary for constant/coordinateSystems"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"from",
|
||||
"coordinateSystem",
|
||||
"specify the source coordinate system, applied after '-scaleIn'"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"to",
|
||||
"coordinateSystem",
|
||||
"specify the target coordinate system, applied before '-scaleOut'"
|
||||
);
|
||||
|
||||
argList args(argc, argv);
|
||||
Time runTime(args.rootPath(), args.caseName());
|
||||
|
||||
@ -48,10 +48,10 @@ Usage
|
||||
Specify an alternative dictionary for constant/coordinateSystems.
|
||||
|
||||
@param -from \<coordinateSystem\> \n
|
||||
Specify a coordinate System when reading files.
|
||||
Specify a coordinate system when reading files.
|
||||
|
||||
@param -to \<coordinateSystem\> \n
|
||||
Specify a coordinate System when writing files.
|
||||
Specify a coordinate system when writing files.
|
||||
|
||||
Note
|
||||
The filename extensions are used to determine the file format type.
|
||||
@ -72,20 +72,59 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"import from various third-party surface formats into surfMesh"
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("inputFile");
|
||||
|
||||
argList::addBoolOption("clean");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"clean",
|
||||
"perform some surface checking/cleanup on the input surface"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"name",
|
||||
"name",
|
||||
"specify an alternative surface name when writing - "
|
||||
"default is 'default'"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"scaleIn",
|
||||
"factor",
|
||||
"geometry scaling factor on input - default is 1"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"scaleOut",
|
||||
"factor",
|
||||
"geometry scaling factor on output - default is 1"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"dict",
|
||||
"file",
|
||||
"specify an alternative dictionary for constant/coordinateSystems"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"from",
|
||||
"coordinateSystem",
|
||||
"specify a local coordinate system when reading files."
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"to",
|
||||
"coordinateSystem",
|
||||
"specify a local coordinate system when writing files."
|
||||
);
|
||||
|
||||
argList::addOption("name", "name");
|
||||
argList::addOption("scaleIn", "scale");
|
||||
argList::addOption("scaleOut", "scale");
|
||||
argList::addOption("dict", "coordinateSystemsDict");
|
||||
argList::addOption("from", "sourceCoordinateSystem");
|
||||
argList::addOption("to", "targetCoordinateSystem");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
|
||||
// try for the latestTime, but create "constant" as needed
|
||||
instantList Times = runTime.times();
|
||||
|
||||
@ -48,13 +48,26 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"extract surface from a polyMesh and triangulate boundary faces"
|
||||
);
|
||||
argList::validArgs.append("output file");
|
||||
# include "addRegionOption.H"
|
||||
argList::addBoolOption("excludeProcPatches");
|
||||
argList::addOption("patches", "(patch0 .. patchN)");
|
||||
#include "addRegionOption.H"
|
||||
argList::addBoolOption
|
||||
(
|
||||
"excludeProcPatches",
|
||||
"exclude processor patches"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"patches",
|
||||
"(patch0 .. patchN)",
|
||||
"only triangulate named patches"
|
||||
);
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
|
||||
const fileName outFileName(runTime.path()/args[1]);
|
||||
|
||||
@ -63,9 +76,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
Pout<< "Reading mesh from time " << runTime.value() << endl;
|
||||
|
||||
# include "createNamedPolyMesh.H"
|
||||
#include "createNamedPolyMesh.H"
|
||||
|
||||
bool includeProcPatches =
|
||||
const bool includeProcPatches =
|
||||
!(
|
||||
args.optionFound("excludeProcPatches")
|
||||
|| Pstream::parRun()
|
||||
@ -92,7 +105,7 @@ int main(int argc, char *argv[])
|
||||
forAll(patchNames, patchNameI)
|
||||
{
|
||||
const word& patchName = patchNames[patchNameI];
|
||||
label patchI = bMesh.findPatchID(patchName);
|
||||
const label patchI = bMesh.findPatchID(patchName);
|
||||
|
||||
if (patchI == -1)
|
||||
{
|
||||
|
||||
@ -39,12 +39,21 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"set face normals consistent with a user-provided 'outside' point"
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("Foam surface file");
|
||||
argList::validArgs.append("surfaceFile");
|
||||
argList::validArgs.append("visiblePoint");
|
||||
argList::validArgs.append("output file");
|
||||
argList::addBoolOption("inside");
|
||||
argList::validArgs.append("output surfaceFile");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"inside",
|
||||
"treat provided point as being inside"
|
||||
);
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
const fileName surfFileName = args[1];
|
||||
@ -53,18 +62,18 @@ int main(int argc, char *argv[])
|
||||
|
||||
const bool orientInside = args.optionFound("inside");
|
||||
|
||||
Info<< "Reading surface from " << surfFileName << endl;
|
||||
Info<< "Visible point " << visiblePoint << endl;
|
||||
Info<< "Reading surface from " << surfFileName << nl
|
||||
<< "Visible point " << visiblePoint << nl
|
||||
<< "Orienting surface such that visiblePoint " << visiblePoint
|
||||
<< " is ";
|
||||
|
||||
if (orientInside)
|
||||
{
|
||||
Info<< "Orienting surface such that visiblePoint " << visiblePoint
|
||||
<< " is inside" << endl;
|
||||
Info<< "inside" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "Orienting surface such that visiblePoint " << visiblePoint
|
||||
<< " is outside" << endl;
|
||||
Info<< "outside" << endl;
|
||||
}
|
||||
|
||||
Info<< "Writing surface to " << outFileName << endl;
|
||||
|
||||
@ -42,10 +42,9 @@ using namespace Foam;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("surface file");
|
||||
argList::validArgs.append("surfaceFile");
|
||||
argList::validArgs.append("merge distance");
|
||||
argList::validArgs.append("output file");
|
||||
argList::validArgs.append("output surfaceFile");
|
||||
argList args(argc, argv);
|
||||
|
||||
const fileName surfFileName = args[1];
|
||||
|
||||
@ -80,7 +80,7 @@ void writeProcStats
|
||||
{
|
||||
const List<treeBoundBox>& bbs = meshBb[procI];
|
||||
|
||||
Info<< "processor" << procI << endl
|
||||
Info<< "processor" << procI << nl
|
||||
<< "\tMesh bounds : " << bbs[0] << nl;
|
||||
for (label i = 1; i < bbs.size(); i++)
|
||||
{
|
||||
@ -99,19 +99,27 @@ void writeProcStats
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"redistribute a triSurface"
|
||||
);
|
||||
|
||||
argList::validArgs.append("triSurfaceMesh");
|
||||
argList::validArgs.append("distributionType");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"keepNonMapped",
|
||||
"preserve surface outside of mesh bounds"
|
||||
);
|
||||
|
||||
argList::addBoolOption("keepNonMapped");
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
|
||||
const fileName surfFileName = args[1];
|
||||
const word distType = args[2];
|
||||
|
||||
Info<< "Reading surface from " << surfFileName << nl
|
||||
<< nl
|
||||
Info<< "Reading surface from " << surfFileName << nl << nl
|
||||
<< "Using distribution method "
|
||||
<< distributedTriSurfaceMesh::distributionTypeNames_[distType]
|
||||
<< " " << distType << nl << endl;
|
||||
@ -138,7 +146,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
# include "createPolyMesh.H"
|
||||
#include "createPolyMesh.H"
|
||||
|
||||
Random rndGen(653213);
|
||||
|
||||
|
||||
@ -47,10 +47,9 @@ using namespace Foam;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("surface file");
|
||||
argList::validArgs.append("output surface file");
|
||||
argList::argList args(argc, argv);
|
||||
argList::validArgs.append("surfaceFile");
|
||||
argList::validArgs.append("output surfaceFile");
|
||||
argList args(argc, argv);
|
||||
|
||||
const fileName surfFileName = args[1];
|
||||
const fileName outFileName = args[2];
|
||||
|
||||
@ -42,11 +42,10 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validOptions.clear();
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("surface file");
|
||||
argList::validArgs.append("surfaceFile");
|
||||
argList::validArgs.append("underrelax factor (0..1)");
|
||||
argList::validArgs.append("iterations");
|
||||
argList::validArgs.append("output file");
|
||||
argList::validArgs.append("output surfaceFile");
|
||||
argList args(argc, argv);
|
||||
|
||||
const fileName surfFileName = args[1];
|
||||
|
||||
@ -36,10 +36,14 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"write surface mesh regions to separate files"
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("input file");
|
||||
argList::argList args(argc, argv);
|
||||
argList::validArgs.append("input surfaceFile");
|
||||
argList args(argc, argv);
|
||||
|
||||
const fileName surfName = args[1];
|
||||
|
||||
@ -104,7 +108,6 @@ int main(int argc, char *argv[])
|
||||
subSurf.write(outFile);
|
||||
}
|
||||
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
|
||||
@ -65,7 +65,7 @@ void writeOBJ(Ostream& os, const pointField& pts)
|
||||
{
|
||||
const point& pt = pts[i];
|
||||
|
||||
os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl;
|
||||
os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ void dumpPoints(const triSurface& surf, const labelList& borderPoint)
|
||||
{
|
||||
const point& pt = surf.localPoints()[pointI];
|
||||
|
||||
os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl;
|
||||
os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -108,7 +108,7 @@ void dumpEdges(const triSurface& surf, const boolList& borderEdge)
|
||||
{
|
||||
const edge& e = surf.edges()[edgeI];
|
||||
|
||||
os << "l " << e.start()+1 << ' ' << e.end()+1 << endl;
|
||||
os << "l " << e.start()+1 << ' ' << e.end()+1 << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -666,12 +666,18 @@ bool splitBorderEdges
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"split multiply connected surface edges by duplicating points"
|
||||
);
|
||||
argList::noParallel();
|
||||
argList::validArgs.clear();
|
||||
|
||||
argList::validArgs.append("surface file");
|
||||
argList::validArgs.append("output surface file");
|
||||
argList::addBoolOption("debug");
|
||||
argList::validArgs.append("surfaceFile");
|
||||
argList::validArgs.append("output surfaceFile");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"debug",
|
||||
"add debugging output"
|
||||
);
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -679,7 +685,6 @@ int main(int argc, char *argv[])
|
||||
const fileName outSurfName = args[2];
|
||||
const bool debug = args.optionFound("debug");
|
||||
|
||||
|
||||
Info<< "Reading surface from " << inSurfName << endl;
|
||||
|
||||
triSurface surf(inSurfName);
|
||||
|
||||
@ -47,10 +47,9 @@ using namespace Foam;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("surfaceSubsetDict");
|
||||
argList::validArgs.append("surface file");
|
||||
argList::validArgs.append("output file");
|
||||
argList::validArgs.append("surfaceFile");
|
||||
argList::validArgs.append("output surfaceFile");
|
||||
argList args(argc, argv);
|
||||
|
||||
Info<< "Reading dictionary " << args[1] << " ..." << endl;
|
||||
|
||||
@ -163,14 +163,29 @@ bool repatchFace
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("surface file");
|
||||
argList::addOption("faceSet", "faceSet name");
|
||||
argList::addOption("tol", "fraction of mesh size");
|
||||
argList::addNote
|
||||
(
|
||||
"reads surface and applies surface regioning to a mesh"
|
||||
);
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createPolyMesh.H"
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("surfaceFile");
|
||||
argList::addOption
|
||||
(
|
||||
"faceSet",
|
||||
"name",
|
||||
"only repatch the faces in specified faceSet"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"tol",
|
||||
"scalar",
|
||||
"search tolerance as fraction of mesh size (default 1e-3)"
|
||||
);
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createPolyMesh.H"
|
||||
|
||||
const fileName surfName = args[1];
|
||||
|
||||
@ -190,7 +205,7 @@ int main(int argc, char *argv[])
|
||||
<< " triangle ..." << endl;
|
||||
}
|
||||
|
||||
scalar searchTol = args.optionLookupOrDefault("tol", 1e-3);
|
||||
const scalar searchTol = args.optionLookupOrDefault("tol", 1e-3);
|
||||
|
||||
// Get search box. Anything not within this box will not be considered.
|
||||
const boundBox& meshBb = mesh.globalData().bb();
|
||||
@ -212,7 +227,6 @@ int main(int argc, char *argv[])
|
||||
Info<< endl;
|
||||
|
||||
|
||||
|
||||
boundaryMesh bMesh;
|
||||
|
||||
// Load in the surface.
|
||||
|
||||
@ -60,9 +60,8 @@ int main(int argc, char *argv[])
|
||||
"Like transformPoints but for surfaces."
|
||||
);
|
||||
argList::noParallel();
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("surface file");
|
||||
argList::validArgs.append("output surface file");
|
||||
argList::validArgs.append("surfaceFile");
|
||||
argList::validArgs.append("output surfaceFile");
|
||||
argList::addOption
|
||||
(
|
||||
"translate",
|
||||
|
||||
Reference in New Issue
Block a user