From: Anthony Geay Date: Mon, 1 Feb 2021 16:04:40 +0000 (+0100) Subject: Rollback useless modification at 87c2149a588c04 and a489fbfb40ca2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fagy%2Farchi2_1_unsure;p=modules%2Fsmesh.git Rollback useless modification at 87c2149a588c04 and a489fbfb40ca2 --- diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index 35aa797af..8befed7a4 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -793,7 +793,7 @@ SMESH_MeshEditor_i::RemoveElements(const SMESH::long_array & IDsOfElements) IdList.push_back( IDsOfElements[i] ); // Update Python script - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".RemoveElements( " << IDsOfElements << " )"; + TPythonDump() << "isDone = " << this << ".RemoveElements( " << IDsOfElements << " )"; // Remove Elements bool ret = getEditor().Remove( IdList, false ); @@ -821,7 +821,7 @@ CORBA::Boolean SMESH_MeshEditor_i::RemoveNodes(const SMESH::long_array & IDsOfNo IdList.push_back( IDsOfNodes[i] ); // Update Python script - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".RemoveNodes( " << IDsOfNodes << " )"; + TPythonDump() << "isDone = " << this << ".RemoveNodes( " << IDsOfNodes << " )"; bool ret = getEditor().Remove( IdList, true ); @@ -844,7 +844,7 @@ CORBA::Long SMESH_MeshEditor_i::RemoveOrphanNodes() initData(); // Update Python script - TPythonDump(myMesh_i->GetGen()) << "nbRemoved = " << this << ".RemoveOrphanNodes()"; + TPythonDump() << "nbRemoved = " << this << ".RemoveOrphanNodes()"; // Create filter to find all orphan nodes SMESH::Controls::Filter::TIdSequence seq; @@ -879,7 +879,7 @@ CORBA::Long SMESH_MeshEditor_i::AddNode(CORBA::Double x,CORBA::Double y, CORBA:: const SMDS_MeshNode* N = getMeshDS()->AddNode(x, y, z); // Update Python script - TPythonDump(myMesh_i->GetGen()) << "nodeID = " << this << ".AddNode( " + TPythonDump() << "nodeID = " << this << ".AddNode( " << TVar( x ) << ", " << TVar( y ) << ", " << TVar( z )<< " )"; declareMeshModified( /*isReComputeSafe=*/false ); @@ -909,7 +909,7 @@ CORBA::Long SMESH_MeshEditor_i::Add0DElement(CORBA::Long IDOfNode, elem = getMeshDS()->Add0DElement(aNode); // Update Python script - TPythonDump(myMesh_i->GetGen()) << "elem0d = " << this << ".Add0DElement( " << IDOfNode <<" )"; + TPythonDump() << "elem0d = " << this << ".Add0DElement( " << IDOfNode <<" )"; declareMeshModified( /*isReComputeSafe=*/false ); @@ -937,7 +937,7 @@ CORBA::Long SMESH_MeshEditor_i::AddBall(CORBA::Long IDOfNode, CORBA::Double diam SMDS_MeshElement* elem = getMeshDS()->AddBall(aNode, diameter); // Update Python script - TPythonDump(myMesh_i->GetGen()) << "ballElem = " + TPythonDump() << "ballElem = " << this << ".AddBall( " << IDOfNode << ", " << diameter <<" )"; declareMeshModified( /*isReComputeSafe=*/false ); @@ -969,7 +969,7 @@ CORBA::Long SMESH_MeshEditor_i::AddEdge(const SMESH::long_array & IDsOfNodes) getMeshDS()->FindNode(index2)); // Update Python script - TPythonDump(myMesh_i->GetGen()) << "edge = " << this << ".AddEdge([ " + TPythonDump() << "edge = " << this << ".AddEdge([ " << index1 << ", " << index2 <<" ])"; } if (NbNodes == 3) { @@ -980,7 +980,7 @@ CORBA::Long SMESH_MeshEditor_i::AddEdge(const SMESH::long_array & IDsOfNodes) getMeshDS()->FindNode(n2), getMeshDS()->FindNode(n12)); // Update Python script - TPythonDump(myMesh_i->GetGen()) << "edgeID = " << this << ".AddEdge([ " + TPythonDump() << "edgeID = " << this << ".AddEdge([ " <GetGen()) << "faceID = " << this << ".AddFace( " << IDsOfNodes << " )"; + TPythonDump() << "faceID = " << this << ".AddFace( " << IDsOfNodes << " )"; declareMeshModified( /*isReComputeSafe=*/false ); @@ -1065,7 +1065,7 @@ CORBA::Long SMESH_MeshEditor_i::AddPolygonalFace (const SMESH::long_array & IDsO const SMDS_MeshElement* elem = getMeshDS()->AddPolygonalFace(nodes); // Update Python script - TPythonDump(myMesh_i->GetGen()) <<"faceID = "<GetID() : 0; @@ -1099,7 +1099,7 @@ CORBA::Long SMESH_MeshEditor_i::AddQuadPolygonalFace (const SMESH::long_array & const SMDS_MeshElement* elem = getMeshDS()->AddQuadPolygonalFace(nodes); // Update Python script - TPythonDump(myMesh_i->GetGen()) <<"faceID = "<GetID() : 0; @@ -1160,7 +1160,7 @@ CORBA::Long SMESH_MeshEditor_i::AddVolume(const SMESH::long_array & IDsOfNodes) } // Update Python script - TPythonDump(myMesh_i->GetGen()) << "volID = " << this << ".AddVolume( " << IDsOfNodes << " )"; + TPythonDump() << "volID = " << this << ".AddVolume( " << IDsOfNodes << " )"; declareMeshModified( /*isReComputeSafe=*/false ); return elem ? elem->GetID() : 0; @@ -1197,7 +1197,7 @@ CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolume (const SMESH::long_array & I const SMDS_MeshElement* elem = getMeshDS()->AddPolyhedralVolume(n, q); // Update Python script - TPythonDump(myMesh_i->GetGen()) << "volID = " << this << ".AddPolyhedralVolume( " + TPythonDump() << "volID = " << this << ".AddPolyhedralVolume( " << IDsOfNodes << ", " << Quantities << " )"; declareMeshModified( /*isReComputeSafe=*/false ); @@ -1235,7 +1235,7 @@ CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolumeByFaces (const SMESH::long_ar const SMDS_MeshElement* elem = getMeshDS()->AddPolyhedralVolume(poly_nodes, quantities); // Update Python script - TPythonDump(myMesh_i->GetGen()) << "volID = " << this << ".AddPolyhedralVolumeByFaces( " + TPythonDump() << "volID = " << this << ".AddPolyhedralVolumeByFaces( " << IdsOfFaces << " )"; declareMeshModified( /*isReComputeSafe=*/false ); @@ -1266,7 +1266,7 @@ SMESH_MeshEditor_i::Create0DElementsOnAllNodes(SMESH::SMESH_IDSource_ptr theObje initData(); SMESH::SMESH_IDSource_var result; - TPythonDump pyDump(myMesh_i->GetGen()); + TPythonDump pyDump; TIDSortedElemSet elements, elems0D; if ( idSourceToSet( theObject, getMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1)) @@ -1523,7 +1523,7 @@ CORBA::Boolean SMESH_MeshEditor_i::InverseDiag(CORBA::Long NodeID1, return false; // Update Python script - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".InverseDiag( " + TPythonDump() << "isDone = " << this << ".InverseDiag( " << NodeID1 << ", " << NodeID2 << " )"; int ret = getEditor().InverseDiag ( n1, n2 ); @@ -1553,7 +1553,7 @@ CORBA::Boolean SMESH_MeshEditor_i::DeleteDiag(CORBA::Long NodeID1, return false; // Update Python script - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DeleteDiag( " + TPythonDump() << "isDone = " << this << ".DeleteDiag( " << NodeID1 << ", " << NodeID2 << " )"; @@ -1586,7 +1586,7 @@ CORBA::Boolean SMESH_MeshEditor_i::Reorient(const SMESH::long_array & IDsOfEleme getEditor().Reorient( elem ); } // Update Python script - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".Reorient( " << IDsOfElements << " )"; + TPythonDump() << "isDone = " << this << ".Reorient( " << IDsOfElements << " )"; declareMeshModified( /*isReComputeSafe=*/ IDsOfElements.length() == 0 ); return true; @@ -1606,7 +1606,7 @@ CORBA::Boolean SMESH_MeshEditor_i::ReorientObject(SMESH::SMESH_IDSource_ptr theO SMESH_TRY; initData(); - TPythonDump aTPythonDump(myMesh_i->GetGen()); // suppress dump in Reorient() + TPythonDump aTPythonDump; // suppress dump in Reorient() prepareIdSource( theObject ); @@ -1701,7 +1701,7 @@ CORBA::Long SMESH_MeshEditor_i::Reorient2D(SMESH::SMESH_IDSource_ptr the2Dgroup, if ( nbReori ) { declareMeshModified( /*isReComputeSafe=*/false ); } - TPythonDump(myMesh_i->GetGen()) << this << ".Reorient2D( " + TPythonDump() << this << ".Reorient2D( " << the2Dgroup << ", " << theDirection << ", " << theFace << ", " @@ -1751,7 +1751,7 @@ CORBA::Long SMESH_MeshEditor_i::Reorient2DBy3D(const SMESH::ListOfIDSources& fac if ( nbReori ) { declareMeshModified( /*isReComputeSafe=*/false ); } - TPythonDump(myMesh_i->GetGen()) << this << ".Reorient2DBy3D( " + TPythonDump() << this << ".Reorient2DBy3D( " << faceGroups << ", " << volumeGroup << ", " << outsideNormal << " )"; @@ -1797,7 +1797,7 @@ CORBA::Boolean SMESH_MeshEditor_i::TriToQuad (const SMESH::long_array & IDsOfE if ( !myIsPreviewMode ) { // Update Python script - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".TriToQuad( " + TPythonDump() << "isDone = " << this << ".TriToQuad( " << IDsOfElements << ", " << aNumericalFunctor << ", " << TVar( MaxAngle ) << " )"; } @@ -1823,7 +1823,7 @@ CORBA::Boolean SMESH_MeshEditor_i::TriToQuadObject (SMESH::SMESH_IDSource_ptr SMESH_TRY; initData(); - TPythonDump aTPythonDump(myMesh_i->GetGen()); // suppress dump in TriToQuad() + TPythonDump aTPythonDump; // suppress dump in TriToQuad() prepareIdSource( theObject ); SMESH::long_array_var anElementsId = theObject->GetIDs(); @@ -1870,7 +1870,7 @@ CORBA::Boolean SMESH_MeshEditor_i::QuadToTri (const SMESH::long_array & IDsOfE // Update Python script - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".QuadToTri( " << IDsOfElements << ", " << aNumericalFunctor << " )"; + TPythonDump() << "isDone = " << this << ".QuadToTri( " << IDsOfElements << ", " << aNumericalFunctor << " )"; CORBA::Boolean stat = getEditor().QuadToTri( faces, aCrit ); @@ -1893,7 +1893,7 @@ CORBA::Boolean SMESH_MeshEditor_i::QuadToTriObject (SMESH::SMESH_IDSource_ptr SMESH_TRY; initData(); - TPythonDump aTPythonDump(myMesh_i->GetGen()); // suppress dump in QuadToTri() + TPythonDump aTPythonDump; // suppress dump in QuadToTri() prepareIdSource( theObject ); SMESH::long_array_var anElementsId = theObject->GetIDs(); @@ -1930,7 +1930,7 @@ void SMESH_MeshEditor_i::QuadTo4Tri (SMESH::SMESH_IDSource_ptr theObject) THROW_SALOME_CORBA_EXCEPTION("No faces given", SALOME::BAD_PARAM); getEditor().QuadTo4Tri( faces ); - TPythonDump(myMesh_i->GetGen()) << this << ".QuadTo4Tri( " << theObject << " )"; + TPythonDump() << this << ".QuadTo4Tri( " << theObject << " )"; declareMeshModified( /*isReComputeSafe=*/false ); @@ -1954,7 +1954,7 @@ CORBA::Boolean SMESH_MeshEditor_i::SplitQuad (const SMESH::long_array & IDsOfEle arrayToSet(IDsOfElements, aMesh, faces, SMDSAbs_Face); // Update Python script - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".SplitQuad( " + TPythonDump() << "isDone = " << this << ".SplitQuad( " << IDsOfElements << ", " << Diag13 << " )"; CORBA::Boolean stat = getEditor().QuadToTri( faces, Diag13 ); @@ -1978,7 +1978,7 @@ CORBA::Boolean SMESH_MeshEditor_i::SplitQuadObject (SMESH::SMESH_IDSource_ptr th SMESH_TRY; initData(); - TPythonDump aTPythonDump(myMesh_i->GetGen()); // suppress dump in SplitQuad() + TPythonDump aTPythonDump; // suppress dump in SplitQuad() prepareIdSource( theObject ); SMESH::long_array_var anElementsId = theObject->GetIDs(); @@ -2054,7 +2054,7 @@ void SMESH_MeshEditor_i::SplitVolumesIntoTetra (SMESH::SMESH_IDSource_ptr elems, getEditor().SplitVolumes( elemSet, int( methodFlags )); declareMeshModified( /*isReComputeSafe=*/true ); // it does not influence Compute() - TPythonDump(myMesh_i->GetGen()) << this << ".SplitVolumesIntoTetra( " + TPythonDump() << this << ".SplitVolumesIntoTetra( " << elems << ", " << methodFlags << " )"; SMESH_CATCH( SMESH::throwCorbaException ); @@ -2114,7 +2114,7 @@ void SMESH_MeshEditor_i::SplitHexahedraIntoPrisms( SMESH::SMESH_IDSource_ptr el getEditor().SplitVolumes( elemFacets, int( methodFlags )); declareMeshModified( /*isReComputeSafe=*/true ); // it does not influence Compute() - TPythonDump(myMesh_i->GetGen()) << this << ".SplitHexahedraIntoPrisms( " + TPythonDump() << this << ".SplitHexahedraIntoPrisms( " << elems << ", " << startHexPoint << ", " << facetToSplitNormal<< ", " @@ -2155,7 +2155,7 @@ void SMESH_MeshEditor_i::SplitBiQuadraticIntoLinear(const SMESH::ListOfIDSources declareMeshModified( /*isReComputeSafe=*/true ); // it does not influence Compute() - TPythonDump(myMesh_i->GetGen()) << this << ".SplitBiQuadraticIntoLinear( " + TPythonDump() << this << ".SplitBiQuadraticIntoLinear( " << theElems << " )"; SMESH_CATCH( SMESH::throwCorbaException ); @@ -2268,7 +2268,7 @@ SMESH_MeshEditor_i::smooth(const SMESH::long_array & IDsOfElements, declareMeshModified( /*isReComputeSafe=*/true ); // does not prevent re-compute // Update Python script - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << "." + TPythonDump() << "isDone = " << this << "." << (IsParametric ? "SmoothParametric( " : "Smooth( ") << IDsOfElements << ", " << IDsOfFixedNodes << ", " << TVar( MaxNbOfIterations ) << ", " << TVar( MaxAspectRatio ) << ", " @@ -2299,7 +2299,7 @@ SMESH_MeshEditor_i::smoothObject(SMESH::SMESH_IDSource_ptr theObjec SMESH_TRY; initData(); - TPythonDump aTPythonDump(myMesh_i->GetGen()); // suppress dump in smooth() + TPythonDump aTPythonDump; // suppress dump in smooth() prepareIdSource( theObject ); SMESH::long_array_var anElementsId = theObject->GetIDs(); @@ -2331,7 +2331,7 @@ void SMESH_MeshEditor_i::RenumberNodes() { SMESH_TRY; // Update Python script - TPythonDump(myMesh_i->GetGen()) << this << ".RenumberNodes()"; + TPythonDump() << this << ".RenumberNodes()"; getMeshDS()->Renumber( true ); @@ -2348,7 +2348,7 @@ void SMESH_MeshEditor_i::RenumberElements() { SMESH_TRY; // Update Python script - TPythonDump(myMesh_i->GetGen()) << this << ".RenumberElements()"; + TPythonDump() << this << ".RenumberElements()"; getMeshDS()->Renumber( false ); @@ -2413,7 +2413,7 @@ SMESH_MeshEditor_i::RotationSweepObjects(const SMESH::ListOfIDSources & theNodes //makeWalls = false; -- faces are needed for preview } - TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of getGroups() + TPythonDump aPythonDump; // it is here to prevent dump of getGroups() gp_Ax1 Ax1 (gp_Pnt( theAxis.x, theAxis.y, theAxis.z ), gp_Vec( theAxis.vx, theAxis.vy, theAxis.vz )); @@ -2621,7 +2621,7 @@ SMESH_MeshEditor_i::ExtrusionSweepObjects(const SMESH::ListOfIDSources & theNode params.SetNoGroups(); } - TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of getGroups() + TPythonDump aPythonDump; // it is here to prevent dump of getGroups() ::SMESH_MeshEditor::TTElemOfElemListMap aHistory; ::SMESH_MeshEditor::PGroupIDs groupIds = @@ -2675,7 +2675,7 @@ SMESH_MeshEditor_i::ExtrusionByNormal(const SMESH::ListOfIDSources& objects, SMESH_TRY; initData(); - TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of GetGroups() + TPythonDump aPythonDump; // it is here to prevent dump of GetGroups() ExtrusionParams params( stepSize, nbOfSteps, dim, byAverageNormal, useInputElemsOnly, makeGroups ); @@ -2751,7 +2751,7 @@ SMESH_MeshEditor_i::AdvancedExtrusion(const SMESH::long_array & theIDsOfElements SMESH_TRY; initData(); - TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of getGroups() + TPythonDump aPythonDump; // it is here to prevent dump of getGroups() ExtrusionParams params( theStepVector, theNbOfSteps, theMakeGroups, theExtrFlags, theSewTolerance ); @@ -2931,7 +2931,7 @@ SMESH_MeshEditor_i::ExtrusionAlongPathObjects(const SMESH::ListOfIDSources & the declareMeshModified( /*isReComputeSafe=*/true ); theError = convExtrError( error ); - TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of getGroups() + TPythonDump aPythonDump; // it is here to prevent dump of getGroups() if ( theMakeGroups ) { list groupIDs = myMesh->GetGroupIds(); list::iterator newBegin = groupIDs.begin(); @@ -3036,8 +3036,8 @@ SMESH_MeshEditor_i::LinearAnglesVariation(SMESH::SMESH_Mesh_ptr thePathMes } } // Update Python script - TPythonDump(myMesh_i->GetGen()) << "rotAngles = " << theAngles; - TPythonDump(myMesh_i->GetGen()) << "rotAngles = " << this << ".LinearAnglesVariation( " + TPythonDump() << "rotAngles = " << theAngles; + TPythonDump() << "rotAngles = " << this << ".LinearAnglesVariation( " << thePathMesh << ", " << thePathShape << ", " << "rotAngles )"; @@ -3124,7 +3124,7 @@ void SMESH_MeshEditor_i::Mirror(const SMESH::long_array & theIDsOfElem CORBA::Boolean theCopy) { if ( !myIsPreviewMode ) { - TPythonDump(myMesh_i->GetGen()) << this << ".Mirror( " + TPythonDump() << this << ".Mirror( " << theIDsOfElements << ", " << theAxis << ", " << mirrorTypeName(theMirrorType) << ", " @@ -3150,7 +3150,7 @@ void SMESH_MeshEditor_i::MirrorObject(SMESH::SMESH_IDSource_ptr theObj CORBA::Boolean theCopy) { if ( !myIsPreviewMode ) { - TPythonDump(myMesh_i->GetGen()) << this << ".MirrorObject( " + TPythonDump() << this << ".MirrorObject( " << theObject << ", " << theAxis << ", " << mirrorTypeName(theMirrorType) << ", " @@ -3174,7 +3174,7 @@ SMESH_MeshEditor_i::MirrorMakeGroups(const SMESH::long_array& theIDsO const SMESH::AxisStruct& theMirror, SMESH::SMESH_MeshEditor::MirrorType theMirrorType) { - TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of GetGroups() + TPythonDump aPythonDump; // it is here to prevent dump of GetGroups() SMESH::ListOfGroups * aGroups = 0; if ( theIDsOfElements.length() > 0 ) @@ -3203,7 +3203,7 @@ SMESH_MeshEditor_i::MirrorObjectMakeGroups(SMESH::SMESH_IDSource_ptr t const SMESH::AxisStruct& theMirror, SMESH::SMESH_MeshEditor::MirrorType theMirrorType) { - TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of GetGroups() + TPythonDump aPythonDump; // it is here to prevent dump of GetGroups() SMESH::ListOfGroups * aGroups = 0; TIDSortedElemSet elements; @@ -3238,7 +3238,7 @@ SMESH_MeshEditor_i::MirrorMakeMesh(const SMESH::long_array& theIDsOfE { // open new scope to dump "MakeMesh" command // and then "GetGroups" using SMESH_Mesh::GetGroups() - TPythonDump pydump(myMesh_i->GetGen()); // to prevent dump at mesh creation + TPythonDump pydump; // to prevent dump at mesh creation mesh = makeMesh( theMeshName ); mesh_i = SMESH::DownCast( mesh ); @@ -3285,7 +3285,7 @@ SMESH_MeshEditor_i::MirrorObjectMakeMesh(SMESH::SMESH_IDSource_ptr the { // open new scope to dump "MakeMesh" command // and then "GetGroups" using SMESH_Mesh::GetGroups() - TPythonDump pydump(myMesh_i->GetGen()); // to prevent dump at mesh creation + TPythonDump pydump; // to prevent dump at mesh creation mesh = makeMesh( theMeshName ); mesh_i = SMESH::DownCast( mesh ); @@ -3380,7 +3380,7 @@ void SMESH_MeshEditor_i::Translate(const SMESH::long_array & theIDsOfElements, CORBA::Boolean theCopy) { if (!myIsPreviewMode) { - TPythonDump(myMesh_i->GetGen()) << this << ".Translate( " + TPythonDump() << this << ".Translate( " << theIDsOfElements << ", " << theVector << ", " << theCopy << " )"; @@ -3402,7 +3402,7 @@ void SMESH_MeshEditor_i::TranslateObject(SMESH::SMESH_IDSource_ptr theObject, CORBA::Boolean theCopy) { if (!myIsPreviewMode) { - TPythonDump(myMesh_i->GetGen()) << this << ".TranslateObject( " + TPythonDump() << this << ".TranslateObject( " << theObject << ", " << theVector << ", " << theCopy << " )"; @@ -3424,7 +3424,7 @@ SMESH::ListOfGroups* SMESH_MeshEditor_i::TranslateMakeGroups(const SMESH::long_array& theIDsOfElements, const SMESH::DirStruct& theVector) { - TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of GetGroups() + TPythonDump aPythonDump; // it is here to prevent dump of GetGroups() SMESH::ListOfGroups * aGroups = 0; if (theIDsOfElements.length()) { @@ -3450,7 +3450,7 @@ SMESH::ListOfGroups* SMESH_MeshEditor_i::TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject, const SMESH::DirStruct& theVector) { - TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of GetGroups() + TPythonDump aPythonDump; // it is here to prevent dump of GetGroups() SMESH::ListOfGroups * aGroups = 0; TIDSortedElemSet elements; @@ -3483,7 +3483,7 @@ SMESH_MeshEditor_i::TranslateMakeMesh(const SMESH::long_array& theIDsOfElements, { // open new scope to dump "MakeMesh" command // and then "GetGroups" using SMESH_Mesh::GetGroups() - TPythonDump pydump(myMesh_i->GetGen()); // to prevent dump at mesh creation + TPythonDump pydump; // to prevent dump at mesh creation mesh = makeMesh( theMeshName ); mesh_i = SMESH::DownCast( mesh ); @@ -3529,7 +3529,7 @@ SMESH_MeshEditor_i::TranslateObjectMakeMesh(SMESH::SMESH_IDSource_ptr theObject, { // open new scope to dump "MakeMesh" command // and then "GetGroups" using SMESH_Mesh::GetGroups() - TPythonDump pydump(myMesh_i->GetGen()); // to prevent dump at mesh creation + TPythonDump pydump; // to prevent dump at mesh creation mesh = makeMesh( theMeshName ); mesh_i = SMESH::DownCast( mesh ); @@ -3625,7 +3625,7 @@ void SMESH_MeshEditor_i::Rotate(const SMESH::long_array & theIDsOfElements, CORBA::Boolean theCopy) { if (!myIsPreviewMode) { - TPythonDump(myMesh_i->GetGen()) << this << ".Rotate( " + TPythonDump() << this << ".Rotate( " << theIDsOfElements << ", " << theAxis << ", " << TVar( theAngle ) << ", " @@ -3650,7 +3650,7 @@ void SMESH_MeshEditor_i::RotateObject(SMESH::SMESH_IDSource_ptr theObject, CORBA::Boolean theCopy) { if ( !myIsPreviewMode ) { - TPythonDump(myMesh_i->GetGen()) << this << ".RotateObject( " + TPythonDump() << this << ".RotateObject( " << theObject << ", " << theAxis << ", " << TVar( theAngle ) << ", " @@ -3672,7 +3672,7 @@ SMESH_MeshEditor_i::RotateMakeGroups(const SMESH::long_array& theIDsOfElements, const SMESH::AxisStruct& theAxis, CORBA::Double theAngle) { - TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of GetGroups() + TPythonDump aPythonDump; // it is here to prevent dump of GetGroups() SMESH::ListOfGroups * aGroups = 0; if (theIDsOfElements.length() > 0) @@ -3701,7 +3701,7 @@ SMESH_MeshEditor_i::RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject, const SMESH::AxisStruct& theAxis, CORBA::Double theAngle) { - TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of GetGroups() + TPythonDump aPythonDump; // it is here to prevent dump of GetGroups() SMESH::ListOfGroups * aGroups = 0; TIDSortedElemSet elements; @@ -3737,7 +3737,7 @@ SMESH_MeshEditor_i::RotateMakeMesh(const SMESH::long_array& theIDsOfElements, { // open new scope to dump "MakeMesh" command // and then "GetGroups" using SMESH_Mesh::GetGroups() - TPythonDump pydump(myMesh_i->GetGen()); // to prevent dump at mesh creation + TPythonDump pydump; // to prevent dump at mesh creation mesh = makeMesh( theMeshName ); mesh_i = SMESH::DownCast( mesh ); @@ -3789,7 +3789,7 @@ SMESH_MeshEditor_i::RotateObjectMakeMesh(SMESH::SMESH_IDSource_ptr theObject, {// open new scope to dump "MakeMesh" command // and then "GetGroups" using SMESH_Mesh::GetGroups() - TPythonDump pydump(myMesh_i->GetGen()); // to prevent dump at mesh creation + TPythonDump pydump; // to prevent dump at mesh creation mesh = makeMesh( theMeshName ); mesh_i = SMESH::DownCast( mesh ); @@ -3909,7 +3909,7 @@ void SMESH_MeshEditor_i::Scale(SMESH::SMESH_IDSource_ptr theObject, CORBA::Boolean theCopy) { if ( !myIsPreviewMode ) { - TPythonDump(myMesh_i->GetGen()) << this << ".Scale( " + TPythonDump() << this << ".Scale( " << theObject << ", " << thePoint << ", " << TVar( theScaleFact ) << ", " @@ -3929,7 +3929,7 @@ SMESH_MeshEditor_i::ScaleMakeGroups(SMESH::SMESH_IDSource_ptr theObject, const SMESH::PointStruct& thePoint, const SMESH::double_array& theScaleFact) { - TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of GetGroups() + TPythonDump aPythonDump; // it is here to prevent dump of GetGroups() SMESH::ListOfGroups * aGroups = scale(theObject, thePoint, theScaleFact, true, true); if (!myIsPreviewMode) { @@ -3960,7 +3960,7 @@ SMESH_MeshEditor_i::ScaleMakeMesh(SMESH::SMESH_IDSource_ptr theObject, { // open new scope to dump "MakeMesh" command // and then "GetGroups" using SMESH_Mesh::GetGroups() - TPythonDump pydump(myMesh_i->GetGen()); // to prevent dump at mesh creation + TPythonDump pydump; // to prevent dump at mesh creation mesh = makeMesh( theMeshName ); mesh_i = SMESH::DownCast( mesh ); @@ -4013,7 +4013,7 @@ SMESH::SMESH_Mesh_ptr SMESH_MeshEditor_i::Offset( SMESH::SMESH_IDSource_ptr theO SMESH::SMESH_Mesh_var mesh_var; ::SMESH_MeshEditor::PGroupIDs groupIds; - TPythonDump pyDump(myMesh_i->GetGen()); + TPythonDump pyDump; TIDSortedElemSet elements, copyElements; if ( idSourceToSet( theObject, aMeshDS, elements, SMDSAbs_Face, @@ -4052,9 +4052,9 @@ SMESH::SMESH_Mesh_ptr SMESH_MeshEditor_i::Offset( SMESH::SMESH_IDSource_ptr theO if ( *theMeshName && mesh_var->NbFaces() == 0 ) { // new mesh empty, remove it - SALOMEDS::Study_var study = myMesh_i->GetGen()->getStudyServant(); + SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->getStudyServant(); SALOMEDS::StudyBuilder_var builder = study->NewBuilder(); - SALOMEDS::SObject_wrap meshSO = myMesh_i->GetGen()->ObjectToSObject( mesh_var ); + SALOMEDS::SObject_wrap meshSO = SMESH_Gen_i::GetSMESHGen()->ObjectToSObject( mesh_var ); builder->RemoveObjectWithChildren( meshSO ); THROW_SALOME_CORBA_EXCEPTION("Offset failed", SALOME::INTERNAL_ERROR); } @@ -4124,7 +4124,7 @@ FindCoincidentNodes (CORBA::Double Tolerance, TIDSortedNodeSet nodes; // no input nodes findCoincidentNodes( nodes, Tolerance, GroupsOfNodes, SeparateCornersAndMedium ); - TPythonDump(myMesh_i->GetGen()) << "coincident_nodes = " << this << ".FindCoincidentNodes( " + TPythonDump() << "coincident_nodes = " << this << ".FindCoincidentNodes( " << Tolerance << ", " << SeparateCornersAndMedium << " )"; @@ -4151,7 +4151,7 @@ FindCoincidentNodesOnPart(SMESH::SMESH_IDSource_ptr theObject, findCoincidentNodes( nodes, Tolerance, GroupsOfNodes, SeparateCornersAndMedium ); - TPythonDump(myMesh_i->GetGen()) << "coincident_nodes_on_part = " << this << ".FindCoincidentNodesOnPart( " + TPythonDump() << "coincident_nodes_on_part = " << this << ".FindCoincidentNodesOnPart( " << theObject <<", " << Tolerance << ", " << SeparateCornersAndMedium << " )"; @@ -4191,7 +4191,7 @@ FindCoincidentNodesOnPartBut(const SMESH::ListOfIDSources& theObjects, } findCoincidentNodes( nodes, theTolerance, theGroupsOfNodes, theSeparateCornersAndMedium ); - TPythonDump(myMesh_i->GetGen()) << "coincident_nodes_on_part = " << this << ".FindCoincidentNodesOnPartBut( " + TPythonDump() << "coincident_nodes_on_part = " << this << ".FindCoincidentNodesOnPartBut( " << theObjects <<", " << theTolerance << ", " << theExceptSubMeshOrGroups << ", " @@ -4214,7 +4214,7 @@ void SMESH_MeshEditor_i::MergeNodes (const SMESH::array_of_long_array& GroupsOfN SMESHDS_Mesh* aMesh = getMeshDS(); - TPythonDump aTPythonDump(myMesh_i->GetGen()); + TPythonDump aTPythonDump; aTPythonDump << this << ".MergeNodes(["; TIDSortedNodeSet setOfNodesToKeep; @@ -4311,7 +4311,7 @@ void SMESH_MeshEditor_i::FindEqualElements(const SMESH::ListOfIDSources& theObj aGroup[ k ] = *idIt; } - TPythonDump(myMesh_i->GetGen()) << "equal_elements = " << this << ".FindEqualElements( " + TPythonDump() << "equal_elements = " << this << ".FindEqualElements( " << theObjects << ", " << theExceptObjects << " )"; } @@ -4330,7 +4330,7 @@ void SMESH_MeshEditor_i::MergeElements(const SMESH::array_of_long_array& theGrou SMESH_TRY; initData(); - TPythonDump aTPythonDump(myMesh_i->GetGen()); + TPythonDump aTPythonDump; aTPythonDump << this << ".MergeElements( ["; NCollection_Map< int > idsToKeep; @@ -4388,7 +4388,7 @@ void SMESH_MeshEditor_i::MergeEqualElements() declareMeshModified( /*isReComputeSafe=*/true ); - TPythonDump(myMesh_i->GetGen()) << this << ".MergeEqualElements()"; + TPythonDump() << this << ".MergeEqualElements()"; SMESH_CATCH( SMESH::throwCorbaException ); } @@ -4440,7 +4440,7 @@ CORBA::Boolean SMESH_MeshEditor_i::MoveNode(CORBA::Long NodeID, if ( !myIsPreviewMode ) { // Update Python script - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".MoveNode( " + TPythonDump() << "isDone = " << this << ".MoveNode( " << NodeID << ", " << TVar(x) << ", " << TVar(y) << ", " << TVar(z) << " )"; declareMeshModified( /*isReComputeSafe=*/false ); } @@ -4537,7 +4537,7 @@ CORBA::Long SMESH_MeshEditor_i::MoveClosestNodeToPoint(CORBA::Double x, if ( !myIsPreviewMode ) { - TPythonDump(myMesh_i->GetGen()) << "nodeID = " << this + TPythonDump() << "nodeID = " << this << ".MoveClosestNodeToPoint( "<< x << ", " << y << ", " << z << ", " << nodeID << " )"; @@ -5014,7 +5014,7 @@ SMESH_MeshEditor_i::FillHole(const SMESH::FreeBorder& theHole, const_cast( getEditor().GetLastCreatedElems() ); aSeq.swap( newFaces ); - TPythonDump pyDump(myMesh_i->GetGen()); + TPythonDump pyDump; if ( group->_is_nil() ) pyDump << "_group = "; else pyDump << group << " = "; pyDump << this << ".FillHole( SMESH.FreeBorder(" << theHole.nodeIDs << " ))"; @@ -5100,7 +5100,7 @@ SMESH_MeshEditor_i::FindCoincidentFreeBorders(CORBA::Double tolerance) } SMESH_CATCH( SMESH::doNothing ); - TPythonDump(myMesh_i->GetGen()) << "CoincidentFreeBorders = " + TPythonDump() << "CoincidentFreeBorders = " << this << ".FindCoincidentFreeBorders( " << tolerance << " )"; return aCFB._retn(); @@ -5248,7 +5248,7 @@ SewCoincidentFreeBorders(const SMESH::CoincidentFreeBorders& freeBorders, nbSewed += groupSewed; } - TPythonDump(myMesh_i->GetGen()) << "nbSewed = " << this << ".SewCoincidentFreeBorders( " + TPythonDump() << "nbSewed = " << this << ".SewCoincidentFreeBorders( " << freeBorders << ", " << createPolygons << ", " << createPolyhedra << " )"; @@ -5306,7 +5306,7 @@ SMESH_MeshEditor_i::SewFreeBorders(CORBA::Long FirstNodeID1, !aSide2ThirdNode) return SMESH::SMESH_MeshEditor::SEW_BORDER2_NOT_FOUND; - TPythonDump(myMesh_i->GetGen()) << "error = " << this << ".SewFreeBorders( " + TPythonDump() << "error = " << this << ".SewFreeBorders( " << FirstNodeID1 << ", " << SecondNodeID1 << ", " << LastNodeID1 << ", " @@ -5368,7 +5368,7 @@ SMESH_MeshEditor_i::SewConformFreeBorders(CORBA::Long FirstNodeID1, !aSide2SecondNode) return SMESH::SMESH_MeshEditor::SEW_BORDER2_NOT_FOUND; - TPythonDump(myMesh_i->GetGen()) << "error = " << this << ".SewConformFreeBorders( " + TPythonDump() << "error = " << this << ".SewConformFreeBorders( " << FirstNodeID1 << ", " << SecondNodeID1 << ", " << LastNodeID1 << ", " @@ -5427,7 +5427,7 @@ SMESH_MeshEditor_i::SewBorderToSide(CORBA::Long FirstNodeIDOnFreeBorder, !aSide2SecondNode) return SMESH::SMESH_MeshEditor::SEW_BAD_SIDE_NODES; - TPythonDump(myMesh_i->GetGen()) << "error = " << this << ".SewBorderToSide( " + TPythonDump() << "error = " << this << ".SewBorderToSide( " << FirstNodeIDOnFreeBorder << ", " << SecondNodeIDOnFreeBorder << ", " << LastNodeIDOnFreeBorder << ", " @@ -5489,7 +5489,7 @@ SMESH_MeshEditor_i::SewSideElements(const SMESH::long_array& IDsOfSide1Elements, arrayToSet(IDsOfSide1Elements, aMesh, aSide1Elems); arrayToSet(IDsOfSide2Elements, aMesh, aSide2Elems); - TPythonDump(myMesh_i->GetGen()) << "error = " << this << ".SewSideElements( " + TPythonDump() << "error = " << this << ".SewSideElements( " << IDsOfSide1Elements << ", " << IDsOfSide2Elements << ", " << NodeID1OfSide1ToMerge << ", " @@ -5537,7 +5537,7 @@ CORBA::Boolean SMESH_MeshEditor_i::ChangeElemNodes(CORBA::Long ide, return false; aNodes[ i ] = aNode; } - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".ChangeElemNodes( " + TPythonDump() << "isDone = " << this << ".ChangeElemNodes( " << ide << ", " << newIDs << " )"; bool res = getMeshDS()->ChangeElementNodes( elem, & aNodes[0], aNodes.size() ); @@ -5595,7 +5595,7 @@ CORBA::Boolean SMESH_MeshEditor_i::ConvertFromQuadratic() initData(); CORBA::Boolean isDone = getEditor().ConvertFromQuadratic(); - TPythonDump(myMesh_i->GetGen()) << this << ".ConvertFromQuadratic()"; + TPythonDump() << this << ".ConvertFromQuadratic()"; declareMeshModified( /*isReComputeSafe=*/!isDone ); return isDone; @@ -5611,7 +5611,7 @@ CORBA::Boolean SMESH_MeshEditor_i::ConvertFromQuadratic() void SMESH_MeshEditor_i::ConvertToQuadratic(CORBA::Boolean theForce3d) { convertToQuadratic( theForce3d, false ); - TPythonDump(myMesh_i->GetGen()) << this << ".ConvertToQuadratic("<GetGen()) << this << ".ConvertToQuadraticObject("<GetGen()) << this << ".ConvertToBiQuadratic("<GetGen()); + TPythonDump pyDump; TIDSortedElemSet elems; if ( idSourceToSet( theObject, getMeshDS(), elems, SMDSAbs_All, /*emptyIfIsMesh=*/true )) @@ -5846,7 +5846,7 @@ SMESH_MeshEditor_i::DoubleElements(SMESH::SMESH_IDSource_ptr theElements, SMESH_TRY; initData(); - TPythonDump pyDump(myMesh_i->GetGen()); + TPythonDump pyDump; TIDSortedElemSet elems; if ( idSourceToSet( theElements, getMeshDS(), elems, SMDSAbs_All, /*emptyIfIsMesh=*/true)) @@ -5925,7 +5925,7 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodes( const SMESH::long_array& theNode declareMeshModified( /*isReComputeSafe=*/ !aResult ); // Update Python script - TPythonDump(myMesh_i->GetGen()) << this << ".DoubleNodes( " << theNodes << ", "<< theModifiedElems << " )"; + TPythonDump() << this << ".DoubleNodes( " << theNodes << ", "<< theModifiedElems << " )"; return aResult; @@ -5952,7 +5952,7 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNode( CORBA::Long theNodeI aNodes->length( 1 ); aNodes[ 0 ] = theNodeId; - TPythonDump pyDump(myMesh_i->GetGen()); // suppress dump by the next line + TPythonDump pyDump; // suppress dump by the next line CORBA::Boolean done = DoubleNodes( aNodes, theModifiedElems ); @@ -5989,7 +5989,7 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroup(SMESH::SMESH_GroupBase_ptr th else aModifiedElems = new SMESH::long_array; - TPythonDump pyDump(myMesh_i->GetGen()); // suppress dump by the next line + TPythonDump pyDump; // suppress dump by the next line bool done = DoubleNodes( aNodes, aModifiedElems ); @@ -6032,7 +6032,7 @@ SMESH_MeshEditor_i::DoubleNodeGroupNew( SMESH::SMESH_GroupBase_ptr theNodes, aModifiedElems->length( 0 ); } - TPythonDump pyDump(myMesh_i->GetGen()); // suppress dump by the next line + TPythonDump pyDump; // suppress dump by the next line bool aResult = DoubleNodes( aNodes, aModifiedElems ); if ( aResult ) @@ -6103,7 +6103,7 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroups(const SMESH::ListOfGroups& t declareMeshModified( /*isReComputeSafe=*/false ); - TPythonDump(myMesh_i->GetGen()) << this << ".DoubleNodeGroups( " << theNodes << ", " << theModifiedElems << " )"; + TPythonDump() << this << ".DoubleNodeGroups( " << theNodes << ", " << theModifiedElems << " )"; return aResult; @@ -6128,7 +6128,7 @@ SMESH_MeshEditor_i::DoubleNodeGroupsNew( const SMESH::ListOfGroups& theNodes, { SMESH::SMESH_Group_var aNewGroup; - TPythonDump pyDump(myMesh_i->GetGen()); // suppress dump by the next line + TPythonDump pyDump; // suppress dump by the next line bool aResult = DoubleNodeGroups( theNodes, theModifiedElems ); @@ -6181,7 +6181,7 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElem( const SMESH::long_array& theE bool aResult = getEditor().DoubleNodes( anElems, aNodes, anAffected ); // Update Python script - TPythonDump(myMesh_i->GetGen()) << this << ".DoubleNodeElem( " << theElems << ", " + TPythonDump() << this << ".DoubleNodeElem( " << theElems << ", " << theNodesNot << ", " << theAffectedElems << " )"; declareMeshModified( /*isReComputeSafe=*/false ); @@ -6222,7 +6222,7 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemInRegion ( const SMESH::long_ar bool aResult = getEditor().DoubleNodesInRegion( anElems, aNodes, aShape ); // Update Python script - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodeElemInRegion( " << theElems << ", " + TPythonDump() << "isDone = " << this << ".DoubleNodeElemInRegion( " << theElems << ", " << theNodesNot << ", " << theShape << " )"; declareMeshModified( /*isReComputeSafe=*/false ); @@ -6265,7 +6265,7 @@ SMESH_MeshEditor_i::DoubleNodeElemGroup(SMESH::SMESH_GroupBase_ptr theElems, bool aResult = getEditor().DoubleNodes( anElems, aNodes, anAffected ); // Update Python script - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodeElemGroup( " << theElems << ", " + TPythonDump() << "isDone = " << this << ".DoubleNodeElemGroup( " << theElems << ", " << theNodesNot << ", " << theAffectedElems << " )"; declareMeshModified( /*isReComputeSafe=*/false ); @@ -6293,7 +6293,7 @@ SMESH_MeshEditor_i::DoubleNodeElemGroupNew(SMESH::SMESH_GroupBase_ptr theElems, SMESH::SMESH_GroupBase_ptr theNodesNot, SMESH::SMESH_GroupBase_ptr theAffectedElems) { - TPythonDump pyDump(myMesh_i->GetGen()); + TPythonDump pyDump; SMESH::ListOfGroups_var twoGroups = DoubleNodeElemGroup2New( theElems, theNodesNot, theAffectedElems, @@ -6351,7 +6351,7 @@ SMESH_MeshEditor_i::DoubleNodeElemGroup2New(SMESH::SMESH_GroupBase_ptr theElems, declareMeshModified( /*isReComputeSafe=*/ !aResult ); - TPythonDump pyDump(myMesh_i->GetGen()); + TPythonDump pyDump; if ( aResult ) { @@ -6432,7 +6432,7 @@ SMESH_MeshEditor_i::DoubleNodeElemGroupInRegion(SMESH::SMESH_GroupBase_ptr theEl declareMeshModified( /*isReComputeSafe=*/ !aResult ); // Update Python script - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodeElemGroupInRegion( " << theElems << ", " + TPythonDump() << "isDone = " << this << ".DoubleNodeElemGroupInRegion( " << theElems << ", " << theNodesNot << ", " << theShape << " )"; return aResult; @@ -6498,7 +6498,7 @@ SMESH_MeshEditor_i::DoubleNodeElemGroups(const SMESH::ListOfGroups& theElems, bool aResult = getEditor().DoubleNodes( anElems, aNodes, anAffected ); // Update Python script - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodeElemGroups( " << &theElems << ", " + TPythonDump() << "isDone = " << this << ".DoubleNodeElemGroups( " << &theElems << ", " << &theNodesNot << ", " << &theAffectedElems << " )"; declareMeshModified( /*isReComputeSafe=*/false ); @@ -6526,7 +6526,7 @@ SMESH_MeshEditor_i::DoubleNodeElemGroupsNew(const SMESH::ListOfGroups& theElems, const SMESH::ListOfGroups& theNodesNot, const SMESH::ListOfGroups& theAffectedElems) { - TPythonDump pyDump(myMesh_i->GetGen()); + TPythonDump pyDump; SMESH::ListOfGroups_var twoGroups = DoubleNodeElemGroups2New( theElems, theNodesNot, theAffectedElems, @@ -6580,7 +6580,7 @@ SMESH_MeshEditor_i::DoubleNodeElemGroups2New(const SMESH::ListOfGroups& theElems declareMeshModified( /*isReComputeSafe=*/ !aResult ); - TPythonDump pyDump(myMesh_i->GetGen()); + TPythonDump pyDump; if ( aResult ) { // Create group with newly created elements @@ -6655,7 +6655,7 @@ SMESH_MeshEditor_i::DoubleNodeElemGroupsInRegion(const SMESH::ListOfGroups& theE bool aResult = getEditor().DoubleNodesInRegion( anElems, aNodes, aShape ); // Update Python script - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodeElemGroupsInRegion( " << &theElems << ", " + TPythonDump() << "isDone = " << this << ".DoubleNodeElemGroupsInRegion( " << &theElems << ", " << &theNodesNot << ", " << theShape << " )"; declareMeshModified( /*isReComputeSafe=*/ !aResult ); @@ -6706,7 +6706,7 @@ SMESH_MeshEditor_i::AffectedElemGroupsInRegion( const SMESH::ListOfGroups& theEl declareMeshModified( /*isReComputeSafe=*/ !aResult ); - TPythonDump pyDump(myMesh_i->GetGen()); + TPythonDump pyDump; if ( aResult && anAffected.size() > 0 ) { SMESH::long_array_var volumeIds = new SMESH::long_array; @@ -6788,7 +6788,7 @@ CORBA::Boolean SMESH_MeshEditor_i::Make2DMeshFrom3D() bool aResult = getEditor().Make2DMeshFrom3D(); - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".Make2DMeshFrom3D()"; + TPythonDump() << "isDone = " << this << ".Make2DMeshFrom3D()"; declareMeshModified( /*isReComputeSafe=*/ !aResult ); return aResult; @@ -6856,7 +6856,7 @@ SMESH_MeshEditor_i::DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& the declareMeshModified( /*isReComputeSafe=*/ !isOK ); // Update Python script - TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodesOnGroupBoundaries( " << &theDomains + TPythonDump() << "isDone = " << this << ".DoubleNodesOnGroupBoundaries( " << &theDomains << ", " << createJointElems << ", " << onAllBoundaries << " )"; SMESH_CATCH( SMESH::throwCorbaException ); @@ -6908,7 +6908,7 @@ SMESH_MeshEditor_i::CreateFlatElementsOnFacesGroups( const SMESH::ListOfGroups& declareMeshModified( /*isReComputeSafe=*/ !aResult ); // Update Python script - TPythonDump(myMesh_i->GetGen()) << this << ".CreateFlatElementsOnFacesGroups( " << &theGroupsOfFaces << " )"; + TPythonDump() << this << ".CreateFlatElementsOnFacesGroups( " << &theGroupsOfFaces << " )"; return aResult; SMESH_CATCH( SMESH::throwCorbaException ); @@ -6965,7 +6965,7 @@ void SMESH_MeshEditor_i::CreateHoleSkin(CORBA::Double radius, for ( int j = 0; lIt != aListOfNodes.end(); lIt++, j++ ) aGroup[ j ] = (*lIt); } - TPythonDump(myMesh_i->GetGen()) << "lists_nodes = " << this << ".CreateHoleSkin( " + TPythonDump() << "lists_nodes = " << this << ".CreateHoleSkin( " << radius << ", " << theShape << ", '" << groupName << "', " @@ -7011,7 +7011,7 @@ SMESH_MeshEditor_i::MakeBoundaryMesh(SMESH::SMESH_IDSource_ptr idSource, SMESH::SMESH_Mesh_var mesh_var; SMESH::SMESH_Group_var group_var; - TPythonDump pyDump(myMesh_i->GetGen()); + TPythonDump pyDump; TIDSortedElemSet elements; SMDSAbs_ElementType elemType = (dim == SMESH::BND_1DFROM2D) ? SMDSAbs_Face : SMDSAbs_Volume; @@ -7122,7 +7122,7 @@ CORBA::Long SMESH_MeshEditor_i::MakeBoundaryElements(SMESH::Bnd_Dimension dim, groupsOfOtherMesh->length( nbGroupsOfOtherMesh ); int nbAdded = 0; - TPythonDump pyDump(myMesh_i->GetGen()); + TPythonDump pyDump; if ( nbGroupsOfOtherMesh > 0 ) { @@ -7342,11 +7342,11 @@ void SMESH_MeshEditor_i::MakePolyLine(SMESH::ListOfPolySegments& theSegments, } else { - TPythonDump(myMesh_i->GetGen()) << "_segments = []"; + TPythonDump() << "_segments = []"; for ( CORBA::ULong i = 0; i < theSegments.length(); ++i ) { SMESH::PolySegment& segIn = theSegments[ i ]; - TPythonDump(myMesh_i->GetGen()) << "_segments.append( SMESH.PolySegment( " + TPythonDump() << "_segments.append( SMESH.PolySegment( " << segIn.node1ID1 << ", " << segIn.node1ID2 << ", " << segIn.node2ID1 << ", " @@ -7356,7 +7356,7 @@ void SMESH_MeshEditor_i::MakePolyLine(SMESH::ListOfPolySegments& theSegments, << segIn.vector.PS.y << ", " << segIn.vector.PS.z << ")))"; } - TPythonDump(myMesh_i->GetGen()) << this << ".MakePolyLine( _segments, '" << theGroupName << "')"; + TPythonDump() << this << ".MakePolyLine( _segments, '" << theGroupName << "')"; } meshDS->Modified(); SMESH_CATCH( SMESH::throwCorbaException ); diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index 267c82b14..c03151e8b 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -299,7 +299,7 @@ void SMESH_Mesh_i::Clear() THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM); } - TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".Clear()"; + TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".Clear()"; SMESH::SMESH_Mesh_var mesh = _this(); _gen_i->UpdateIcons( mesh ); @@ -325,7 +325,7 @@ void SMESH_Mesh_i::ClearSubMesh(CORBA::Long ShapeID) } _impl->GetMeshDS()->Modified(); - TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".ClearSubMesh( " << ShapeID << " )"; + TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ClearSubMesh( " << ShapeID << " )"; } //============================================================================= @@ -661,7 +661,7 @@ SMESH_Mesh_i::AddHypothesis(GEOM::GEOM_Object_ptr aSubShape, if(MYDEBUG) MESSAGE( " AddHypothesis(): status = " << status ); // Update Python script - TPythonDump(_gen_i) << "status = " << mesh << ".AddHypothesis( " + TPythonDump() << "status = " << mesh << ".AddHypothesis( " << aSubShape << ", " << anHyp << " )"; return ConvertHypothesisStatus(status); @@ -745,10 +745,10 @@ SMESH::Hypothesis_Status SMESH_Mesh_i::RemoveHypothesis(GEOM::GEOM_Object_ptr } // Update Python script if(_impl->HasShapeToMesh()) - TPythonDump(_gen_i) << "status = " << mesh << ".RemoveHypothesis( " + TPythonDump() << "status = " << mesh << ".RemoveHypothesis( " << aSubShape << ", " << anHyp << " )"; else - TPythonDump(_gen_i) << "status = " << mesh << ".RemoveHypothesis( " + TPythonDump() << "status = " << mesh << ".RemoveHypothesis( " << anHyp << " )"; return ConvertHypothesisStatus(status); @@ -855,7 +855,7 @@ SMESH::submesh_array* SMESH_Mesh_i::GetSubMeshes() SMESH::submesh_array_var aList = new SMESH::submesh_array(); // Python Dump - TPythonDump aPythonDump(_gen_i); + TPythonDump aPythonDump; if ( !_mapSubMeshIor.empty() ) aPythonDump << "[ "; @@ -924,7 +924,7 @@ SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::GetSubMesh(GEOM::GEOM_Object_ptr aSubShap _gen_i->PublishSubMesh( aMesh, subMesh, aSubShape, theName ); if ( !aSO->_is_nil()) { // Update Python script - TPythonDump(_gen_i) << aSO << " = " << aMesh << ".GetSubMesh( " + TPythonDump() << aSO << " = " << aMesh << ".GetSubMesh( " << aSubShape << ", '" << theName << "' )"; } } @@ -967,7 +967,7 @@ void SMESH_Mesh_i::RemoveSubMesh( SMESH::SMESH_subMesh_ptr theSubMesh ) builder->RemoveObjectWithChildren( anSO ); // Update Python script - TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var( _this() ) << ".RemoveSubMesh( " << anSO << " )"; + TPythonDump() << SMESH::SMESH_Mesh_var( _this() ) << ".RemoveSubMesh( " << anSO << " )"; } if ( removeSubMesh( theSubMesh, aSubShape.in() )) @@ -1000,7 +1000,7 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::CreateGroup( SMESH::ElementType theElemType _gen_i->PublishGroup( mesh, aNewGroup, GEOM::GEOM_Object::_nil(), theName); if ( !aSO->_is_nil()) // Update Python script - TPythonDump(_gen_i) << aSO << " = " << mesh << ".CreateGroup( " + TPythonDump() << aSO << " = " << mesh << ".CreateGroup( " << theElemType << ", '" << theName << "' )"; } return aNewGroup._retn(); @@ -1035,7 +1035,7 @@ SMESH_Mesh_i::CreateGroupFromGEOM (SMESH::ElementType theElemType, SALOMEDS::SObject_wrap aSO = _gen_i->PublishGroup( mesh, aNewGroup, theGeomObj, theName ); if ( !aSO->_is_nil()) - TPythonDump(_gen_i) << aSO << " = " << mesh << ".CreateGroupFromGEOM( " + TPythonDump() << aSO << " = " << mesh << ".CreateGroupFromGEOM( " << theElemType << ", '" << theName << "', " << theGeomObj << " )"; } } @@ -1072,7 +1072,7 @@ SMESH_Mesh_i::CreateGroupFromFilter(SMESH::ElementType theElemType, SMESH::SMESH_GroupOnFilter_var aNewGroup = SMESH::SMESH_GroupOnFilter::_narrow ( createGroup( theElemType, theName, /*id=*/-1, TopoDS_Shape(), predicate )); - TPythonDump pd(_gen_i); + TPythonDump pd; if ( !aNewGroup->_is_nil() ) aNewGroup->SetFilter( theFilter ); @@ -1114,10 +1114,10 @@ void SMESH_Mesh_i::RemoveGroup( SMESH::SMESH_GroupBase_ptr theGroup ) if ( !aGroupSO->_is_nil() ) { // Update Python script - TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".RemoveGroup( " << aGroupSO << " )"; + TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".RemoveGroup( " << aGroupSO << " )"; // Remove group's SObject - SALOMEDS::StudyBuilder_var builder = _gen_i->getStudyServant()->NewBuilder(); + SALOMEDS::StudyBuilder_var builder = SMESH_Gen_i::GetSMESHGen()->getStudyServant()->NewBuilder(); builder->RemoveObjectWithChildren( aGroupSO ); } aGroup->Modified(/*removed=*/true); // notify dependent Filter with FT_BelongToMeshGroup criterion @@ -1165,7 +1165,7 @@ void SMESH_Mesh_i::RemoveGroupWithContents( SMESH::SMESH_GroupBase_ptr theGroup std::vector< const SMDS_MeshElement* > elems( theGroup->Size() ); elems.assign( elemBeg, elemEnd ); - TPythonDump pyDump(_gen_i); // Suppress dump from RemoveGroup() + TPythonDump pyDump; // Suppress dump from RemoveGroup() // Remove group RemoveGroup( theGroup ); @@ -1219,7 +1219,7 @@ SMESH::ListOfGroups * SMESH_Mesh_i::GetGroups() SMESH::ListOfGroups_var aList = new SMESH::ListOfGroups(); // Python Dump - TPythonDump aPythonDump(_gen_i); + TPythonDump aPythonDump; if ( !_mapGroups.empty() ) { aPythonDump << "[ "; @@ -1278,7 +1278,7 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::UnionGroups( SMESH::SMESH_GroupBase_ptr the if ( theGroup1->GetType() != theGroup2->GetType() ) THROW_SALOME_CORBA_EXCEPTION("UnionGroups(): different group types", SALOME::BAD_PARAM); - TPythonDump pyDump(_gen_i); + TPythonDump pyDump; // Create Union aResGrp = CreateGroup( theGroup1->GetType(), theName ); @@ -1335,7 +1335,7 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::UnionListOfGroups(const SMESH::ListOfGroups if ( aType == SMESH::ALL ) return SMESH::SMESH_Group::_nil(); - TPythonDump pyDump(_gen_i); + TPythonDump pyDump; // Create Union aResGrp = CreateGroup( aType, theName ); @@ -1384,7 +1384,7 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::IntersectGroups( SMESH::SMESH_GroupBase_ptr if ( theGroup1->GetType() != theGroup2->GetType() ) THROW_SALOME_CORBA_EXCEPTION("IntersectGroups(): different group types", SALOME::BAD_PARAM); - TPythonDump pyDump(_gen_i); + TPythonDump pyDump; // Create Intersection aResGrp = CreateGroup( theGroup1->GetType(), theName ); @@ -1474,7 +1474,7 @@ SMESH_Mesh_i::IntersectListOfGroups(const SMESH::ListOfGroups& theGroups, if ( aType == SMESH::ALL ) // all groups are nil return SMESH::SMESH_Group::_nil(); - TPythonDump pyDump(_gen_i); + TPythonDump pyDump; // Create a group aResGrp = CreateGroup( aType, theName ); @@ -1532,7 +1532,7 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::CutGroups( SMESH::SMESH_GroupBase_ptr theGr if ( theGroup1->GetType() != theGroup2->GetType() ) THROW_SALOME_CORBA_EXCEPTION("CutGroups(): different group types", SALOME::BAD_PARAM); - TPythonDump pyDump(_gen_i); + TPythonDump pyDump; aResGrp = CreateGroup( theGroup1->GetType(), theName ); if ( aResGrp->_is_nil() ) @@ -1633,7 +1633,7 @@ SMESH_Mesh_i::CutListOfGroups(const SMESH::ListOfGroups& theMainGroups, toolGroupVec.push_back( grpDS ); } - TPythonDump pyDump(_gen_i); + TPythonDump pyDump; // Create a group aResGrp = CreateGroup( aType, theName ); @@ -1743,7 +1743,7 @@ SMESH_Mesh_i::CreateDimGroup(const SMESH::ListOfIDSources& theGroups, // Create a group - TPythonDump pyDump(_gen_i); + TPythonDump pyDump; aResGrp = CreateGroup( theElemType, theName ); if ( aResGrp->_is_nil() ) @@ -1903,7 +1903,7 @@ SMESH_Mesh_i::FaceGroupsSeparatedByEdges( CORBA::Double theSharpAngle, SMESH::ListOfGroups_var resultGroups = new SMESH::ListOfGroups; - TPythonDump pyDump(_gen_i); + TPythonDump pyDump; SMESH_TRY; if ( _preMeshInfo ) @@ -2159,10 +2159,10 @@ void SMESH_Mesh_i::ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom) _gen_i->UpdateIcons( SMESH::SMESH_Mesh_var( _this() )); } - TPythonDump(_gen_i) << "SHAPERSTUDY.breakLinkForSubElements(salome.ObjectToSObject(" + TPythonDump() << "SHAPERSTUDY.breakLinkForSubElements(salome.ObjectToSObject(" << me <<".GetMesh()), " << entry.in() << ")"; - TPythonDump(_gen_i)<< me << ".ReplaceShape( " << entry.in() << " )"; + TPythonDump() << me << ".ReplaceShape( " << entry.in() << " )"; } @@ -2350,7 +2350,7 @@ void SMESH_Mesh_i::CheckGeomModif( bool theIsBreakLink ) SMESH::SMESH_Mesh_var me = _this(); GEOM::GEOM_Object_var mainGO = GetShapeToMesh(); - TPythonDump dumpNothing(_gen_i); // prevent any dump + TPythonDump dumpNothing; // prevent any dump //bool removedFromClient = false; @@ -3055,7 +3055,7 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::ConvertToStandalone( SMESH::SMESH_GroupBase SALOMEDS::StudyBuilder_var builder; SALOMEDS::SObject_wrap aGroupSO; - SALOMEDS::Study_var aStudy = _gen_i->getStudyServant(); + SALOMEDS::Study_var aStudy = SMESH_Gen_i::GetSMESHGen()->getStudyServant(); if ( !aStudy->_is_nil() ) { builder = aStudy->NewBuilder(); aGroupSO = _gen_i->ObjectToSObject( theGroup ); @@ -3070,7 +3070,7 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::ConvertToStandalone( SMESH::SMESH_GroupBase builder->RemoveObject( so ); } // Update Python script - TPythonDump(_gen_i) << aGroupSO << " = " << SMESH::SMESH_Mesh_var(_this()) + TPythonDump() << aGroupSO << " = " << SMESH::SMESH_Mesh_var(_this()) << ".ConvertToStandalone( " << aGroupSO << " )"; // change icon of Group on Filter @@ -3510,7 +3510,7 @@ SMESH::SMESH_MeshEditor_ptr SMESH_Mesh_i::GetMeshEditor() aMeshEdVar = _editor->_this(); // Update Python script - TPythonDump(_gen_i) << _editor << " = " + TPythonDump() << _editor << " = " << SMESH::SMESH_Mesh_var(_this()) << ".GetMeshEditor()"; SMESH_CATCH( SMESH::throwCorbaException ); @@ -3601,7 +3601,7 @@ void SMESH_Mesh_i::SetAutoColor(CORBA::Boolean theAutoColor) Unexpect aCatch(SALOME_SalomeException); _impl->SetAutoColor(theAutoColor); - TPythonDump pyDump(_gen_i); // not to dump group->SetColor() from below code + TPythonDump pyDump; // not to dump group->SetColor() from below code pyDump << SMESH::SMESH_Mesh_var(_this()) <<".SetAutoColor( "< aReservedColors; @@ -3693,7 +3693,7 @@ string SMESH_Mesh_i::prepareMeshNameAndGroups(const char* file, // Perform Export PrepareForWriting(file, overwrite); string aMeshName = "Mesh"; - SALOMEDS::Study_var aStudy = _gen_i->getStudyServant(); + SALOMEDS::Study_var aStudy = SMESH_Gen_i::GetSMESHGen()->getStudyServant(); if ( !aStudy->_is_nil() ) { SALOMEDS::SObject_wrap aMeshSO = _gen_i->ObjectToSObject( _this() ); if ( !aMeshSO->_is_nil() ) { @@ -3717,7 +3717,7 @@ string SMESH_Mesh_i::prepareMeshNameAndGroups(const char* file, } // Update Python script // set name of mesh before export - TPythonDump(_gen_i) << _gen_i << ".SetName(" + TPythonDump() << _gen_i << ".SetName(" << SMESH::SMESH_Mesh_var(_this()) << ", '" << aMeshName.c_str() << "')"; // check names of groups @@ -3746,7 +3746,7 @@ void SMESH_Mesh_i::ExportMED(const char* file, string aMeshName = prepareMeshNameAndGroups(file, overwrite); _impl->ExportMED( file, aMeshName.c_str(), auto_groups, version, 0, autoDimension ); - TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".ExportMED( r'" + TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportMED( r'" << file << "', " << "auto_groups=" <FullLoadFromFile(); string aMeshName = prepareMeshNameAndGroups(file, true); - TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var( _this()) + TPythonDump() << SMESH::SMESH_Mesh_var( _this()) << ".ExportSAUV( r'" << file << "', " << auto_groups << " )"; _impl->ExportSAUV(file, aMeshName.c_str(), auto_groups); } @@ -3792,7 +3792,7 @@ void SMESH_Mesh_i::ExportDAT (const char *file) // Update Python script // check names of groups checkGroupNames(); - TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".ExportDAT( r'" << file << "' )"; + TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportDAT( r'" << file << "' )"; // Perform Export PrepareForWriting(file); @@ -3814,7 +3814,7 @@ void SMESH_Mesh_i::ExportUNV (const char *file) // Update Python script // check names of groups checkGroupNames(); - TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".ExportUNV( r'" << file << "' )"; + TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportUNV( r'" << file << "' )"; // Perform Export PrepareForWriting(file); @@ -3836,7 +3836,7 @@ void SMESH_Mesh_i::ExportSTL (const char *file, const bool isascii) // Update Python script // check names of groups checkGroupNames(); - TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) + TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportSTL( r'" << file << "', " << isascii << " )"; CORBA::String_var name; @@ -3956,7 +3956,7 @@ void SMESH_Mesh_i::ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart, GEOM::GEOM_BaseObject_var gbo = GEOM::GEOM_BaseObject::_narrow( fields[i] ); goList[i] = gbo; } - TPythonDump(_gen_i) << _this() << ".ExportPartToMED( " + TPythonDump() << _this() << ".ExportPartToMED( " << meshPart << ", r'" << file << "', " << auto_groups << ", " @@ -4258,7 +4258,7 @@ void SMESH_Mesh_i::ExportPartToDAT(::SMESH::SMESH_IDSource_ptr meshPart, SMESH_MeshPartDS partDS( meshPart ); _impl->ExportDAT(file,&partDS); - TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) + TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportPartToDAT( " << meshPart << ", r'" << file << "' )"; } //================================================================================ @@ -4279,7 +4279,7 @@ void SMESH_Mesh_i::ExportPartToUNV(::SMESH::SMESH_IDSource_ptr meshPart, SMESH_MeshPartDS partDS( meshPart ); _impl->ExportUNV(file, &partDS); - TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) + TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportPartToUNV( " << meshPart<< ", r'" << file << "' )"; } //================================================================================ @@ -4306,7 +4306,7 @@ void SMESH_Mesh_i::ExportPartToSTL(::SMESH::SMESH_IDSource_ptr meshPart, SMESH_MeshPartDS partDS( meshPart ); _impl->ExportSTL( file, isascii, name.in(), &partDS ); - TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".ExportPartToSTL( " + TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportPartToSTL( " << meshPart<< ", r'" << file << "', " << isascii << ")"; } @@ -4342,7 +4342,7 @@ void SMESH_Mesh_i::ExportCGNS(::SMESH::SMESH_IDSource_ptr meshPart, SMESH_CATCH( SMESH::throwCorbaException ); - TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".ExportCGNS( " + TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportCGNS( " << meshPart<< ", r'" << file << "', " << overwrite << ")"; #else THROW_SALOME_CORBA_EXCEPTION("CGNS library is unavailable", SALOME::INTERNAL_ERROR); @@ -4368,7 +4368,7 @@ void SMESH_Mesh_i::ExportGMF(::SMESH::SMESH_IDSource_ptr meshPart, SMESH_MeshPartDS partDS( meshPart ); _impl->ExportGMF(file, &partDS, withRequiredGroups); - TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".ExportGMF( " + TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportGMF( " << meshPart<< ", r'" << file << "', " << withRequiredGroups << ")"; @@ -5786,7 +5786,7 @@ void SMESH_Mesh_i::CreateGroupServants() set::iterator it = addedIDs.find( i_grp->first ); if ( it != addedIDs.end() ) { - TPythonDump(_gen_i) << i_grp->second << " = " << aMesh << ".GetGroups()[ "<< index << " ]"; + TPythonDump() << i_grp->second << " = " << aMesh << ".GetGroups()[ "<< index << " ]"; addedIDs.erase( it ); if ( addedIDs.empty() ) break; @@ -5904,7 +5904,7 @@ void SMESH_Mesh_i::checkGroupNames() // avoid dump of "GetGroups" { // store python dump into a local variable inside local scope - SMESH::TPythonDump pDump(_gen_i); // do not delete this line of code + SMESH::TPythonDump pDump; // do not delete this line of code grpList = GetGroups(); } @@ -5955,7 +5955,7 @@ SMESH::string_array* SMESH_Mesh_i::GetLastParameters() SMESH_Gen_i *gen = SMESH_Gen_i::GetSMESHGen(); if(gen) { CORBA::String_var aParameters = GetParameters(); - SALOMEDS::ListOfListOfStrings_var aSections = _gen_i->getStudyServant()->ParseVariables(aParameters); + SALOMEDS::ListOfListOfStrings_var aSections = SMESH_Gen_i::GetSMESHGen()->getStudyServant()->ParseVariables(aParameters); if ( aSections->length() > 0 ) { SALOMEDS::ListOfStrings aVars = aSections[ aSections->length() - 1 ]; aResult->length( aVars.length() ); @@ -6824,7 +6824,7 @@ TListOfListOfInt SMESH_Mesh_i::findConcurrentSubMeshes() bool res = false; ::SMESH_Mesh& mesh = GetImpl(); - TPythonDump aPythonDump(_gen_i); // prevent dump of called methods + TPythonDump aPythonDump; // prevent dump of called methods aPythonDump << "isDone = " << SMESH::SMESH_Mesh_var(_this()) << ".SetMeshOrder( [ "; TListOfListOfInt subMeshOrder; @@ -6886,7 +6886,7 @@ void SMESH_Mesh_i::convertMeshOrder (const TListOfListOfInt& theIdsOrder, const bool theIsDump) { int nbSet = theIdsOrder.size(); - TPythonDump aPythonDump(_gen_i); // prevent dump of called methods + TPythonDump aPythonDump; // prevent dump of called methods if ( theIsDump ) aPythonDump << "[ "; theResOrder.length(nbSet);