ENH: improved handling of 'unresolved' surface intersections (issue #450)

- the heuristic for matching unresolved intersections is a relatively
  simple matching scheme that seems to be more robust than attempting to walk
  the geometry or the cuts.

- avoid false positives for self intersection
This commit is contained in:
Mark Olesen
2017-05-08 14:57:47 +02:00
parent da8ea0f21a
commit 0e7630feca
12 changed files with 384 additions and 297 deletions

View File

@ -84,6 +84,8 @@ int main(int argc, char *argv[])
forAllConstIter(dictionary, dict, iter)
{
const word& dictName = iter().keyword();
if (!iter().isDict())
{
continue;
@ -106,7 +108,7 @@ int main(int argc, char *argv[])
const word outputName =
fileName
(
surfaceDict.lookupOrDefault<word>("output", iter().keyword())
surfaceDict.lookupOrDefault<word>("output", dictName)
).lessExt();
// The "surfaces" entry is normally optional, but if the sub-dictionary
@ -115,7 +117,7 @@ int main(int argc, char *argv[])
// additional switch.
if
(
iter().keyword() == "surfaces" // mandatory
dictName == "surfaces" // mandatory
|| surfaceDict.found("surfaces") // or optional
)
{
@ -123,14 +125,14 @@ int main(int argc, char *argv[])
}
else
{
loader.select(iter().keyword());
loader.select(dictName);
}
if (loader.selected().empty())
{
FatalErrorInFunction
<< "No surfaces specified/found for entry: "
<< iter().keyword() << exit(FatalError);
<< dictName << exit(FatalError);
}
// DebugVar(loader.available());
// DebugVar(outputName);
@ -153,7 +155,7 @@ int main(int argc, char *argv[])
{
FatalErrorInFunction
<< "Problem loading surface(s) for entry: "
<< iter().keyword() << exit(FatalError);
<< dictName << exit(FatalError);
}
triSurface surf = surfPtr();