Salome HOME
Debug PHASE_17_Part1_V3
authorouv <ouv@opencascade.com>
Fri, 11 Dec 2009 13:43:46 +0000 (13:43 +0000)
committerouv <ouv@opencascade.com>
Fri, 11 Dec 2009 13:43:46 +0000 (13:43 +0000)
17 files changed:
src/SMESH/SMESH_Mesh.cxx
src/SMESH/SMESH_Mesh.hxx
src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx
src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx
src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx
src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx
src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx
src/SMESHGUI/SMESHGUI_NodesDlg.cxx
src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx
src/SMESHGUI/SMESHGUI_RotationDlg.cxx
src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx
src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx
src/SMESHGUI/SMESHGUI_TranslationDlg.cxx
src/SMESH_I/SMESH_Gen_i_1.cxx
src/SMESH_I/SMESH_Mesh_i.cxx

index 67d78b4e683574b0f6bd43cf9db7e93cb6981126..3e7539353ad40cd29034809f7022f1c1f44a26b6 100644 (file)
@@ -1580,3 +1580,20 @@ SMESH_Group* SMESH_Mesh::ConvertToStandalone ( int theGroupID )
   return aGroup;
 }
 
   return aGroup;
 }
 
+//=======================================================================
+//function : SetParameters
+//purpose  : 
+//=======================================================================
+void SMESH_Mesh::SetParameters(const std::list<std::string>& theParameters)
+{
+  _parameters = theParameters;
+}
+
+//=======================================================================
+//function : GetParameters
+//purpose  : 
+//=======================================================================
+std::list<std::string> SMESH_Mesh::GetParameters() const
+{
+  return _parameters;
+}
index 26339eb0957ef7b9a995822425ea49bd467462b1..313fbad50d58934ff3be93990d0c3f41d84efed7 100644 (file)
@@ -248,6 +248,9 @@ public:
 
   SMDSAbs_ElementType GetElementType( const int id, const bool iselem );
 
 
   SMDSAbs_ElementType GetElementType( const int id, const bool iselem );
 
+  void SetParameters(const std::list<std::string>& theParameters);
+  std::list<std::string> GetParameters() const;
+
   //
   
   ostream& Dump(ostream & save);
   //
   
   ostream& Dump(ostream & save);
@@ -274,6 +277,9 @@ protected:
   
   TopTools_IndexedDataMapOfShapeListOfShape _mapAncestors;
 
   
   TopTools_IndexedDataMapOfShapeListOfShape _mapAncestors;
 
+private:
+  std::list<std::string>     _parameters;
+
 protected:
   SMESH_Mesh() {};
   SMESH_Mesh(const SMESH_Mesh&) {};
 protected:
   SMESH_Mesh() {};
   SMESH_Mesh(const SMESH_Mesh&) {};
index 7a4a553684292a683a6241e4c98e7d25d1501ba6..13535fe369f42b5d74e628fec49bb26790b6bdfb 100644 (file)
@@ -39,6 +39,7 @@
 #include <SUIT_MessageBox.h>
 #include <SUIT_ResourceMgr.h>
 #include <SalomeApp_Study.h>
 #include <SUIT_MessageBox.h>
 #include <SUIT_ResourceMgr.h>
 #include <SalomeApp_Study.h>
+#include <SalomeApp_Notebook.h>
 #include <SUIT_OverrideCursor.h>
 
 #include <LightApp_Application.h>
 #include <SUIT_OverrideCursor.h>
 
 #include <LightApp_Application.h>
@@ -293,8 +294,6 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
   SMESH::SMESH_Mesh_var aCompoundMesh;
 
   if (!myMesh->_is_nil()) {
   SMESH::SMESH_Mesh_var aCompoundMesh;
 
   if (!myMesh->_is_nil()) {
-    QStringList aParameters;
-    aParameters << (CheckBoxMerge->isChecked() ? SpinBoxTol->text() : QString(" "));
     try {
       SUIT_OverrideCursor aWaitCursor;
 
     try {
       SUIT_OverrideCursor aWaitCursor;
 
@@ -311,7 +310,8 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
                                                CheckBoxMerge->isChecked(), 
                                                SpinBoxTol->GetValue());
      
                                                CheckBoxMerge->isChecked(), 
                                                SpinBoxTol->GetValue());
      
-      //asl: aCompoundMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+      if( CheckBoxMerge->isChecked() )
+        getNotebook()->setParameters( aCompoundMesh, 1, SpinBoxTol );
 
       SMESH::SetName( SMESH::FindSObject( aCompoundMesh ), LineEditName->text() );
       mySMESHGUI->updateObjBrowser();
 
       SMESH::SetName( SMESH::FindSObject( aCompoundMesh ), LineEditName->text() );
       mySMESHGUI->updateObjBrowser();
index 883071d4f1fe3a4026e60158af3d009a844c6f3c..0da6cb99a8fc4ce7ef1fb8873ebc2eac2bd27793 100644 (file)
@@ -54,6 +54,8 @@
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 
+#include <SalomeApp_Notebook.h>
+
 #include <SVTK_ViewWindow.h>
 
 // OCCT includes
 #include <SVTK_ViewWindow.h>
 
 // OCCT includes
@@ -621,8 +623,8 @@ bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply()
     }
 
 
     }
 
 
-    //asl: if( retVal == SMESH::SMESH_MeshEditor::EXTR_OK )
-      //asl: myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+    if( retVal == SMESH::SMESH_MeshEditor::EXTR_OK )
+      getNotebook()->setParameters( myMesh, aParameters );
 
     //wc.stop();
     wc.suspend();
 
     //wc.stop();
     wc.suspend();
index d37a1ca89d3c82b3df562762a086053010e8e215..00fdf42e3cc540e0ddff8d3ad44eb3a01ca5035f 100644 (file)
@@ -53,6 +53,7 @@
 #include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
 
 #include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
 
+#include <SalomeApp_Notebook.h>
 #include <SalomeApp_IntSpinBox.h>
 
 // OCCT includes
 #include <SalomeApp_IntSpinBox.h>
 
 // OCCT includes
@@ -559,7 +560,7 @@ bool SMESHGUI_ExtrusionDlg::ClickOnApply()
           aMeshEditor->ExtrusionSweep(myElementsId.inout(), aVector, aNbSteps);
       }
 
           aMeshEditor->ExtrusionSweep(myElementsId.inout(), aVector, aNbSteps);
       }
 
-      //asl: myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+      getNotebook()->setParameters( myMesh, aParameters );
 
     } catch (...) {
     }
 
     } catch (...) {
     }
index 3c262d28a59e4e9e46878eb2173be7d9b2534002..d9ed467f174fb78f704893c8fce2cfabef1acd2c 100644 (file)
@@ -46,6 +46,7 @@
 #include <SALOME_ListIO.hxx>
 #include <SUIT_Desktop.h>
 #include <SVTK_ViewModel.h>
 #include <SALOME_ListIO.hxx>
 #include <SUIT_Desktop.h>
 #include <SVTK_ViewModel.h>
+#include <SalomeApp_Notebook.h>
 #include <SalomeApp_Tools.h>
 #include <SalomeApp_TypeFilter.h>
 #include <SUIT_ResourceMgr.h>
 #include <SalomeApp_Tools.h>
 #include <SalomeApp_TypeFilter.h>
 #include <SUIT_ResourceMgr.h>
@@ -410,11 +411,7 @@ bool SMESHGUI_MakeNodeAtPointOp::onApply()
     }
     if (aResult)
     {
     }
     if (aResult)
     {
-      QStringList aParameters;
-      aParameters << myDlg->myX->text();
-      aParameters << myDlg->myY->text();
-      aParameters << myDlg->myZ->text();
-      //asl: aMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+      getNotebook()->setParameters( aMesh, 3, myDlg->myX, myDlg->myY, myDlg->myZ );
 
       myDlg->myId->setText("");
 
 
       myDlg->myId->setText("");
 
index 61bb79ad9a1d85632eb3f29b2b86b6f8e866bae9..e572b7dc2561fdf7670908fd7f4cb55fcd5d9b09 100755 (executable)
@@ -49,6 +49,7 @@
 #include <SUIT_MessageBox.h>
 
 #include <LightApp_SelectionMgr.h>
 #include <SUIT_MessageBox.h>
 
 #include <LightApp_SelectionMgr.h>
+#include <SalomeApp_Notebook.h>
 #include <SalomeApp_Tools.h>
 #include <LightApp_Application.h>
 #include <SalomeApp_IntSpinBox.h>
 #include <SalomeApp_Tools.h>
 #include <LightApp_Application.h>
 #include <SalomeApp_IntSpinBox.h>
@@ -475,7 +476,7 @@ bool SMESHGUI_MeshPatternDlg::onApply()
       aParameters << myNode1->text();
       if(myType == Type_3d )
         aParameters << myNode2->text();
       aParameters << myNode1->text();
       if(myType == Type_3d )
         aParameters << myNode2->text();
-      //asl: myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+      getNotebook()->setParameters( myMesh, aParameters );
 
     } else { // Applying a pattern to geometrical object
       if (myType == Type_2d)
 
     } else { // Applying a pattern to geometrical object
       if (myType == Type_2d)
index 1d71b4208e7f08187b41b78d1de011d0c01b7885..8883b386c7d3e128972f15fb5138495e8c036483 100644 (file)
@@ -39,6 +39,7 @@
 // SALOME GUI includes
 #include <LightApp_SelectionMgr.h>
 #include <LightApp_Application.h>
 // SALOME GUI includes
 #include <LightApp_SelectionMgr.h>
 #include <LightApp_Application.h>
+#include <SalomeApp_Notebook.h>
 #include <SUIT_ResourceMgr.h>
 #include <SUIT_Desktop.h>
 #include <SUIT_Session.h>
 #include <SUIT_ResourceMgr.h>
 #include <SUIT_Desktop.h>
 #include <SUIT_Session.h>
@@ -326,12 +327,7 @@ bool SMESHGUI_MoveNodesDlg::onApply()
   bool aResult = false;
   try {
     aResult = aMeshEditor->MoveNode(anId, myX->GetValue(), myY->GetValue(), myZ->GetValue());
   bool aResult = false;
   try {
     aResult = aMeshEditor->MoveNode(anId, myX->GetValue(), myY->GetValue(), myZ->GetValue());
-
-    QStringList aParameters;
-    aParameters << myX->text();
-    aParameters << myY->text();
-    aParameters << myZ->text();
-    //asl: aMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+    getNotebook()->setParameters( aMesh, 3, myX, myY, myZ );
   } catch (...) {
   }
 
   } catch (...) {
   }
 
index f99522b8f5a9cd10eb103a35182228bb07726339..6124ab4d70afc736a3776932d82cfff89c580ba6 100755 (executable)
@@ -46,6 +46,7 @@
 
 #include <LightApp_SelectionMgr.h>
 #include <LightApp_Application.h>
 
 #include <LightApp_SelectionMgr.h>
 #include <LightApp_Application.h>
+#include <SalomeApp_Notebook.h>
 #include <SALOME_ListIO.hxx>
 #include <SALOME_ListIteratorOfListIO.hxx>
 
 #include <SALOME_ListIO.hxx>
 #include <SALOME_ListIteratorOfListIO.hxx>
 
@@ -1184,9 +1185,7 @@ bool SMESHGUI_UnionOfTrianglesDlg::process (SMESH::SMESH_MeshEditor_ptr theEdito
   double aMaxAngle = myMaxAngleSpin->GetValue() * PI / 180.0;
   bool ok = theEditor->TriToQuad(theIds, aCriterion, aMaxAngle);
   if( ok ) {
   double aMaxAngle = myMaxAngleSpin->GetValue() * PI / 180.0;
   bool ok = theEditor->TriToQuad(theIds, aCriterion, aMaxAngle);
   if( ok ) {
-    QStringList aParameters;
-    aParameters << myMaxAngleSpin->text();
-    //asl: myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+    getNotebook()->setParameters( myMesh, 1, myMaxAngleSpin );
   }
   return ok;
 }
   }
   return ok;
 }
