Salome HOME
Merge from V5_1_2_BR branch (14 July 2009)
authorvsr <vsr@opencascade.com>
Wed, 15 Jul 2009 08:11:22 +0000 (08:11 +0000)
committervsr <vsr@opencascade.com>
Wed, 15 Jul 2009 08:11:22 +0000 (08:11 +0000)
29 files changed:
doc/salome/gui/SMESH/images/eleminfo1.png
doc/salome/gui/SMESH/images/eleminfo2.png
doc/salome/gui/SMESH/input/mesh_infos.doc
doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc
resources/SalomeApp.xml
src/Controls/SMESH_Controls.cxx
src/OBJECT/SMESH_Actor.cxx
src/SMDS/SMDSAbs_ElementType.hxx
src/SMESH/SMESH_MeshEditor.cxx
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
src/SMESHGUI/SMESHGUI_ComputeDlg.h
src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionDlg.h
src/SMESHGUI/SMESHGUI_GroupDlg.cxx
src/SMESHGUI/SMESHGUI_Hypotheses.cxx
src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx
src/SMESHGUI/SMESHGUI_HypothesesUtils.h
src/SMESHGUI/SMESHGUI_MeshOp.cxx
src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx
src/SMESHGUI/SMESHGUI_RevolutionDlg.h
src/SMESHGUI/SMESHGUI_Selection.cxx
src/SMESHGUI/SMESHGUI_Selection.h
src/SMESH_I/SMESH_DumpPython.cxx
src/SMESH_I/SMESH_Gen_i.cxx
src/SMESH_I/SMESH_PythonDump.hxx
src/SMESH_SWIG/SMESH_BuildCompound.py
src/SMESH_SWIG/smeshDC.py
src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.cxx

index 3aae250c8c7472a4e458aa41b29546c34d1ecdd9..a93a622f1d44046971ac167d2f52e5ff7cfefed3 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/eleminfo1.png and b/doc/salome/gui/SMESH/images/eleminfo1.png differ
index 9ead335b823ad79ad2ec0fb962d99fb765c7b13f..c417b6d25f37a6a14349ba792d770376fee7f1b0 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/eleminfo2.png and b/doc/salome/gui/SMESH/images/eleminfo2.png differ
index 37a3deaf48a66d997bcfaa4391e35a207da8fcaf..75b934c2e136c94e82f83aa363c81cd5596fd926 100644 (file)
@@ -53,8 +53,7 @@ the information is displayed in Python Console.
 \anchor mesh_element_info_anchor
 <h2>Mesh Element Info</h2> 
 
-The <b>Mesh Element Info</b> box gives basic information about the
-type and the coordinates of the selected mesh element.
+The <b>Mesh Element Info</b> dialog box gives basic information about the type, coordinates and connectivity of the selected mesh node or element.
 \n It is possible to input the Element ID or to select the Element in
 the Viewer.
 
index bd9fbbb10f3543ffc1845703e488d6ae8bf277d9..766c6d12c377562449b802e36d52075bd90514e8 100644 (file)
@@ -382,4 +382,9 @@ n23_params = algo3D.Parameters()
 tetraN.Compute()
 \endcode
 
+\n Other meshing algorithms:
+
+<ul>
+<li>\subpage tui_defining_blsurf_hypotheses_page</li>
+</ul>
 */
\ No newline at end of file
index f2fc4e3898045f3726a26e02d1d1b5804352dc02..37f3d3ab1fc18c03cd1317192ecc97b999f5360a 100644 (file)
@@ -68,6 +68,8 @@
     <parameter name="show_result_notification"     value="2"/>
     <parameter name="segmentation"                 value="10"/>
     <parameter name="nb_segments_per_edge"         value="15"/>
+    <parameter name="quadratic_mode"               value="0"/>
+    <parameter name="max_angle"                    value="2"/>
   </section>
   <section name="resources">
     <!-- Module resources -->
index e6946a84aa003b27ed9ebea83326e7f271102131..2ae7f399b65674a741bcf9a0df7de9c90c059d71 100644 (file)
@@ -1955,22 +1955,22 @@ bool ElemGeomType::IsSatisfy( long theId )
 
   case SMDSAbs_Face:
     if ( myGeomType == SMDSGeom_TRIANGLE )
-      isOk = (!anElem->IsPoly() && aNbNode == 3);
+      isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 6 : aNbNode == 3));
     else if ( myGeomType == SMDSGeom_QUADRANGLE )
-      isOk = (!anElem->IsPoly() && aNbNode == 4);
+      isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 8 : aNbNode == 4));
     else if ( myGeomType == SMDSGeom_POLYGON )
       isOk = anElem->IsPoly();
     break;
 
   case SMDSAbs_Volume:
     if ( myGeomType == SMDSGeom_TETRA )
-      isOk = (!anElem->IsPoly() && aNbNode == 4);
+      isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 10 : aNbNode == 4));
     else if ( myGeomType == SMDSGeom_PYRAMID )
-      isOk = (!anElem->IsPoly() && aNbNode == 5);
+      isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 13 : aNbNode == 5));
     else if ( myGeomType == SMDSGeom_PENTA )
-      isOk = (!anElem->IsPoly() && aNbNode == 6);
+      isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 15 : aNbNode == 6));
     else if ( myGeomType == SMDSGeom_HEXA )
-      isOk = (!anElem->IsPoly() && aNbNode == 8);
+      isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 20 : aNbNode == 8));
      else if ( myGeomType == SMDSGeom_POLYHEDRA )
       isOk = anElem->IsPoly();
     break;
