+Driver_Mesh::Status DriverGMF_Write::PerformSizeMap( const std::vector<Control_Pnt>& points )
+{
+// const int dim = 3, version = sizeof(long) == 4 ? 2 : 3;
+ const int dim = 3, version = 2; // Version 3 not supported by mg-hexa
+
+ // Open files
+ int verticesFileID = GmfOpenMesh( myVerticesFile.c_str(), GmfWrite, version, dim );
+ int solFileID = GmfOpenMesh( mySolFile.c_str(), GmfWrite, version, dim );
+
+ int pointsNumber = points.size();
+
+ // Vertices Keyword
+ GmfSetKwd( verticesFileID, GmfVertices, pointsNumber );
+ // SolAtVertices Keyword
+ int TypTab[] = {GmfSca};
+ GmfSetKwd(solFileID, GmfSolAtVertices, pointsNumber, 1, TypTab);
+
+ // Read the control points information from the vector and write it into the files
+ std::vector<Control_Pnt>::const_iterator points_it;
+ for (points_it = points.begin(); points_it != points.end(); points_it++ )
+ {
+ GmfSetLin( verticesFileID, GmfVertices, points_it->X(), points_it->Y(), points_it->Z(), 0 );
+ double ValTab[] = {points_it->Size()};
+ GmfSetLin( solFileID, GmfSolAtVertices, ValTab);
+ }
+
+ // Close Files
+ GmfCloseMesh( verticesFileID );
+ GmfCloseMesh( solFileID );
+}
+
+std::vector<std::string> DriverGMF_Write::GetSizeMapFiles()
+{
+ std::vector<std::string> files;
+ files.push_back(myVerticesFile);
+ files.push_back(mySolFile);
+ return files;
+}
+