mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: surfaceCheck: handle .gz additional extension (e.g. motorBike.obj.gz)
This commit is contained in:
@ -569,6 +569,14 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Splitting surface into parts ..." << endl << endl;
|
Info<< "Splitting surface into parts ..." << endl << endl;
|
||||||
|
|
||||||
fileName surfFileNameBase(surfFileName.name());
|
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++)
|
for (label zone = 0; zone < numZones; zone++)
|
||||||
{
|
{
|
||||||
@ -595,13 +603,7 @@ int main(int argc, char *argv[])
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
fileName subFileName
|
fileName subFileName(surfFileNameBase + "_" + name(zone) + ".obj");
|
||||||
(
|
|
||||||
surfFileNameBase.lessExt()
|
|
||||||
+ "_"
|
|
||||||
+ name(zone)
|
|
||||||
+ ".obj"
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "writing part " << zone << " size " << subSurf.size()
|
Info<< "writing part " << zone << " size " << subSurf.size()
|
||||||
<< " to " << subFileName << endl;
|
<< " to " << subFileName << endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user