index 875146e23fa4a44e81fa54381afa4296a04214ab..36a44924d6c4b9c74803f3aae8a2099197da8db6 100644 (file)
@@ -1163,11 +1163,19 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode){
   aFilter = myBaseActor->GetExtractUnstructuredGrid();
   aFilter->ClearRegisteredCellsWithType();
   aFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
+
+  VTKViewer_ExtractUnstructuredGrid* aHightFilter = myHighlitableActor->GetExtractUnstructuredGrid();
+  aHightFilter->ClearRegisteredCellsWithType();
+  aHightFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
+
   
   if(myEntityMode & eEdges){
     if (MYDEBUG) MESSAGE("EDGES");
     aFilter->RegisterCellsWithType(VTK_LINE);
     aFilter->RegisterCellsWithType(VTK_QUADRATIC_EDGE);
+
+    aHightFilter->RegisterCellsWithType(VTK_LINE);
+    aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_EDGE);
   }
 
   if(myEntityMode & eFaces){
@@ -1177,6 +1185,12 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode){
     aFilter->RegisterCellsWithType(VTK_QUAD);
     aFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
     aFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
+
+    aHightFilter->RegisterCellsWithType(VTK_TRIANGLE);
+    aHightFilter->RegisterCellsWithType(VTK_POLYGON);
+    aHightFilter->RegisterCellsWithType(VTK_QUAD);
+    aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
+    aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
   }
 
   if(myEntityMode & eVolumes){
@@ -1190,6 +1204,16 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode){
     aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
     aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
     aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
+    
+    aHightFilter->RegisterCellsWithType(VTK_TETRA);
+    aHightFilter->RegisterCellsWithType(VTK_VOXEL);
+    aHightFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
+    aHightFilter->RegisterCellsWithType(VTK_WEDGE);
+    aHightFilter->RegisterCellsWithType(VTK_PYRAMID);
+    aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
+    aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
+    aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
+    aHightFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
   }
   aFilter->Update();
   if (MYDEBUG) MESSAGE(aFilter->GetOutput()->GetNumberOfCells());
index a76772e3f05b483433ba6b233be2013dd2a0fd89..2a5d8e3ba51dcfd90e1aefba355ad7f6ed330b07 100644 (file)
@@ -53,8 +53,8 @@ enum SMDSAbs_GeometryType
   // 3D element
   SMDSGeom_TETRA,
   SMDSGeom_PYRAMID,
-  SMDSGeom_PENTA,
   SMDSGeom_HEXA,
+  SMDSGeom_PENTA,
   SMDSGeom_POLYHEDRA,
 };
 
index d7a64c1cdb0031a3a5ae3e89c61b5ce2e86e537e..09cf80bf97a96576942f1b084ce7a9e2cf552c4d 100644 (file)
@@ -4971,7 +4971,7 @@ struct SMESH_NodeSearcherImpl: public SMESH_NodeSearcher
     SMDS_MeshNode tgtNode( thePnt.X(), thePnt.Y(), thePnt.Z() );
     list<const SMDS_MeshNode*> nodes;
     const double precision = 1e-6;
-    myOctreeNode->NodesAround( &tgtNode, &nodes, precision );
+    //myOctreeNode->NodesAround( &tgtNode, &nodes, precision );
 
     double minSqDist = DBL_MAX;
     Bnd_B3d box;
index e485f10ffd6ca38272c3335515c31cd101685cef..8904fb435dd31cf438a791340babbb37a8db45dc 100644 (file)
@@ -23,7 +23,7 @@
 // File   : SMESHGUI.cxx
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
 // SMESH includes
-//
+
 #include "SMESHGUI.h"
 #include "SMESHGUI_NodesDlg.h"
 #include "SMESHGUI_TransparencyDlg.h"
@@ -2091,9 +2091,12 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         /* Warning : however by internal mechanism all subMeshes icons are changed !                     */
         if ( !aHypothesis->_is_nil() )
         {
-          SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(aHypothesis->GetName());
-          if (aCreator)
+          // BUG 0020378
+          //SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(aHypothesis->GetName());
+          SMESH::HypothesisCreatorPtr aCreator = SMESH::GetHypothesisCreator(aHypothesis->GetName());
+          if (aCreator) {
             aCreator->edit( aHypothesis.in(), anIObject->getName(), desktop() );
+          }
           else
           {
             // report error
@@ -3056,8 +3059,7 @@ void SMESHGUI::initialize( CAM_Application* app )
 
   popupMgr()->insert( separator(), -1, 0 );
   createPopupItem( 701, OB, mesh, "&& isComputable" );     // COMPUTE
-  createPopupItem( 711, OB, mesh, "&& isComputable" );     // PRECOMPUTE
-  createPopupItem( 712, OB, mesh );                        // EVALUATE
+  createPopupItem( 711, OB, mesh, "&& isComputable && isPreComputable" ); // PRECOMPUTE
   createPopupItem( 214, OB, mesh_group );                  // UPDATE
   createPopupItem( 900, OB, mesh_group );                  // ADV_INFO
   createPopupItem( 902, OB, mesh );                        // STD_INFO
index 1852b4b613baa350abc9d9dfce610e419768fbca..142edf8d347ef6e328753cee5c3259185934e263 100644 (file)
@@ -1622,7 +1622,7 @@ void SMESHGUI_PrecomputeOp::stopOperation()
 
 //================================================================================
 /*!
- * \brief perform it's intention action: reinitialise dialog
+ * \brief reinitialize dialog after operaiton become active again
  */
 //================================================================================
 
@@ -1633,16 +1633,48 @@ void SMESHGUI_PrecomputeOp::resumeOperation()
   SMESHGUI_BaseComputeOp::resumeOperation();
 }
 
+//================================================================================
+/*!
+ * \brief perform it's intention action: reinitialise dialog
+ */
+//================================================================================
+
 void SMESHGUI_PrecomputeOp::initDialog()
 {
   QList<int> modes;
+
   QMap<int, int> modeMap;
+  _PTR(SObject)  pMesh = studyDS()->FindObjectID( myIObject->getEntry() );
+  getAssignedAlgos( pMesh, modeMap );
+  if ( modeMap.contains( SMESH::DIM_3D ) )
+  {
+    if ( modeMap.contains( SMESH::DIM_2D ) )
+      modes.append( SMESH::DIM_2D );
+    if ( modeMap.contains( SMESH::DIM_1D ) )
+      modes.append( SMESH::DIM_1D );
+  }
+  else if ( modeMap.contains( SMESH::DIM_2D ) )
+  {
+    if ( modeMap.contains( SMESH::DIM_1D ) )
+      modes.append( SMESH::DIM_1D );
+  }
+
+  myDlg->setPreviewModes( modes );
+}
+
+//================================================================================
+/*!
+ * \brief detect asigned mesh algorithms
+ */
+//================================================================================
+
+void SMESHGUI_PrecomputeOp::getAssignedAlgos(_PTR(SObject) theMesh,
+                                             QMap<int,int>& theModeMap)
+{
   _PTR(SObject)          aHypRoot;
   _PTR(GenericAttribute) anAttr;
   int aPart = SMESH::Tag_RefOnAppliedAlgorithms;
-
-  _PTR(SObject) pMesh = studyDS()->FindObjectID( myIObject->getEntry() );
-  if ( pMesh && pMesh->FindSubObject( aPart, aHypRoot ) )
+  if ( theMesh && theMesh->FindSubObject( aPart, aHypRoot ) )
   {
     _PTR(ChildIterator) anIter =
       SMESH::GetActiveStudyDocument()->NewChildIterator( aHypRoot );
@@ -1660,28 +1692,22 @@ void SMESHGUI_PrecomputeOp::initDialog()
         CORBA::Object_var aVar = _CAST(SObject,anObj)->GetObject();
         if ( CORBA::is_nil( aVar ) )
           continue;
-
-        SMESH::SMESH_Algo_var algo = SMESH::SMESH_3D_Algo::_narrow( aVar );
-        if ( !algo->_is_nil() )
-        {
-         modeMap[ SMESH::DIM_1D ] = 0;
-         modeMap[ SMESH::DIM_2D ] = 0;
-        }
-        else
+        
+        for( int dim = SMESH::DIM_1D; dim <= SMESH::DIM_3D; dim++ )
         {
-          algo = SMESH::SMESH_2D_Algo::_narrow( aVar );
+          SMESH::SMESH_Algo_var algo;
+          switch(dim) {
+          case SMESH::DIM_1D: algo = SMESH::SMESH_1D_Algo::_narrow( aVar ); break;
+          case SMESH::DIM_2D: algo = SMESH::SMESH_2D_Algo::_narrow( aVar ); break;
+          case SMESH::DIM_3D: algo = SMESH::SMESH_3D_Algo::_narrow( aVar ); break;
+          default: break;
+          }
           if ( !algo->_is_nil() )
-            modeMap[ SMESH::DIM_1D ] = 0;
+           theModeMap[ dim ] = 0;
         }
       }
     }
   }