index 14479191292f79f2d5739754f96f7dd71b27549f..2300c93eba09d656105c52a7b823ee2b5a34fde3 100644 (file)
@@ -49,6 +49,8 @@
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 
+#include <SalomeApp_Notebook.h>
+
 #include <SVTK_ViewWindow.h>
 #include <VTKViewer_Algorithm.h>
 #include <VTKViewer_CellLocationsArray.h>
 #include <SVTK_ViewWindow.h>
 #include <VTKViewer_Algorithm.h>
 #include <VTKViewer_CellLocationsArray.h>
 
 namespace SMESH
 {
 
 namespace SMESH
 {
-  void AddNode( SMESH::SMESH_Mesh_ptr theMesh, float x, float y, float z, const QStringList& theParameters )
+  void AddNode( SMESH::SMESH_Mesh_ptr theMesh, float x, float y, float z,
+                SalomeApp_Notebook* theNotebook, const QStringList& theParameters )
   {
     SUIT_OverrideCursor wc;
     try {
       _PTR(SObject) aSobj = SMESH::FindSObject( theMesh );
       SMESH::SMESH_MeshEditor_var aMeshEditor = theMesh->GetMeshEditor();
       aMeshEditor->AddNode( x, y, z );
   {
     SUIT_OverrideCursor wc;
     try {
       _PTR(SObject) aSobj = SMESH::FindSObject( theMesh );
       SMESH::SMESH_MeshEditor_var aMeshEditor = theMesh->GetMeshEditor();
       aMeshEditor->AddNode( x, y, z );
-      //asl: theMesh->SetParameters( theParameters.join(":").toLatin1().constData() );
+      theNotebook->setParameters( theMesh, theParameters );
       _PTR(Study) aStudy = GetActiveStudyDocument();
       CORBA::Long anId = aStudy->StudyId();
       if (TVisualObjPtr aVisualObj = SMESH::GetVisualObj( anId, aSobj->GetID().c_str() ) ) {
       _PTR(Study) aStudy = GetActiveStudyDocument();
       CORBA::Long anId = aStudy->StudyId();
       if (TVisualObjPtr aVisualObj = SMESH::GetVisualObj( anId, aSobj->GetID().c_str() ) ) {
@@ -417,7 +420,7 @@ bool SMESHGUI_NodesDlg::ClickOnApply()
   aParameters << SpinBox_Z->text();
 
   mySimulation->SetVisibility( false );
   aParameters << SpinBox_Z->text();
 
   mySimulation->SetVisibility( false );
-  SMESH::AddNode( myMesh, x, y, z, aParameters );
+  SMESH::AddNode( myMesh, x, y, z, getNotebook(), aParameters );
   SMESH::SetPointRepresentation( true );
 
   // select myMesh
   SMESH::SetPointRepresentation( true );
 
   // select myMesh
index 0b73a2d99e55d9cd647898c84a4e07c71a634dc5..557619a8555f8007f6bbf809aff28510de9eaeec 100644 (file)
@@ -50,6 +50,7 @@
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 #include <SalomeApp_Application.h>
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 #include <SalomeApp_Application.h>
+#include <SalomeApp_Notebook.h>
 #include <SalomeApp_IntSpinBox.h>
 
 #include <SVTK_ViewWindow.h>
 #include <SalomeApp_IntSpinBox.h>
 
 #include <SVTK_ViewWindow.h>
@@ -503,17 +504,6 @@ bool SMESHGUI_RevolutionDlg::ClickOnApply()
     if ( GroupAngle->checkedId() == 1 )
       anAngle = anAngle/aNbSteps;
 
     if ( GroupAngle->checkedId() == 1 )
       anAngle = anAngle/aNbSteps;
 
-    QStringList aParameters;
-    aParameters << SpinBox_X->text();
-    aParameters << SpinBox_Y->text();
-    aParameters << SpinBox_Z->text();
-    aParameters << SpinBox_DX->text();
-    aParameters << SpinBox_DY->text();
-    aParameters << SpinBox_DZ->text();
-    aParameters << SpinBox_Angle->text();
-    aParameters << SpinBox_NbSteps->text();
-    aParameters << SpinBox_Tolerance->text();
-
     try {
       SUIT_OverrideCursor aWaitCursor;
       SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
     try {
       SUIT_OverrideCursor aWaitCursor;
       SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
@@ -545,7 +535,10 @@ bool SMESHGUI_RevolutionDlg::ClickOnApply()
           aMeshEditor->RotationSweep(anElementsId.inout(), anAxis, anAngle, aNbSteps, aTolerance);
       }
 
           aMeshEditor->RotationSweep(anElementsId.inout(), anAxis, anAngle, aNbSteps, aTolerance);
       }
 
-      //asl: myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+      getNotebook()->setParameters( myMesh, 9,
+                                    SpinBox_X, SpinBox_Y, SpinBox_Z,
+                                    SpinBox_DX, SpinBox_DY, SpinBox_DZ,
+                                    SpinBox_Angle, SpinBox_NbSteps, SpinBox_Tolerance );
     } catch (...) {
     }
 
     } catch (...) {
     }
 
index 0fe1d28a8286ac66387e46554b26afe4e1e59a3d..2a08cf5b02e5d3e7dd6e1ccca40d902ccad3a3bc 100644 (file)
@@ -49,6 +49,8 @@
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 
+#include <SalomeApp_Notebook.h>
+
 #include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
 #include <SALOME_ListIO.hxx>
 #include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
 #include <SALOME_ListIO.hxx>
@@ -415,8 +417,8 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
           aMeshEditor->RotateObject(mySelectedObject, anAxis, anAngle, false);
         else
             aMeshEditor->Rotate(anElementsId, anAxis, anAngle, false);
           aMeshEditor->RotateObject(mySelectedObject, anAxis, anAngle, false);
         else
             aMeshEditor->Rotate(anElementsId, anAxis, anAngle, false);
-        //asl: if( !myMesh->_is_nil())
-          //asl: myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+        if( !myMesh->_is_nil())
+          getNotebook()->setParameters( myMesh, aParameters );
         break;
       case COPY_ELEMS_BUTTON:
         if ( makeGroups ) {
         break;
       case COPY_ELEMS_BUTTON:
         if ( makeGroups ) {
@@ -432,8 +434,8 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
           else 
             aMeshEditor->Rotate(anElementsId, anAxis, anAngle, true);
         }
           else 
             aMeshEditor->Rotate(anElementsId, anAxis, anAngle, true);
         }
-        //asl: if( !myMesh->_is_nil())
-          //asl: myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+        if( !myMesh->_is_nil())
+          getNotebook()->setParameters( myMesh, aParameters );
         break;
       case MAKE_MESH_BUTTON:
         SMESH::SMESH_Mesh_var mesh;
         break;
       case MAKE_MESH_BUTTON:
         SMESH::SMESH_Mesh_var mesh;
@@ -443,8 +445,8 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
         else 
           mesh = aMeshEditor->RotateMakeMesh(anElementsId, anAxis, anAngle, makeGroups,
                                              LineEditNewMesh->text().toLatin1().data());
         else 
           mesh = aMeshEditor->RotateMakeMesh(anElementsId, anAxis, anAngle, makeGroups,
                                              LineEditNewMesh->text().toLatin1().data());
-        //asl: if( !mesh->_is_nil())
-          //asl: mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+        if( !mesh->_is_nil())
+          getNotebook()->setParameters( mesh, aParameters );
       }
     } catch (...) {
     }
       }
     } catch (...) {
     }
index 1f5bd1e041964188872e4aab0fc84f7ceccb7585..224faca60414cfa2b3d2e8e738b17637ae51ac11 100644 (file)
@@ -50,6 +50,7 @@
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 
+#include <SalomeApp_Notebook.h>
 #include <SalomeApp_IntSpinBox.h>
 
 #include <SVTK_ViewModel.h>
 #include <SalomeApp_IntSpinBox.h>
 
 #include <SVTK_ViewModel.h>
@@ -351,10 +352,6 @@ bool SMESHGUI_SmoothingDlg::ClickOnApply()
     long anIterationLimit = (long)SpinBox_IterationLimit->value();
     double aMaxAspectRatio = SpinBox_AspectRatio->GetValue();
 
     long anIterationLimit = (long)SpinBox_IterationLimit->value();
     double aMaxAspectRatio = SpinBox_AspectRatio->GetValue();
 
-    QStringList aParameters;
-    aParameters << SpinBox_IterationLimit->text();
-    aParameters << SpinBox_AspectRatio->text();
-
     SMESH::SMESH_MeshEditor::Smooth_Method aMethod = SMESH::SMESH_MeshEditor::LAPLACIAN_SMOOTH;
     if (ComboBoxMethod->currentIndex() > 0)
       aMethod =  SMESH::SMESH_MeshEditor::CENTROIDAL_SMOOTH;
     SMESH::SMESH_MeshEditor::Smooth_Method aMethod = SMESH::SMESH_MeshEditor::LAPLACIAN_SMOOTH;
     if (ComboBoxMethod->currentIndex() > 0)
       aMethod =  SMESH::SMESH_MeshEditor::CENTROIDAL_SMOOTH;
@@ -381,7 +378,7 @@ bool SMESHGUI_SmoothingDlg::ClickOnApply()
                                         anIterationLimit, aMaxAspectRatio, aMethod);
       }
 
                                         anIterationLimit, aMaxAspectRatio, aMethod);
       }
 
