]> SALOME platform Git repositories - plugins/ghs3dplugin.git/commitdiff
Salome HOME
Update
authorgdd <gdd>
Mon, 2 May 2011 15:29:09 +0000 (15:29 +0000)
committergdd <gdd>
Mon, 2 May 2011 15:29:09 +0000 (15:29 +0000)
src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx

index 75c99846e2e41efb1e2ba87f6ade7340730f9f16..2060421c2d2a9af9a92137e7ece1689b37b2c62c 100644 (file)
@@ -2671,48 +2671,48 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh&         theMesh,
   TCollection_AsciiString aResultFileName;
   TCollection_AsciiString aLogFileName    = aGenericName + ".log";    // log
 // #if GHS3D_VERSION < 42
-  TCollection_AsciiString aFacesFileName, aPointsFileName;
-  TCollection_AsciiString aBadResFileName, aBbResFileName;
-  aFacesFileName  = aGenericName + ".faces";  // in faces
-  aPointsFileName = aGenericName + ".points"; // in points
-  aResultFileName = aGenericName + ".noboite";// out points and volumes
-  aBadResFileName = aGenericName + ".boite";  // out bad result
-  aBbResFileName  = aGenericName + ".bb";     // out vertex stepsize
-
-  // -----------------
-  // make input files
-  // -----------------
-
-  ofstream aFacesFile  ( aFacesFileName.ToCString()  , ios::out);
-  ofstream aPointsFile ( aPointsFileName.ToCString() , ios::out);
-
-  Ok =
-    aFacesFile.rdbuf()->is_open() && aPointsFile.rdbuf()->is_open();
-  if (!Ok) {
-    INFOS( "Can't write into " << aFacesFileName);
-    return error(SMESH_Comment("Can't write into ") << aFacesFileName);
-  }
-// #else
-//   TCollection_AsciiString aGMFFileName, aRequiredVerticesFileName, aSolFileName;
-//   TCollection_AsciiString aResultGMFFileName;
-
-// #ifdef _DEBUG_
-//   aGMFFileName    = aGenericName + ".mesh"; // GMF mesh file
-//   // The output .mesh file does not contain yet the subdomain-info (Ghs3D 4.2)
-//   aResultGMFFileName = aGenericName + "Vol.mesh"; // GMF mesh file
+//   TCollection_AsciiString aFacesFileName, aPointsFileName;
+//   TCollection_AsciiString aBadResFileName, aBbResFileName;
+//   aFacesFileName  = aGenericName + ".faces";  // in faces
+//   aPointsFileName = aGenericName + ".points"; // in points
 //   aResultFileName = aGenericName + ".noboite";// out points and volumes
-// //   aResultFileName = aGenericName + "Vol.mesh"; // GMF mesh file
-//   aRequiredVerticesFileName    = aGenericName + "_required.mesh"; // GMF required vertices mesh file
-//   aSolFileName    = aGenericName + "_required.sol"; // GMF solution file
+//   aBadResFileName = aGenericName + ".boite";  // out bad result
+//   aBbResFileName  = aGenericName + ".bb";     // out vertex stepsize
+// 
+//   // -----------------
+//   // make input files
+//   // -----------------
+// 
+//   ofstream aFacesFile  ( aFacesFileName.ToCString()  , ios::out);
+//   ofstream aPointsFile ( aPointsFileName.ToCString() , ios::out);
+// 
+//   Ok =
+//     aFacesFile.rdbuf()->is_open() && aPointsFile.rdbuf()->is_open();
+//   if (!Ok) {
+//     INFOS( "Can't write into " << aFacesFileName);
+//     return error(SMESH_Comment("Can't write into ") << aFacesFileName);
+//   }
 // #else
-//   aGMFFileName    = aGenericName + ".meshb"; // GMF mesh file
-//   // The output .mesh file does not contain yet the subdomain-info (Ghs3D 4.2)
-//   aResultGMFFileName = aGenericName + "Vol.meshb"; // GMF mesh file
-//   aResultFileName = aGenericName + ".noboite";// out points and volumes
-// //   aResultFileName = aGenericName + "Vol.meshb"; // GMF mesh file
-//   aRequiredVerticesFileName    = aGenericName + "_required.meshb"; // GMF required vertices mesh file
-//   aSolFileName    = aGenericName + "_required.solb"; // GMF solution file
-// #endif
+  TCollection_AsciiString aGMFFileName, aRequiredVerticesFileName, aSolFileName;
+  TCollection_AsciiString aResultGMFFileName;
+
+#ifdef _DEBUG_
+  aGMFFileName    = aGenericName + ".mesh"; // GMF mesh file
+  // The output .mesh file does not contain yet the subdomain-info (Ghs3D 4.2)
+  aResultGMFFileName = aGenericName + "Vol.mesh"; // GMF mesh file
+  aResultFileName = aGenericName + ".noboite";// out points and volumes
+//   aResultFileName = aGenericName + "Vol.mesh"; // GMF mesh file
+  aRequiredVerticesFileName    = aGenericName + "_required.mesh"; // GMF required vertices mesh file
+  aSolFileName    = aGenericName + "_required.sol"; // GMF solution file
+#else
+  aGMFFileName    = aGenericName + ".meshb"; // GMF mesh file
+  // The output .mesh file does not contain yet the subdomain-info (Ghs3D 4.2)
+  aResultGMFFileName = aGenericName + "Vol.meshb"; // GMF mesh file
+  aResultFileName = aGenericName + ".noboite";// out points and volumes
+//   aResultFileName = aGenericName + "Vol.meshb"; // GMF mesh file
+  aRequiredVerticesFileName    = aGenericName + "_required.meshb"; // GMF required vertices mesh file
+  aSolFileName    = aGenericName + "_required.solb"; // GMF solution file
+#endif
   map <int,int> aSmdsToGhs3dIdMap, anEnforcedNodeIdToGhs3dIdMap;
   map <int,const SMDS_MeshNode*> aGhs3dIdToNodeMap;
   std::map <int, int> nodeID2nodeIndexMap;
@@ -2759,20 +2759,20 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh&         theMesh,
         return false;
     }
 // #if GHS3D_VERSION < 42
-    Ok = (writePoints( aPointsFile, helper, 
-                       aSmdsToGhs3dIdMap, anEnforcedNodeIdToGhs3dIdMap, aGhs3dIdToNodeMap, 
-                       nodeIDToSizeMap,
-                       enforcedVertices, enforcedNodes)
-          &&
-          writeFaces ( aFacesFile, *proxyMesh, theShape, 
-                       aSmdsToGhs3dIdMap, anEnforcedNodeIdToGhs3dIdMap,
-                       enforcedEdges, enforcedTriangles, enforcedQuadrangles));
+//     Ok = (writePoints( aPointsFile, helper, 
+//                        aSmdsToGhs3dIdMap, anEnforcedNodeIdToGhs3dIdMap, aGhs3dIdToNodeMap, 
+//                        nodeIDToSizeMap,
+//                        enforcedVertices, enforcedNodes)
+//           &&
+//           writeFaces ( aFacesFile, *proxyMesh, theShape, 
+//                        aSmdsToGhs3dIdMap, anEnforcedNodeIdToGhs3dIdMap,
+//                        enforcedEdges, enforcedTriangles, enforcedQuadrangles));
 // #else
-//     Ok = writeGMFFile(aGMFFileName.ToCString(), aRequiredVerticesFileName.ToCString(), aSolFileName.ToCString(),
-//                       helper, *proxyMesh,
-//                       aSmdsToGhs3dIdMap, aGhs3dIdToNodeMap,
-//                       enforcedNodes, enforcedEdges, enforcedTriangles, enforcedQuadrangles,
-//                       enforcedVertices);
+    Ok = writeGMFFile(aGMFFileName.ToCString(), aRequiredVerticesFileName.ToCString(), aSolFileName.ToCString(),
+                      helper, *proxyMesh,
+                      aSmdsToGhs3dIdMap, aGhs3dIdToNodeMap,
+                      enforcedNodes, enforcedEdges, enforcedTriangles, enforcedQuadrangles,
+                      enforcedVertices);
 // #endif
   }