-  if ( modeMap.contains( SMESH::DIM_1D ) )
-    modes.append( SMESH::DIM_1D );
-  if ( modeMap.contains( SMESH::DIM_2D ) )
-    modes.append( SMESH::DIM_2D );
-
-  myDlg->setPreviewModes( modes );
 }
 
 //================================================================================
index c07e8674668ddc4dbfd5f9143283f7338a8cce31..d88731203630a5c9274192fc5fab7b21a7b4ec78 100644 (file)
@@ -147,6 +147,12 @@ public:
 
   virtual LightApp_Dialog*       dlg() const;
 
+  /**
+   * \brief returns map of assigned algorithms modes
+   */
+  static void                    getAssignedAlgos(_PTR(SObject) theMesh,
+                                                  QMap<int,int>& theModeMap);
+
 protected:
   virtual void                   startOperation();
   virtual void                   stopOperation();
index 170292e47e9382b7a3e44ca24d95e19e4ee81717..2ed9123835b509ec3bde2c6d902449c572bd2f66 100644 (file)
@@ -337,6 +337,7 @@ SMESHGUI_ExtrusionDlg::~SMESHGUI_ExtrusionDlg()
 void SMESHGUI_ExtrusionDlg::Init (bool ResetControls)
 {
   myBusy = false;
+  myIDs.clear();
 
   LineEditElements->clear();
   myNbOkElements = 0;
@@ -400,6 +401,8 @@ void SMESHGUI_ExtrusionDlg::ConstructorsClicked (int constructorId)
       GroupArguments->setTitle(tr("EXTRUSION_1D"));
       if (!CheckBoxMesh->isChecked())
        {
+         LineEditElements->clear();
+         myIDs.clear();
          if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
            aViewWindow->SetSelectionMode(EdgeSelection);
        }
@@ -410,6 +413,8 @@ void SMESHGUI_ExtrusionDlg::ConstructorsClicked (int constructorId)
       GroupArguments->setTitle(tr("EXTRUSION_2D"));
       if (!CheckBoxMesh->isChecked())
        {
+         LineEditElements->clear();
+         myIDs.clear();
          if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
            aViewWindow->SetSelectionMode(FaceSelection);
        }
@@ -586,17 +591,6 @@ void SMESHGUI_ExtrusionDlg::ClickOnOk()
 //=================================================================================
 void SMESHGUI_ExtrusionDlg::ClickOnCancel()
 {
-  disconnect(mySelectionMgr, 0, this, 0);
-  mySelectionMgr->clearFilters();
-  //mySelectionMgr->clearSelected();
-  if (SMESH::GetCurrentVtkView()) {
-    SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
-    SMESH::SetPointRepresentation(false);
-    SMESH::SetPickable();
-  }
-  if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-    aViewWindow->SetSelectionMode(ActorSelection);
-  mySMESHGUI->ResetState();
   reject();
 }
 
@@ -878,16 +872,45 @@ void SMESHGUI_ExtrusionDlg::enterEvent (QEvent*)
     ActivateThisDialog();
 }
 
+//=================================================================================
+// function : closeEvent()
+// purpose  :
+//=================================================================================
+void SMESHGUI_ExtrusionDlg::closeEvent( QCloseEvent* )
+{
+  /* same than click on cancel button */
+  disconnect(mySelectionMgr, 0, this, 0);
+  mySelectionMgr->clearFilters();
+  //mySelectionMgr->clearSelected();
+  if (SMESH::GetCurrentVtkView()) {
+    SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
+    SMESH::SetPointRepresentation(false);
+    SMESH::SetPickable();
+  }
+  if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+    aViewWindow->SetSelectionMode(ActorSelection);
+  mySMESHGUI->ResetState();
+}
+
+void SMESHGUI_ExtrusionDlg::reject()
+{
+  QDialog::reject();
+  close();
+}
+
 //=================================================================================
 // function : onSelectMesh()
 // purpose  :
 //=================================================================================
 void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh)
 {
-  if (toSelectMesh)
+  if (toSelectMesh) {
+    myIDs = LineEditElements->text();
     TextLabelElements->setText(tr("SMESH_NAME"));
+  }
   else
     TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
+
   myFilterBtn->setEnabled(!toSelectMesh);
 
   if (myEditCurrentArgument != LineEditElements) {
@@ -910,7 +933,7 @@ void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh)
        if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
          aViewWindow->SetSelectionMode(EdgeSelection);
       }
