IMP: DriverGMF/SizeMaps: Added a method to get the name of the size map files (with their extensions).

This commit is contained in:
rnc 2013-08-22 09:46:21 +00:00
parent fe85768588
commit 3d3ea93b44
2 changed files with 15 additions and 6 deletions

View File

@ -369,12 +369,10 @@ Driver_Mesh::Status DriverGMF_Write::PerformSizeMap( const std::vector<Control_P
{
// const int dim = 3, version = sizeof(long) == 4 ? 2 : 3;
const int dim = 3, version = 2; // Version 3 not supported by mg-hexa
std::string aVerticesFile = mySizeMapPrefix + ".mesh";
std::string aSolFile = mySizeMapPrefix + ".sol";
// Open files
int verticesFileID = GmfOpenMesh( aVerticesFile.c_str(), GmfWrite, version, dim );
int solFileID = GmfOpenMesh( aSolFile.c_str(), GmfWrite, version, dim );
int verticesFileID = GmfOpenMesh( myVerticesFile.c_str(), GmfWrite, version, dim );
int solFileID = GmfOpenMesh( mySolFile.c_str(), GmfWrite, version, dim );
int pointsNumber = points.size();
@ -398,6 +396,14 @@ Driver_Mesh::Status DriverGMF_Write::PerformSizeMap( const std::vector<Control_P
GmfCloseMesh( solFileID );
}
std::vector<std::string> DriverGMF_Write::GetSizeMapFiles()
{
std::vector<std::string> files;
files.push_back(myVerticesFile);
files.push_back(mySolFile);
return files;
}
//================================================================================
/*!
* \brief Returns an iterator on elements of a certain type

View File

@ -74,8 +74,10 @@ public:
Status PerformSizeMap( const std::vector<Control_Pnt>& points );
void SetSizeMapPrefix( std::string prefix )
{
mySizeMapPrefix = prefix;
myVerticesFile = prefix + ".mesh";
mySolFile = prefix + ".sol";
};
std::vector<std::string> GetSizeMapFiles();
private:
@ -84,7 +86,8 @@ public:
SMDS_ElemIteratorPtr elementIterator(SMDSAbs_GeometryType type);
bool _exportRequiredGroups;
std::string mySizeMapPrefix;
std::string myVerticesFile;
std::string mySolFile;
};
#endif