From: gdd Date: Mon, 2 May 2011 15:29:09 +0000 (+0000) Subject: Update X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=009256126dcc0a6983b29e271a9ffcf4a927e22c;p=plugins%2Fghs3dplugin.git Update --- diff --git a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx index 75c9984..2060421 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx @@ -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 aSmdsToGhs3dIdMap, anEnforcedNodeIdToGhs3dIdMap; map aGhs3dIdToNodeMap; std::map 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 }