-    else if (aConstructorId == 0)
+    else if (aConstructorId == 1)
       {
        if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
          aViewWindow->SetSelectionMode(FaceSelection);
@@ -922,6 +945,9 @@ void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh)
   }
 
   SelectionIntoArgument();
+
+  if (!toSelectMesh)
+    LineEditElements->setText( myIDs );
 }
 
 //=================================================================================
index 6a1b353eebaf30e1c0ab1d53727159c6530acb83..4425d29f78bdc5531d8430317c78df22620b3d29 100644 (file)
@@ -69,9 +69,12 @@ public:
   SMESHGUI_ExtrusionDlg( SMESHGUI* );
   ~SMESHGUI_ExtrusionDlg();
 
+  void                             reject();
+
 private:
   void                             Init( bool = true );
   void                             enterEvent( QEvent* );       /* mouse enter the QWidget */
+  void                             closeEvent( QCloseEvent* );
   void                             keyPressEvent( QKeyEvent* );
   int                              GetConstructorId();
 
@@ -135,6 +138,7 @@ private:
   QPushButton*                     buttonHelp;
 
   QString                          myHelpFileName;
+  QString                          myIDs;
 
   QPushButton*                     myFilterBtn;
   SMESHGUI_FilterDlg*              myFilterDlg;
index dc98cd310e49ac380eba41e0c371e4c8dc51c9e8..01e0f81950bd932f33150d60a6ab3b5de70b7e45 100644 (file)
@@ -560,11 +560,11 @@ void SMESHGUI_GroupDlg::init (SMESH::SMESH_GroupBase_ptr theGroup,
   myGrpTypeGroup->button(grpType)->setChecked(true);
   onGrpTypeChanged(grpType);
 
+  myTypeId = aType;
   if ( grpType == 0 ) {
     myCurrentLineEdit = 0;
     myElements->clear();
     setSelectionMode(aType);
-    myTypeId = aType;
 
     setShowEntityMode(); // depends on myTypeId
 
index 3e3c6338fdf0e5c19ce0f9acf178525eb7b1ac46..19023d0188eff46afa8a181d1a1691acca39cfea 100644 (file)
@@ -498,10 +498,10 @@ void SMESHGUI_GenericHypothesisCreator::onReject()
 QString SMESHGUI_GenericHypothesisCreator::helpPage() const
 {
   QString aHypType = hypType();
-  QString aHelpFileName;
+  QString aHelpFileName = "";
   if ( aHypType == "LocalLength" )
     aHelpFileName = "a1d_meshing_hypo_page.html#average_length_anchor";
-  if ( aHypType == "MaxLength" )
+  else if ( aHypType == "MaxLength" )
     aHelpFileName = "a1d_meshing_hypo_page.html#max_length_anchor";
   else if ( aHypType == "Arithmetic1D")
     aHelpFileName = "a1d_meshing_hypo_page.html#arithmetic_1d_anchor";
@@ -528,9 +528,8 @@ QString SMESHGUI_GenericHypothesisCreator::helpPage() const
   else if ( aHypType == "LayerDistribution")
     aHelpFileName = "radial_prism_algo_page.html";
   else if ( aHypType == "SegmentLengthAroundVertex")
-    aHelpFileName = "segments_around_vertex_algo.html";
-  else
-    aHelpFileName = "";
+    aHelpFileName = "segments_around_vertex_algo_page.html";
+    
   return aHelpFileName;
 }
 
index 5f3500230d4617ab7c32b62fecc2828bdc845f3c..50de8b76221e7167081dca22032f0f8089b0b77a 100644 (file)
@@ -22,8 +22,8 @@
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_HypothesesUtils.cxx
 // Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
+
 // SMESH includes
-//
 #include "SMESHGUI_HypothesesUtils.h"
 
 #include "SMESHGUI.h"
@@ -82,8 +82,9 @@ namespace SMESH
   THypothesisDataMap myHypothesesMap;
   THypothesisDataMap myAlgorithmsMap;
 
-  typedef QMap<QString,SMESHGUI_GenericHypothesisCreator*> THypCreatorMap;
-  THypCreatorMap myHypCreatorMap;
+  // BUG 0020378
+  //typedef QMap<QString,SMESHGUI_GenericHypothesisCreator*> THypCreatorMap;
+  //THypCreatorMap myHypCreatorMap;
 
   QList<HypothesesSet*> myListOfHypothesesSets;
 
@@ -319,24 +320,26 @@ namespace SMESH
     return false;
   }
 
-  SMESHGUI_GenericHypothesisCreator* GetHypothesisCreator(const QString& aHypType)
+  HypothesisCreatorPtr GetHypothesisCreator(const QString& aHypType)
   {
     if(MYDEBUG) MESSAGE("Get HypothesisCreator for " << aHypType.toLatin1().data());
 
     SMESHGUI_GenericHypothesisCreator* aCreator = 0;
 
     // check, if creator for this hypothesis type already exists
-    if (myHypCreatorMap.find(aHypType) != myHypCreatorMap.end()) {
-      aCreator = myHypCreatorMap[aHypType];
-    }
-    else {
+    // BUG 0020378
+    //if (myHypCreatorMap.find(aHypType) != myHypCreatorMap.end()) {
+    //  aCreator = myHypCreatorMap[aHypType];
+    //}
+    //else
+    {
       // 1. Init list of available hypotheses, if needed
       InitAvailableHypotheses();
 
       // 2. Get names of plugin libraries
       HypothesisData* aHypData = GetHypothesisData(aHypType);
       if (!aHypData) 
-        return aCreator;
+        return HypothesisCreatorPtr(aCreator);
       QString aClientLibName = aHypData->ClientLibName;
       QString aServerLibName = aHypData->ServerLibName;
 
@@ -376,7 +379,8 @@ namespace SMESH
            }
            else {
              // map hypothesis creator to a hypothesis name
-             myHypCreatorMap[aHypType] = aCreator;
+              // BUG 0020378
+             //myHypCreatorMap[aHypType] = aCreator;
            }
          }
        }
@@ -386,7 +390,7 @@ namespace SMESH
       }
     }
 
-    return aCreator;
+    return HypothesisCreatorPtr(aCreator);
   }
 
 
index 18813f4c8bcd1b1ce834b18673322dc91e9f2da0..89c1335dfa76fb269f09e69468f09036a7139b3a 100644 (file)
@@ -22,7 +22,7 @@
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_HypothesesUtils.h
 // Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
-//
+
 #ifndef SMESHGUI_HYPOTHESESUTILS_H
 #define SMESHGUI_HYPOTHESESUTILS_H
 
@@ -47,6 +47,9 @@
 // STL includes
 #include <vector>
 
+// boost includes
+#include <boost/shared_ptr.hpp>
+
 class HypothesisData;
 class HypothesesSet;
 class SMESHGUI_GenericHypothesisCreator;
@@ -55,6 +58,8 @@ class algo_error_array;
 
 namespace SMESH
 {
+  typedef boost::shared_ptr<SMESHGUI_GenericHypothesisCreator> HypothesisCreatorPtr;
+
   SMESHGUI_EXPORT
   void InitAvailableHypotheses();
 
@@ -82,12 +87,12 @@ namespace SMESH
                              const HypothesisData* );
 
   SMESHGUI_EXPORT
-  SMESHGUI_GenericHypothesisCreator* GetHypothesisCreator( const QString& );
+  HypothesisCreatorPtr GetHypothesisCreator( const QString& );
 
   SMESHGUI_EXPORT
   SMESH::SMESH_Hypothesis_ptr CreateHypothesis( const QString&,
-                                               const QString&,
-                                               const bool = false);
+                                                const QString&,
+                                                const bool = false );
 
   SMESHGUI_EXPORT
   bool AddHypothesisOnMesh( SMESH::SMESH_Mesh_ptr, SMESH::SMESH_Hypothesis_ptr );
index c617ecc794d76f7f1196500a866ec8cb2d22b75d..f34871254654c7adab62363e53208ebada027235 100644 (file)
@@ -22,8 +22,8 @@
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_MeshOp.cxx
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
+
 // SMESH includes
-//
 #include "SMESHGUI_MeshOp.h"
 
 #include "SMESHGUI.h"
@@ -1053,7 +1053,9 @@ void SMESHGUI_MeshOp::createHypothesis (const int theDim,
     SMESH::CreateHypothesis(theTypeName, aHypName, false);
   } else {
     // Get hypotheses creator client (GUI)
-    SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(theTypeName);
+    // BUG 0020378
+    //SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(theTypeName);
+    SMESH::HypothesisCreatorPtr aCreator = SMESH::GetHypothesisCreator(theTypeName);
 
     // Create hypothesis
     if (aCreator) {
@@ -1117,7 +1119,9 @@ void SMESHGUI_MeshOp::onEditHyp( const int theHypType, const int theIndex )
   if ( aHyp->_is_nil() )
     return;
 
-  SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator( aHyp->GetName() );
+  // BUG 0020378
+  //SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(aHyp->GetName());
+  SMESH::HypothesisCreatorPtr aCreator = SMESH::GetHypothesisCreator(aHyp->GetName());
   if ( aCreator )
   {
     // Get initial parameters
@@ -1699,11 +1703,14 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
         SMESH::CreateHypothesis(aHypName, aHypData->Label, true);
       } else {
         // Get hypotheses creator client (GUI)
-        SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(aHypName);
+        // BUG 0020378
+        //SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(aHypName);
+        SMESH::HypothesisCreatorPtr aCreator = SMESH::GetHypothesisCreator(aHypName);
 
         // Create algorithm
-        if (aCreator)
+        if (aCreator) {
           aCreator->create(true, aHypName, myDlg);
+        }
         else
           SMESH::CreateHypothesis(aHypName, aHypData->Label, true);
       }
index 6003776fbeaf488c0746395dc5a01fc72ea2edcf..e9e7fef05a8442748dc152179f3791b08db409a3 100644 (file)
@@ -93,7 +93,8 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule )
     mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
     myVectorDefinition(NONE_SELECT),
     myFilterDlg( 0 ),
-    mySelectedObject(SMESH::SMESH_IDSource::_nil())
+    mySelectedObject(SMESH::SMESH_IDSource::_nil()),
+    myActor(0)
 {
   mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI ));
 
@@ -383,6 +384,7 @@ void SMESHGUI_RevolutionDlg::Init (bool ResetControls)
   LineEditElements->clear();
   myElementsId = "";
   myNbOkElements = 0;
+  myIDs.clear();
 
   myActor = 0;
   myMesh = SMESH::SMESH_Mesh::_nil();
@@ -412,14 +414,13 @@ void SMESHGUI_RevolutionDlg::Init (bool ResetControls)
 //=================================================================================
 void SMESHGUI_RevolutionDlg::ConstructorsClicked (int constructorId)
 {
-  //disconnect(mySelectionMgr, 0, this, 0);
+  disconnect(mySelectionMgr, 0, this, 0);
 
-  SALOME_ListIO io;
+  /*  SALOME_ListIO io;
   mySelectionMgr->selectedObjects( io );
   SALOME_ListIO aList;
-  mySelectionMgr->setSelectedObjects( aList );
-//   LineEditElements->clear();
-  myNbOkElements = 0;
+  mySelectionMgr->setSelectedObjects( aList );*/
+
   buttonApply->setEnabled(false);
   buttonOk->setEnabled(false);
   mySimulation->SetVisibility(false);
@@ -447,6 +448,9 @@ void SMESHGUI_RevolutionDlg::ConstructorsClicked (int constructorId)
 
   if (!CheckBoxMesh->isChecked())
     {
+      LineEditElements->clear();
+      myIDs.clear();
+      myNbOkElements = 0;
       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
        aViewWindow->SetSelectionMode(aSelMode);
     }
@@ -457,8 +461,8 @@ void SMESHGUI_RevolutionDlg::ConstructorsClicked (int constructorId)
   if (CheckBoxMesh->isChecked())
     onSelectMesh(true);
 
-  //connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
-  mySelectionMgr->setSelectedObjects( io );
+  connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+  //  mySelectionMgr->setSelectedObjects( io );
 }
 
 //=================================================================================
@@ -545,6 +549,7 @@ bool SMESHGUI_RevolutionDlg::ClickOnApply()
     }
 
     SMESH::UpdateView();
+    SMESH::Update(myIO, SMESH::eDisplay);
     if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() )
       mySMESHGUI->updateObjBrowser(true); // new groups may appear
     Init(false);
@@ -572,19 +577,14 @@ void SMESHGUI_RevolutionDlg::ClickOnOk()
 //=================================================================================
 void SMESHGUI_RevolutionDlg::ClickOnCancel()
 {
-  disconnect(mySelectionMgr, 0, this, 0);
-  mySelectionMgr->clearFilters();
-  //mySelectionMgr->clearSelected();
-  if (SMESH::GetCurrentVtkView()) {
-    SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
-    SMESH::SetPointRepresentation(false);
-  }
-  if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-    aViewWindow->SetSelectionMode(ActorSelection);
-  mySMESHGUI->ResetState();
   reject();
 }
 
+void SMESHGUI_RevolutionDlg::reject()
+{
+  close();
+}
+
 //=================================================================================
 // function : ClickOnHelp()
 // purpose  :
@@ -685,7 +685,6 @@ void SMESHGUI_RevolutionDlg::SelectionIntoArgument()
   if (myBusy) return;
 
   // clear
-  myActor = 0;
   QString aString = "";
 
   myBusy = true;
@@ -708,20 +707,23 @@ void SMESHGUI_RevolutionDlg::SelectionIntoArgument()
     return;
 
   Handle(SALOME_InteractiveObject) IO = aList.First();
-  myMesh = SMESH::GetMeshByIO(IO);
-  if (myMesh->_is_nil())
+  SMESH::SMESH_Mesh_var aMeshVar = SMESH::GetMeshByIO(IO);
+  if (aMeshVar->_is_nil())
     return;
 
-  myActor = SMESH::FindActorByObject(myMesh);
-  if (!myActor)
-    myActor = SMESH::FindActorByEntry(IO->getEntry());
-  if (!myActor)
+  SMESH_Actor* anActor = SMESH::FindActorByObject(aMeshVar);
+  if (!anActor)
+    anActor = SMESH::FindActorByEntry(IO->getEntry());
+  if (!anActor)
     return;
 
   int aNbUnits = 0;
 
   if (myEditCurrentArgument == (QWidget*)LineEditElements) {
     myElementsId = "";
+    myMesh = aMeshVar;
+    myActor = anActor;
+    myIO = IO;
 
     // MakeGroups is available if there are groups
     if ( myMesh->NbGroups() == 0 ) {
@@ -747,7 +749,7 @@ void SMESHGUI_RevolutionDlg::SelectionIntoArgument()
     myNbOkElements = true;
   } else {
 
-    SMDS_Mesh* aMesh =  myActor->GetObject()->GetMesh();
+    SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
     if (!aMesh)
       return;
 
@@ -909,17 +911,16 @@ void SMESHGUI_RevolutionDlg::enterEvent (QEvent*)
 void SMESHGUI_RevolutionDlg::closeEvent (QCloseEvent*)
 {
   /* same than click on cancel button */
-  ClickOnCancel();
-}
-
-//=======================================================================
-// function : hideEvent()
-// purpose  : caused by ESC key
-//=======================================================================
-void SMESHGUI_RevolutionDlg::hideEvent (QHideEvent*)
-{
-  if (!isMinimized())
-    ClickOnCancel();
+  disconnect(mySelectionMgr, 0, this, 0);
+  mySelectionMgr->clearFilters();
+  //mySelectionMgr->clearSelected();
+  if (SMESH::GetCurrentVtkView()) {
+    SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
+    SMESH::SetPointRepresentation(false);
+  }
+  if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+    aViewWindow->SetSelectionMode(ActorSelection);
+  mySMESHGUI->ResetState();
 }
 
 //=======================================================================
@@ -928,8 +929,10 @@ void SMESHGUI_RevolutionDlg::hideEvent (QHideEvent*)
 //=======================================================================
 void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
 {
-  if (toSelectMesh)
+  if (toSelectMesh) {
+    myIDs = LineEditElements->text();
     TextLabelElements->setText(tr("SMESH_NAME"));
+  }
   else
     TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
   myFilterBtn->setEnabled(!toSelectMesh);
@@ -956,7 +959,7 @@ void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
        if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
          aViewWindow->SetSelectionMode(EdgeSelection);
       }
-    else if (aConstructorId == 0)
+    else if (aConstructorId == 1)
       {
        if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
          aViewWindow->SetSelectionMode(FaceSelection);
@@ -969,6 +972,9 @@ void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh)
   }
 
   SelectionIntoArgument();
+
+  if (!toSelectMesh)
+    LineEditElements->setText( myIDs );
 }
 
 //=================================================================================
@@ -1118,6 +1124,8 @@ void SMESHGUI_RevolutionDlg::onSelectVectorMenu( QAction* action){
   if(!action)
     return;
 
+  disconnect(mySelectionMgr, 0, this, 0);
+
   switch(myMenuActions[action]) {
   case POINT_SELECT: 
     SMESH::SetPointRepresentation(true);
index 028817e981d07eb8f1ac2f217aada1879d56a2d8..4d0c5169304e9b3b2bda2df6e85f9c063a219310 100644 (file)
@@ -29,6 +29,9 @@
 // SMESH includes
 #include "SMESH_SMESHGUI.hxx"
 
+// SALOME GUI includes
+#include <SALOME_InteractiveObject.hxx>
+
 // Qt includes
 #include <QDialog>
 #include <QMap>
@@ -70,13 +73,14 @@ public:
   SMESHGUI_RevolutionDlg( SMESHGUI* );
   ~SMESHGUI_RevolutionDlg();
 
+  void                      reject();
+
 private:
   enum {NONE_SELECT, POINT_SELECT, FACE_SELECT};
   
   void                      Init( bool = true);
   void                      closeEvent( QCloseEvent* );
   void                      enterEvent( QEvent* );           /* mouse enter the QWidget */
-  void                      hideEvent( QHideEvent* );        /* ESC key */
   void                      keyPressEvent( QKeyEvent* );
   int                       GetConstructorId();
   bool                      IsAxisOk();
@@ -90,6 +94,7 @@ private:
   QString                   myElementsId;
   QWidget*                  myEditCurrentArgument;   /* Current  argument */
   SVTK_Selector*            mySelector;
+  Handle(SALOME_InteractiveObject) myIO;
   
   SMESH::SMESH_IDSource_var mySelectedObject;
 
@@ -152,6 +157,7 @@ private:
 
   
   QString                   myHelpFileName;
+  QString                   myIDs;
   
   QPushButton*              myFilterBtn;
   SMESHGUI_FilterDlg*       myFilterDlg;
index e49ee940bb652633b988135094f627a8d0690661..d3b80a7c4d81f1fb48f2e389562a087b0587a385 100644 (file)
@@ -29,6 +29,7 @@
 #include "SMESHGUI_Utils.h"
 #include "SMESHGUI_VTKUtils.h"
 #include "SMESHGUI_GEOMGenUtils.h"
+#include "SMESHGUI_ComputeDlg.h"
 
 #include <SMESH_Type.h>
 #include <SMESH_Actor.h>
@@ -113,6 +114,7 @@ QVariant SMESHGUI_Selection::parameter( const int ind, const QString& p ) const
   else if ( p=="controlMode" )   val = QVariant( controlMode( ind ) );
   else if ( p=="displayMode" )   val = QVariant( displayMode( ind ) );
   else if ( p=="isComputable" )  val = QVariant( isComputable( ind ) );
+  else if ( p=="isPreComputable" )  val = QVariant( isPreComputable( ind ) );
   else if ( p=="hasReference" )  val = QVariant( hasReference( ind ) );
   else if ( p=="isImported" )    val = QVariant( isImported( ind ) );
   else if ( p=="facesOrientationMode" ) val = QVariant( facesOrientationMode( ind ) );
@@ -384,6 +386,23 @@ QVariant SMESHGUI_Selection::isComputable( int ind ) const
   return QVariant( false );
 }
 
+//=======================================================================
+//function : isPreComputable
+//purpose  : 
+//=======================================================================
+
+QVariant SMESHGUI_Selection::isPreComputable( int ind ) const
+{
+  if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
+  {
+    QMap<int,int> modeMap;
+    _PTR(SObject) pMesh = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
+    SMESHGUI_PrecomputeOp::getAssignedAlgos( pMesh, modeMap );
+    return QVariant( modeMap.size() > 1 );
+  }
+  return QVariant( false );
+}
+
 //=======================================================================
 //function : hasReference
 //purpose  : 
index e1b1cc2df9385f1e2583af04190f7422dba2b6ca..ce64db54a7411b1d591c5dd88cc93dfcdb2d39a5 100644 (file)
@@ -54,6 +54,7 @@ public:
   virtual bool            isAutoColor( int ) const;
   virtual int             numberOfNodes( int ) const;
   virtual QVariant        isComputable( int ) const;
+  virtual QVariant        isPreComputable( int ) const;
   virtual QVariant        hasReference( int ) const;
   virtual QVariant        isVisible( int ) const;
 
index e67e4a3555748b0c20540e5fffdacc171950e08b..07ab0f69585566d5d63083966d1949ce8c6d6cb3 100644 (file)
@@ -130,6 +130,26 @@ namespace SMESH
     return *this;
   }
 
+  TPythonDump&
+  TPythonDump::
+  operator<<(const SMESH::GeometryType& theArg)
+  {
+    myStream<<"SMESH.";
+    switch(theArg){
+    case Geom_POINT:      myStream<<"Geom_POINT";      break;
+    case Geom_EDGE:       myStream<<"Geom_EDGE";       break;
+    case Geom_TRIANGLE:   myStream<<"Geom_TRIANGLE";   break;
+    case Geom_QUADRANGLE: myStream<<"Geom_QUADRANGLE"; break;
+    case Geom_POLYGON:    myStream<<"Geom_POLYGON";    break;
+    case Geom_TETRA:      myStream<<"Geom_TETRA";      break;
+    case Geom_PYRAMID:    myStream<<"Geom_PYRAMID";    break;
+    case Geom_HEXA:       myStream<<"Geom_HEXA";       break;
+    case Geom_PENTA:      myStream<<"Geom_PENTA";      break;
+    case Geom_POLYHEDRA:  myStream<<"Geom_POLYHEDRA";  break;
+   }
+    return *this;
+  }
+
   template<class TArray>
   void DumpArray(const TArray& theArray, std::ostringstream & theStream)
   {
@@ -225,9 +245,11 @@ namespace SMESH
       case FT_Taper:            myStream<< "aTaper";            break;
       case FT_Skew:             myStream<< "aSkew";             break;
       case FT_Area:             myStream<< "aArea";             break;
+      case FT_Volume3D:         myStream<< "aVolume3D";         break;
       case FT_FreeBorders:      myStream<< "aFreeBorders";      break;
       case FT_FreeEdges:        myStream<< "aFreeEdges";        break;
       case FT_FreeNodes:        myStream<< "aFreeNodes";        break;
+      case FT_FreeFaces:        myStream<< "aFreeFaces";        break;
       case FT_MultiConnection:  myStream<< "aMultiConnection";  break;
       case FT_MultiConnection2D:myStream<< "aMultiConnection2D";break;
       case FT_Length:           myStream<< "aLength";           break;
@@ -239,13 +261,17 @@ namespace SMESH
       case FT_LyingOnGeom:      myStream<< "aLyingOnGeom";      break;
       case FT_RangeOfIds:       myStream<< "aRangeOfIds";       break;
       case FT_BadOrientedVolume:myStream<< "aBadOrientedVolume";break;
+      case FT_LinearOrQuadratic:myStream<< "aLinearOrQuadratic";break;
+      case FT_GroupColor:       myStream<< "aGroupColor";       break;
+      case FT_ElemGeomType:     myStream<< "anElemGeomType";    break;
       case FT_LessThan:         myStream<< "aLessThan";         break;
       case FT_MoreThan:         myStream<< "aMoreThan";         break;
       case FT_EqualTo:          myStream<< "anEqualTo";         break;
       case FT_LogicalNOT:       myStream<< "aLogicalNOT";       break;
       case FT_LogicalAND:       myStream<< "aLogicalAND";       break;
       case FT_LogicalOR:        myStream<< "aLogicalOR";        break;
-      case FT_Undefined:        myStream<< "anUndefined";       break;
+      case FT_Undefined:
+      default:                  myStream<< "anUndefined";       break;
       }
       myStream<<theArg;
     }
index 2dcd38c07cffb6fd2abe1b56d3ce9b0aaf8c1068..e12ba1e52447c854422b6d57e14c08271bdbb517 100644 (file)
@@ -1510,10 +1510,10 @@ SMESH::MeshPreviewStruct* SMESH_Gen_i::Precompute( SMESH::SMESH_Mesh_ptr theMesh
              if ( aNbNode > 4 )
                aNbNode /= 2; // do not take into account additional middle nodes
 
-             SMDS_MeshNode* node1 = (SMDS_MeshNode*)face->GetNode( 1 );
-             for ( int nIndx = 1; nIndx <= aNbNode; nIndx++ )
+             SMDS_MeshNode* node1 = (SMDS_MeshNode*)face->GetNode( 0 );
+             for ( int nIndx = 0; nIndx < aNbNode; nIndx++ )
              {
-               SMDS_MeshNode* node2 = (SMDS_MeshNode*)face->GetNode( nIndx < aNbNode ? nIndx+1 : 1 );
+               SMDS_MeshNode* node2 = (SMDS_MeshNode*)face->GetNode( nIndx+1 < aNbNode ? nIndx+1 : 0 );
                if ( setOfEdge.insert( SMESH_TLink ( node1, node2 ) ).second )
                {
                  listOfElemType.push_back( SMDSAbs_Edge );
@@ -3840,7 +3840,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
                 int smID = smIDs[ i ];
                 if ( smID == 0 ) continue;
                 const SMDS_MeshElement* elem = *iE;
-                if( smID >= maxID ) {
+                if( smID > maxID ) {
                   // corresponding subshape no longer exists: maybe geom group has been edited
                   if ( myNewMeshImpl->HasShapeToMesh() )
                     mySMESHDSMesh->RemoveElement( elem );
index 1ea9f59ff7bc9e1d204a63f6f3a2dab8fe5276ab..bee3cbb834c7fec061ebeee2f9414342a5355ec8 100644 (file)
@@ -63,7 +63,7 @@ public:
     * \retval TCollection_AsciiString - The file name
    */
   static const char* SmeshpyName() { return "smesh"; }
-  static const char* GenName() { return "smesh.smesh"; }
+  static const char* GenName() { return "smesh"; }
 };
 
 namespace SMESH
@@ -108,6 +108,9 @@ namespace SMESH
     TPythonDump& 
     operator<<(const SMESH::ElementType& theArg);
 
+    TPythonDump&
+    operator<<(const SMESH::GeometryType& theArg);
+
     TPythonDump& 
     operator<<(const SMESH::long_array& theArg);
 
index 87c7e47cab36b1d5eb2bd1259d61070980c356f0..843071ed15f7e79e57e6900ec624f926c9d2172e 100644 (file)
@@ -93,6 +93,6 @@ Compound1 = smesh.smesh.Concatenate([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 0,
 smesh.SetName(Compound1, 'Compound_with_RenamedGrps_and_MergeElems')
 # create a compound of two meshes with uniting groups with the same names and
 # creating groups of all elements
-Compound2 = smesh.smesh.ConcatenateWithGroups([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 1, 0, 1e-05)
+Compound2 = smesh.smesh.Concatenate([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 1, 0, 1e-05, True)
 smesh.SetName(Compound2, 'Compound_with_UniteGrps_and_GrpsOfAllElems')
 #end
index 07a467e1c3139da1c3ecb56f3f83b3ca61710cc4..d3ece5045047ce5961302e92eff7240dc16a9787 100644 (file)
@@ -557,24 +557,6 @@ class smeshDC(SMESH._objref_SMESH_Gen):
         aMesh = Mesh(self, self.geompyD, aSmeshMesh)
         return aMesh
 
-    ## Concatenate the given meshes into one mesh.
-    #  @return an instance of Mesh class
-    #  @param meshes the meshes to combine into one mesh
-    #  @param uniteIdenticalGroups if true, groups with same names are united, else they are renamed
-    #  @param mergeNodesAndElements if true, equal nodes and elements aremerged
-    #  @param mergeTolerance tolerance for merging nodes
-    #  @param allGroups forces creation of groups of all elements
-    def Concatenate( self, meshes, uniteIdenticalGroups,
-                     mergeNodesAndElements = False, mergeTolerance = 1e-5, allGroups = False):
-        if allGroups:
-            aSmeshMesh = SMESH._objref_SMESH_Gen.ConcatenateWithGroups(
-                self,meshes,uniteIdenticalGroups,mergeNodesAndElements,mergeTolerance)
-        else:
-            aSmeshMesh = SMESH._objref_SMESH_Gen.Concatenate(
-                self,meshes,uniteIdenticalGroups,mergeNodesAndElements,mergeTolerance)
-        aMesh = Mesh(self, self.geompyD, aSmeshMesh)
-        return aMesh
-
     ## From SMESH_Gen interface
     #  @return the list of integer values
     #  @ingroup l1_auxiliary
index ffdc4a7f151ff310022a74d0bef3f16f75891390..481d34e02016bb77455f0cda6b5be0d2cc73f21e 100644 (file)
@@ -198,8 +198,9 @@ void StdMeshersGUI_LayerDistributionParamWdg::onEdit()
     return;
 
   CORBA::String_var hypType = myHyp->GetName();
-  SMESHGUI_GenericHypothesisCreator*
-    editor = SMESH::GetHypothesisCreator( hypType.in() );
+  // BUG 0020378
+  //SMESHGUI_GenericHypothesisCreator* editor = SMESH::GetHypothesisCreator(hypType.in());
+  SMESH::HypothesisCreatorPtr editor = SMESH::GetHypothesisCreator(hypType.in());
   if ( !editor ) return;
 
   if ( myDlg ) myDlg->hide();