Skip to content
Snippets Groups Projects
Commit 71479961 authored by mattijs's avatar mattijs
Browse files

ENH: surfaceFeatureExtract: skip non-dictionary entries.

parent 25a73533
Branches
Tags
No related merge requests found
...@@ -952,8 +952,20 @@ int main(int argc, char *argv[]) ...@@ -952,8 +952,20 @@ int main(int argc, char *argv[])
forAllConstIter(dictionary, dict, iter) forAllConstIter(dictionary, dict, iter)
{ {
if (!iter().isDict())
{
continue;
}
const dictionary& surfaceDict = iter().dict(); const dictionary& surfaceDict = iter().dict();
if (surfaceDict.found("extractionMethod"))
{
continue;
}
const word extractionMethod = surfaceDict.lookup("extractionMethod");
const fileName surfFileName = iter().keyword(); const fileName surfFileName = iter().keyword();
const fileName sFeatFileName = surfFileName.lessExt().name(); const fileName sFeatFileName = surfFileName.lessExt().name();
...@@ -971,8 +983,6 @@ int main(int argc, char *argv[]) ...@@ -971,8 +983,6 @@ int main(int argc, char *argv[])
const Switch closeness = const Switch closeness =
surfaceDict.lookupOrDefault<Switch>("closeness", "off"); surfaceDict.lookupOrDefault<Switch>("closeness", "off");
const word extractionMethod = surfaceDict.lookup("extractionMethod");
Info<< nl << "Feature line extraction is only valid on closed manifold " Info<< nl << "Feature line extraction is only valid on closed manifold "
<< "surfaces." << endl; << "surfaces." << endl;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment