X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_DumpPython.cxx;h=0656e1d71c8297f20b8ccd5ff31f738722d32240;hb=0e9eae4ed4e7d8f7bd40a0e49bc9a43c84eace67;hp=e22a87c775c723d496a38bcfa515e8a9ebc08668;hpb=75d0234b452659c44159aaf33ed833af89a0ff4c;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_DumpPython.cxx b/src/SMESH_I/SMESH_DumpPython.cxx index e22a87c77..0656e1d71 100644 --- a/src/SMESH_I/SMESH_DumpPython.cxx +++ b/src/SMESH_I/SMESH_DumpPython.cxx @@ -234,6 +234,7 @@ namespace SMESH case Entity_TriQuad_Hexa: myStream<<"Entity_TriQuad_Hexa"; break; case Entity_Penta: myStream<<"Entity_Penta"; break; case Entity_Quad_Penta: myStream<<"Entity_Quad_Penta"; break; + case Entity_BiQuad_Penta: myStream<<"Entity_BiQuad_Penta"; break; case Entity_Hexagonal_Prism: myStream<<"Entity_Hexagonal_Prism"; break; case Entity_Polyhedra: myStream<<"Entity_Polyhedra"; break; case Entity_Quad_Polyhedra: myStream<<"Entity_Quad_Polyhedra"; break; @@ -430,6 +431,7 @@ namespace SMESH case FT_MultiConnection2D: myStream<< "aMultiConnection2D"; break; case FT_Length: myStream<< "aLength"; break; case FT_Length2D: myStream<< "aLength2D"; break; + case FT_Deflection2D: myStream<< "aDeflection2D"; break; case FT_NodeConnectivityNumber:myStream<< "aNodeConnectivityNumber";break; case FT_BelongToMeshGroup: myStream<< "aBelongToMeshGroup"; break; case FT_BelongToGeom: myStream<< "aBelongToGeom"; break; @@ -494,6 +496,17 @@ namespace SMESH switch (theVersion) { case SMESH::MED_V2_1: myStream << "SMESH.MED_V2_1"; break; case SMESH::MED_V2_2: myStream << "SMESH.MED_V2_2"; break; + case SMESH::MED_LATEST: myStream << "SMESH.MED_LATEST"; break; + case SMESH::MED_MINOR_0: myStream << "SMESH.MED_MINOR_0"; break; + case SMESH::MED_MINOR_1: myStream << "SMESH.MED_MINOR_1"; break; + case SMESH::MED_MINOR_2: myStream << "SMESH.MED_MINOR_2"; break; + case SMESH::MED_MINOR_3: myStream << "SMESH.MED_MINOR_3"; break; + case SMESH::MED_MINOR_4: myStream << "SMESH.MED_MINOR_4"; break; + case SMESH::MED_MINOR_5: myStream << "SMESH.MED_MINOR_5"; break; + case SMESH::MED_MINOR_6: myStream << "SMESH.MED_MINOR_6"; break; + case SMESH::MED_MINOR_7: myStream << "SMESH.MED_MINOR_7"; break; + case SMESH::MED_MINOR_8: myStream << "SMESH.MED_MINOR_8"; break; + case SMESH::MED_MINOR_9: myStream << "SMESH.MED_MINOR_9"; break; default: myStream << theVersion; } return *this; @@ -555,6 +568,16 @@ namespace SMESH DumpArray( theList, *this ); return *this; } + TPythonDump& TPythonDump::operator<<(const SMESH::submesh_array& theList) + { + DumpArray( theList, *this ); + return *this; + } + TPythonDump& TPythonDump::operator<<(const SMESH::ListOfHypothesis& theList) + { + DumpArray( theList, *this ); + return *this; + } TPythonDump& TPythonDump::operator<<(const SMESH::CoincidentFreeBorders& theCFB) { // dump CoincidentFreeBorders as a list of lists, each enclosed list @@ -1035,7 +1058,7 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl lines.push_back( theSavedTrace.SubString( from, to - 1 )); from = to + 1; } - // For the convertion of IDL API calls -> smeshBuilder.py API, "smesh" standing for SMESH_Gen + // For the conversion of IDL API calls -> smeshBuilder.py API, "smesh" standing for SMESH_Gen // was replaces with "smeshgen" (==TPythonDump::SMESHGenName()). // Change "smesh" -> "smeshgen" in the trace saved before passage to smeshBuilder.py API bool isNewVersion = @@ -1195,26 +1218,28 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl } // import python files corresponding to plugins if they are used in anUpdatedScript { - TCollection_AsciiString importStr; + //TCollection_AsciiString importStr; std::vector pluginNames = getPluginNames(); for ( size_t i = 0; i < pluginNames.size(); ++i ) { // Convert access to plugin members: - // e.g. StdMeshers.QUAD_REDUCED -> StdMeshersBuilder.QUAD_REDUCED + // e.g. StdMeshers.QUAD_REDUCED -> smeshBuilder.QUAD_REDUCED TCollection_AsciiString pluginAccess = (pluginNames[i] + ".").c_str() ; int iFrom = 1, iPos; while (( iPos = anUpdatedScript.Location( pluginAccess, iFrom, anUpdatedScript.Length() ))) { - anUpdatedScript.Insert( iPos + pluginNames[i].size(), "Builder" ); - iFrom = iPos + pluginNames[i].size() + 8; + //anUpdatedScript.Insert( iPos + pluginNames[i].size(), "Builder" ); + anUpdatedScript.Remove( iPos, pluginNames[i].size() ); + anUpdatedScript.Insert( iPos, "smeshBuilder" ); + iFrom = iPos - pluginNames[i].size() + 12; } // if any plugin member is used, import the plugin - if ( iFrom > 1 ) - importStr += ( helper + "\n" "from salome." + pluginNames[i].c_str() + - " import " + pluginNames[i].c_str() +"Builder" ); + // if ( iFrom > 1 ) + // importStr += ( helper + "\n" "from salome." + pluginNames[i].c_str() + + // " import " + pluginNames[i].c_str() +"Builder" ); } - if ( !importStr.IsEmpty() ) - initPart += importStr + "\n"; + // if ( !importStr.IsEmpty() ) + // initPart += importStr + "\n"; } if ( isMultiFile ) @@ -1320,7 +1345,7 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl { // find the function name int functBeg = posAlready; - char* script = (char*) anUpdatedScript.ToCString() + posAlready - 1; // look at ":" after "def fuction()" + char* script = (char*) anUpdatedScript.ToCString() + posAlready - 1; // look at ":" after "def function()" while ( *script != ' ' ) { script--; functBeg--;