-      //asl: myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+      getNotebook()->setParameters( myMesh, 2, SpinBox_IterationLimit, SpinBox_AspectRatio );
 
     } catch (...) {
     }
 
     } catch (...) {
     }
index f611e81407efe78e9887deec4bab7ee2914a7e42..41f68875a296a04e59ed02aee3963adef23d9ef5 100644 (file)
@@ -49,6 +49,8 @@
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 
+#include <SalomeApp_Notebook.h>
+
 #include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
 #include <SALOME_ListIO.hxx>
 #include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
 #include <SALOME_ListIO.hxx>
@@ -500,8 +502,8 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply()
         else
           aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, false );
         
         else
           aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, false );
         
-        //asl: if( !myMesh->_is_nil())
-          //asl: myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+        if( !myMesh->_is_nil())
+          getNotebook()->setParameters( myMesh, aParameters );
         break;
       }
       case COPY_ELEMS_BUTTON: {
         break;
       }
       case COPY_ELEMS_BUTTON: {
@@ -518,8 +520,8 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply()
           else
             aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, true);
         }
           else
             aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, true);
         }
-        //asl: if( !myMesh->_is_nil())
-          //asl: myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+        if( !myMesh->_is_nil())
+          getNotebook()->setParameters( myMesh, aParameters );
         break;
         }
       case MAKE_MESH_BUTTON: {
         break;
         }
       case MAKE_MESH_BUTTON: {
@@ -530,8 +532,8 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply()
         else
           mesh = aMeshEditor->MirrorMakeMesh(anElementsId, aMirror, aMirrorType, makeGroups,
                                              LineEditNewMesh->text().toLatin1().data());
         else
           mesh = aMeshEditor->MirrorMakeMesh(anElementsId, aMirror, aMirrorType, makeGroups,
                                              LineEditNewMesh->text().toLatin1().data());
-        //asl: if( !mesh->_is_nil())
-          //asl: mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+        if( !mesh->_is_nil())
+          getNotebook()->setParameters( mesh, aParameters );
         break;
       }
       }
         break;
       }
       }
index 74c5720df39e27bcd90b615da976d2539968665c..6eb20f052872564298c75883fa0f3f9173b07208 100644 (file)
@@ -49,6 +49,8 @@
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 
+#include <SalomeApp_Notebook.h>
+
 #include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
 #include <SALOME_ListIO.hxx>
 #include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
 #include <SALOME_ListIO.hxx>
@@ -488,8 +490,8 @@ bool SMESHGUI_TranslationDlg::ClickOnApply()
           aMeshEditor->TranslateObject(mySelectedObject, aVector, false);
         else
           aMeshEditor->Translate(anElementsId, aVector, false);
           aMeshEditor->TranslateObject(mySelectedObject, aVector, false);
         else
           aMeshEditor->Translate(anElementsId, aVector, false);
-        //asl: if( !myMesh->_is_nil())
-          //asl: myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+        if( !myMesh->_is_nil())
+          getNotebook()->setParameters( myMesh, aParameters );
         break;
       case COPY_ELEMS_BUTTON:
         if ( makeGroups ) {
         break;
       case COPY_ELEMS_BUTTON:
         if ( makeGroups ) {
@@ -505,8 +507,8 @@ bool SMESHGUI_TranslationDlg::ClickOnApply()
           else
             aMeshEditor->Translate(anElementsId, aVector, true);
         }
           else
             aMeshEditor->Translate(anElementsId, aVector, true);
         }
-        //asl: if( !myMesh->_is_nil())
-          //asl: myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+        if( !myMesh->_is_nil())
+          getNotebook()->setParameters( myMesh, aParameters );
         break;
       case MAKE_MESH_BUTTON:
         SMESH::SMESH_Mesh_var mesh; 
         break;
       case MAKE_MESH_BUTTON:
         SMESH::SMESH_Mesh_var mesh; 
@@ -516,8 +518,8 @@ bool SMESHGUI_TranslationDlg::ClickOnApply()
         else
           mesh = aMeshEditor->TranslateMakeMesh(anElementsId, aVector, makeGroups,
                                                 LineEditNewMesh->text().toLatin1().data());
         else
           mesh = aMeshEditor->TranslateMakeMesh(anElementsId, aVector, makeGroups,
                                                 LineEditNewMesh->text().toLatin1().data());
-        //asl: if( !mesh->_is_nil())
-          //asl: mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+        if( !mesh->_is_nil())
+          getNotebook()->setParameters( mesh, aParameters );
       }
     } catch (...) {
     }
       }
     } catch (...) {
     }
index c3123b3f5a79293b2f7b5fd0c563799bbdb73615..2441aa14c69c31f570f5d1778631f8d3435121a0 100644 (file)
@@ -560,6 +560,10 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SALOMEDS::Study_ptr   theStudy,
     }
   }
 
     }
   }
 
+  // Update string attribute (to display used variables)
+  if( SMESH_Mesh_i* aServant = dynamic_cast<SMESH_Mesh_i*>( GetServant( theMesh ).in() ) )
+    aServant->UpdateStringAttribute();
+
   if(MYDEBUG) MESSAGE("PublishMesh_END");
   return aMeshSO._retn();
 }
   if(MYDEBUG) MESSAGE("PublishMesh_END");
   return aMeshSO._retn();
 }
@@ -749,6 +753,7 @@ SALOMEDS::SObject_ptr
     SetName( aHypSO, theName, aHypName );
   }
 
     SetName( aHypSO, theName, aHypName );
   }
 
+  // Update string attribute (to display used variables)
   if( SMESH_Hypothesis_i* aServant = dynamic_cast<SMESH_Hypothesis_i*>( GetServant( theHyp ).in() ) )
     aServant->UpdateStringAttribute();
 
   if( SMESH_Hypothesis_i* aServant = dynamic_cast<SMESH_Hypothesis_i*>( GetServant( theHyp ).in() ) )
     aServant->UpdateStringAttribute();
 
index 643492dc1a1a367afeea10775de5ab0ab5b6a7cd..66a53a4bcc6ec0461cc692e213e243df862c92dd 100644 (file)
@@ -3385,7 +3385,9 @@ void SMESH_Mesh_i::checkGroupNames()
 //=============================================================================
 char* SMESH_Mesh_i::GetEntry()
 {
 //=============================================================================
 char* SMESH_Mesh_i::GetEntry()
 {
-  return NULL;
+  char aBuf[100];
+  sprintf( aBuf, "%i", GetId() );
+  return CORBA::string_dup( aBuf );
 }
 
 //=============================================================================
 }
 
 //=============================================================================
@@ -3415,6 +3417,21 @@ CORBA::Boolean SMESH_Mesh_i::IsValid()
 //=============================================================================
 void SMESH_Mesh_i::SetParameters( SALOME::Notebook_ptr theNotebook, const SALOME::StringArray& theParameters )
 {
 //=============================================================================
 void SMESH_Mesh_i::SetParameters( SALOME::Notebook_ptr theNotebook, const SALOME::StringArray& theParameters )
 {
+  theNotebook->ClearDependencies( _this(), SALOME::Parameters );
+  std::list<std::string> aParams;
+  int n = theParameters.length();
+  for( int i=0; i<n; i++ )
+  {
+    std::string aParam = CORBA::string_dup( theParameters[i] );
+    aParams.push_back( aParam );
+    
+    SALOME::Parameter_ptr aParamPtr = theNotebook->GetParameter( aParam.c_str() );
+    if( !CORBA::is_nil( aParamPtr ) )
+      theNotebook->AddDependency( _this(), aParamPtr );
+  }
+  _impl->SetParameters( aParams );
+
+  UpdateStringAttribute();
 }
 
 //=============================================================================
 }
 
 //=============================================================================
@@ -3424,7 +3441,13 @@ void SMESH_Mesh_i::SetParameters( SALOME::Notebook_ptr theNotebook, const SALOME
 //=============================================================================
 SALOME::StringArray* SMESH_Mesh_i::GetParameters()
 {
 //=============================================================================
 SALOME::StringArray* SMESH_Mesh_i::GetParameters()
 {
-  return NULL;
+  std::list<std::string> aParams = _impl->GetParameters();
+  SALOME::StringArray_var aRes = new SALOME::StringArray();
+  aRes->length( aParams.size() );
+  std::list<std::string>::const_iterator it = aParams.begin(), last = aParams.end();
+  for( int i=0; it!=last; it++, i++ )
+    aRes[i] = CORBA::string_dup( it->c_str() );
+  return aRes._retn();
 }
 
 //=============================================================================
 }
 
 //=============================================================================
@@ -3443,6 +3466,36 @@ void SMESH_Mesh_i::Update( SALOME::Notebook_ptr theNotebook )
 //=============================================================================
 void SMESH_Mesh_i::UpdateStringAttribute()
 {
 //=============================================================================
 void SMESH_Mesh_i::UpdateStringAttribute()
 {
+  SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
+
+  SALOME::Notebook_ptr aNotebook = aSMESHGen->GetNotebook( GetStudyId() );
+
+  SALOME::StringArray* anObjectParameters = aNotebook->GetObjectParameters( GetComponent(), GetEntry() );
+  int aParametersLength = anObjectParameters ? anObjectParameters->length() : 0;
+  if( aParametersLength == 0 )
+    return;
+
+  SALOMEDS::Study_ptr aStudy = aSMESHGen->GetStudy( GetStudyId() );
+  SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
+  SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject( aStudy, SMESH::SMESH_Mesh::_narrow( _this() ) );
+  if( CORBA::is_nil( aSObject ) )
+    return;
+
+  SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute( aSObject, "AttributeString" );
+  SALOMEDS::AttributeString_var aStringAttrib = SALOMEDS::AttributeString::_narrow( anAttr );
+
+  std::string aString;
+  for( int i = 0, n = anObjectParameters->length(); i < n; i++ ) {
+    std::string aParameter = anObjectParameters->operator[](i).in();
+    if( aParameter != "" )
+    {
+      if( aString != "" )
+        aString += ", ";
+      aString += aParameter;
+    }
+  }
+  aStringAttrib->SetValue( aString.c_str() );
+  aStringAttrib->Destroy();
 }
 
 //=============================================================================
 }
 
 //=============================================================================