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

BUG: surfaceCheck: handle .gz additional extension (e.g. motorBike.obj.gz)

parent b3a9fe05
No related branches found
No related tags found
No related merge requests found
......@@ -569,6 +569,14 @@ int main(int argc, char *argv[])
Info<< "Splitting surface into parts ..." << endl << endl;
fileName surfFileNameBase(surfFileName.name());
const word fileType = surfFileNameBase.ext();
// Strip extension
surfFileNameBase = surfFileNameBase.lessExt();
// If extension was .gz strip original extension
if (fileType == "gz")
{
surfFileNameBase = surfFileNameBase.lessExt();
}
for (label zone = 0; zone < numZones; zone++)
{
......@@ -595,13 +603,7 @@ int main(int argc, char *argv[])
)
);
fileName subFileName
(
surfFileNameBase.lessExt()
+ "_"
+ name(zone)
+ ".obj"
);
fileName subFileName(surfFileNameBase + "_" + name(zone) + ".obj");
Info<< "writing part " << zone << " size " << subSurf.size()
<< " to " << subFileName << endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment