Salome HOME
Merge branch 'master' into rbe/fix-boost-smart-pointers
authorRenaud Nédélec <renaud.nedelec@opencascade.com>
Wed, 2 Apr 2014 08:26:24 +0000 (10:26 +0200)
committerRenaud Nédélec <renaud.nedelec@opencascade.com>
Wed, 2 Apr 2014 08:26:24 +0000 (10:26 +0200)
39 files changed:
resources/CMakeLists.txt
resources/mesh_move_without_node.png [new file with mode: 0644]
src/DriverMED/DriverMED.hxx
src/DriverSTL/CMakeLists.txt
src/DriverSTL/DriverSTL_R_SMDS_Mesh.cxx
src/DriverSTL/DriverSTL_W_SMDS_Mesh.cxx
src/OBJECT/SMESH_Actor.cxx
src/OBJECT/SMESH_Actor.h
src/OBJECT/SMESH_ActorDef.h
src/OBJECT/SMESH_DeviceActor.cxx
src/OBJECT/SMESH_DeviceActor.h
src/SMESHGUI/CMakeLists.txt
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI_DuplicateNodesDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx
src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx
src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.h
src/SMESHGUI/SMESHGUI_MeshInfo.cxx
src/SMESHGUI/SMESHGUI_MeshInfo.h
src/SMESHGUI/SMESHGUI_MeshInfosBox.cxx
src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx
src/SMESHGUI/SMESHGUI_MeshPatternDlg.h
src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx
src/SMESHGUI/SMESHGUI_PatternWidget.cxx
src/SMESHGUI/SMESHGUI_PropertiesDlg.cxx
src/SMESHGUI/SMESHGUI_PropertiesDlg.h
src/SMESHGUI/SMESHGUI_ScaleDlg.cxx
src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx
src/SMESHGUI/SMESHGUI_TranslationDlg.cxx
src/SMESHGUI/SMESH_images.ts
src/SMESHUtils/SMESH_File.cxx
src/SMESHUtils/SMESH_MeshAlgos.cxx
src/SMESH_I/CMakeLists.txt
src/SMESH_SWIG/smeshBuilder.py
src/StdMeshers/StdMeshers_Quadrangle_2D.cxx
src/Tools/CMakeLists.txt
src/Tools/ZCracksPlug/CMakeLists.txt [new file with mode: 0644]
src/Tools/ZCracksPlug/zcracks_plugin.py [new file with mode: 0644]
src/Tools/smesh_plugins.py

index aeb0faf2edac471118e6849de198cf87bc67f5b6..f55e54a70b6170f73d2f2ed1ccd5f345c77b6c7f 100755 (executable)
@@ -67,6 +67,7 @@ SET(SMESH_RESOURCES_FILES
   mesh_line_n.png
   mesh_line.png
   mesh_move_node.png
+  mesh_move_without_node.png
   mesh_octahedron.png
   mesh_orientation.png
   mesh.png
diff --git a/resources/mesh_move_without_node.png b/resources/mesh_move_without_node.png
new file mode 100644 (file)
index 0000000..4f4b0d0
Binary files /dev/null and b/resources/mesh_move_without_node.png differ
index 857023efeaefbff358f459b935ba5d235576261f..299b610837ef0c0a1c4bc66fdf7ac26f505a079a 100644 (file)
@@ -23,6 +23,7 @@
 // Declarations needed for usage of DriverMED
 
 #include "SMDSAbs_ElementType.hxx"
+#include "SMESH_DriverMED.hxx"
 
 #include <boost/shared_ptr.hpp>
 
@@ -36,10 +37,10 @@ namespace DriverMED
   /*
    * Returns MED element geom type (MED::EGeometrieElement) by SMDS type
    */
-  int GetMedGeoType( SMDSAbs_EntityType smdsType );
+  MESHDRIVERMED_EXPORT int GetMedGeoType( SMDSAbs_EntityType smdsType );
   
   /*
    * Returns SMDS element geom type by MED type (MED::EGeometrieElement)
    */
-  SMDSAbs_EntityType GetSMDSType( int medType );
+  MESHDRIVERMED_EXPORT SMDSAbs_EntityType GetSMDSType( int medType );
 }
index 58c7147feec9ba2e457b84254e66ae85186cd87c..fa0a8139d86b8434572339ef019ea2892c7257f8 100644 (file)
@@ -45,6 +45,7 @@ SET(_link_LIBRARIES
   ${KERNEL_SALOMEBasics}
   MeshDriver
   SMDS
+  SMESHUtils
 )
 
 SET(_link_LIBRARIES_bin
index ee4da4a6f295ffa4cf7582e054b2d69bab977518..a250b428a9fe6099d4b1fee525b6dc354d6c690b 100644 (file)
 
 #include "DriverSTL_R_SMDS_Mesh.h"
 
-#include "SMDS_Mesh.hxx"
-#include "SMDS_MeshElement.hxx"
-#include "SMDS_MeshNode.hxx"
-#include "SMESH_File.hxx"
-
-#include <gp_Pnt.hxx>
 #include <Basics_Utils.hxx>
 
+#include <gp_Pnt.hxx>
 #include <NCollection_DataMap.hxx>
 #include <Standard_NoMoreObject.hxx>
 
+#include "SMDS_Mesh.hxx"
+#include "SMDS_MeshElement.hxx"
+#include "SMDS_MeshNode.hxx"
+#include "SMESH_File.hxx"
+
 namespace
 {
   struct Hasher
index 5499183cb17440c3562d3873f4f9e19bee344133..2ac7ca5daee2945c5b70ba03bcc1544f87f37c4e 100644 (file)
 
 #include "DriverSTL_W_SMDS_Mesh.h"
 
+#ifdef WIN32
+#define NOMINMAX
+#endif
+
+#include <Basics_Utils.hxx>
+
 #include "SMDS_FaceOfNodes.hxx"
 #include "SMDS_IteratorOnIterators.hxx"
 #include "SMDS_Mesh.hxx"
@@ -32,8 +38,6 @@
 #include "SMESH_File.hxx"
 #include "SMESH_TypeDefs.hxx"
 
-#include <Basics_Utils.hxx>
-
 //#include "utilities.h"
 
 #include <limits>
index 8cc3716b15d715ca539cc3ba5c5ba4c288e2a351..20582c7b15e86b08b563136643caef13ca732414 100644 (file)
@@ -145,7 +145,7 @@ SMESH_ActorDef::SMESH_ActorDef()
 
   double aElem0DSize    = SMESH::GetFloat("SMESH:elem0d_size",5);
   double aBallElemSize  = SMESH::GetFloat("SMESH:ball_elem_size",10);
-  double aBallElemScale = SMESH::GetFloat("SMESH:ball_elem_scale",1);
+  double aBallElemScale = SMESH::GetFloat("SMESH:ball_elem_scale",1.0);
   double aLineWidth     = SMESH::GetFloat("SMESH:element_width",1);
   double aOutlineWidth  = SMESH::GetFloat("SMESH:outline_width",1);
 
@@ -2108,12 +2108,12 @@ double SMESH_ActorDef::GetBallSize(){
   return myBallProp->GetPointSize();
 }
 
-int SMESH_ActorDef::GetBallScale()
+double SMESH_ActorDef::GetBallScale()
 {
   return myBallActor->GetBallScale();
 }
 
-void SMESH_ActorDef::SetBallScale( int theVal )
+void SMESH_ActorDef::SetBallScale( double theVal )
 {
   myBallActor->SetBallScale( theVal );
 }
index f882abc715f2a52d69d0298569e31643194f0b18..2688e99a60358ebf295a48a9f14df8d985a0d851 100644 (file)
@@ -101,8 +101,8 @@ class SMESHOBJECT_EXPORT SMESH_Actor: public SALOME_Actor
   virtual void SetBallSize(double size) = 0;
   virtual double GetBallSize() = 0;
 
-  virtual void SetBallScale(int size) = 0;
-  virtual int GetBallScale() = 0;
+  virtual void SetBallScale(double size) = 0;
+  virtual double GetBallScale() = 0;
 
   enum EReperesent { ePoint, eEdge, eSurface};
   
index cb9695c44ed206b4a646b7d6aba6e417c01d71f5..add4fb6bee5d1a9706d5c14541710ae304c52863 100644 (file)
@@ -144,8 +144,8 @@ class SMESH_ActorDef : public SMESH_Actor
   virtual void SetBallSize(double size);
   virtual double GetBallSize();
 
-  virtual void SetBallScale(int size);
-  virtual int GetBallScale();
+  virtual void SetBallScale(double size);
+  virtual double GetBallScale();
 
   virtual int GetNodeObjId(int theVtkID);
   virtual double* GetNodeCoord(int theObjID);
index a1d8edf752d5f87625bfacd09802efac143b308b..dd7c3480b7968332244c586e04e135ef0fd9a6a2 100644 (file)
@@ -961,9 +961,9 @@ void SMESH_DeviceActor::SetBallEnabled( bool theBallEnabled ) {
 
 /*!
  * Set point marker scale factor
- * \param theBallScale integer value which specifies a scale factor of ball element
+ * \param theBallScale double value which specifies a scale factor of ball element
  */
-void SMESH_DeviceActor::SetBallScale( int theBallScale )
+void SMESH_DeviceActor::SetBallScale( double theBallScale )
 {
   myMapper->SetBallScale( theBallScale );
   myMapper->Modified();
@@ -1019,7 +1019,7 @@ int SMESH_DeviceActor::GetMarkerTexture()
  * Get scale factor of ball element
  * \return scale factor of ball element
  */
-int SMESH_DeviceActor::GetBallScale()
+double SMESH_DeviceActor::GetBallScale()
 {
   return myMapper->GetBallScale();
 }
index d4129d6faa37eaf1a40b236f4aaee1ab163692eb..ce8f74362c1a17957474d13229c0760476324b0d 100644 (file)
@@ -148,13 +148,13 @@ class SMESHOBJECT_EXPORT SMESH_DeviceActor: public vtkLODActor{
 
   void SetMarkerEnabled( bool );
   void SetBallEnabled( bool );
-  void SetBallScale( int );
+  void SetBallScale( double );
   void SetMarkerStd( VTK::MarkerType, VTK::MarkerScale );
   void SetMarkerTexture( int, VTK::MarkerTexture );
   VTK::MarkerType GetMarkerType();
   VTK::MarkerScale GetMarkerScale();
   int GetMarkerTexture();
-  int GetBallScale();
+  double GetBallScale();
 
  protected:
   void Init(TVisualObjPtr theVisualObj, vtkImplicitBoolean* theImplicitBoolean);
index 39f74475706b955df8a2a1b79cf69f97313339bf..7852ef6de3e1f2bdfd388c520286924c5b1104ab 100644 (file)
@@ -74,6 +74,7 @@ SET(_link_LIBRARIES
   ${GEOM_GEOMObject}
   SMESHFiltersSelection
   SMDS
+  SMESHEngine
   SMESHControls
   SMESHObject
 )
index 9bf90fde22d4ba924b749357c9087be6a7463805..c90cb0fa9efe48868146d72afef3b6b371624d3d 100644 (file)
@@ -1316,7 +1316,7 @@ namespace
         int deltaF = 0, deltaV = 0;
         int elem0dSize   = 1;
         int ballSize     = 1;
-        int ballScale    = 1;
+        double ballScale = 1.0;
         int edgeWidth    = 1;
         int outlineWidth = 1;
         double shrinkCoef = 0.0;
@@ -1361,7 +1361,7 @@ namespace
             anActor->GetBallColor( color[0], color[1], color[2] );
             ballColor.setRgbF( color[0], color[1], color[2] );
             ballSize = qMax( (int)anActor->GetBallSize(), 1 ); // minimum allowed size is 1
-            ballScale = qMax( (int)anActor->GetBallScale(), 1 ); // minimum allowed size is 1
+            ballScale = qMax( (double)anActor->GetBallScale(), 1e-2 ); // minimum allowed scale is 1e-2
             // outlines: color
             anActor->GetOutlineColor( color[0], color[1], color[2] );
             outlineColor.setRgbF( color[0], color[1], color[2] );
@@ -5058,8 +5058,8 @@ void SMESHGUI::createPreferences()
                              LightApp_Preferences::IntSpin, "SMESH", "elem0d_size");
   int ballSize = addPreference(tr("PREF_BALL_SIZE"), elemGroup,
                              LightApp_Preferences::IntSpin, "SMESH", "ball_elem_size");
-  int ballScale = addPreference(tr("PREF_BALL_SCALE"), elemGroup,
-                             LightApp_Preferences::IntSpin, "SMESH", "ball_elem_scale");
+  double ballScale = addPreference(tr("PREF_BALL_SCALE"), elemGroup,
+                             LightApp_Preferences::DblSpin, "SMESH", "ball_elem_scale");
   int elemW  = addPreference(tr("PREF_WIDTH"), elemGroup,
                              LightApp_Preferences::IntSpin, "SMESH", "element_width");
   int outW  = addPreference(tr("PREF_OUTLINE_WIDTH"), elemGroup,
@@ -5073,8 +5073,9 @@ void SMESHGUI::createPreferences()
   setPreferenceProperty( ballSize, "min", 1 );
   setPreferenceProperty( ballSize, "max", 10 );
 
-  setPreferenceProperty( ballScale, "min", 1 );
-  setPreferenceProperty( ballScale, "max", 10 );
+  setPreferenceProperty( ballScale, "min", 1e-2 );
+  setPreferenceProperty( ballScale, "max", 1e7 );
+  setPreferenceProperty( ballScale, "step", 0.5 );
 
   setPreferenceProperty( elemW, "min", 1 );
   setPreferenceProperty( elemW, "max", 5 );
@@ -5748,7 +5749,7 @@ void SMESHGUI::storeVisualParameters (int savePoint)
                   sizeStr << QString::number((int)aSmeshActor->Get0DSize());
                   sizeStr << "ball";
                   sizeStr << QString::number((int)aSmeshActor->GetBallSize());
-                  sizeStr << QString::number((int)aSmeshActor->GetBallScale());
+                  sizeStr << QString::number((double)aSmeshActor->GetBallScale());
                   sizeStr << "shrink";
                   sizeStr << QString::number(aSmeshActor->GetShrinkFactor());
                   sizeStr << "orientation";
@@ -6333,7 +6334,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
               int outlineWidth = -1;
               int elem0dSize = -1;
               int ballSize = -1;
-              int ballScale = -1;
+              double ballScale = -1.0;
               double shrinkSize = -1;
               double orientationSize = -1;
               bool orientation3d = false;
@@ -6363,11 +6364,11 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
                 else if ( type == "ball" ) {
                   // balls are specified by two values: size:scale, where
                   // - size - is a integer value specifying size
-                  // - scale - is a integer value specifying scale factor
-                  if ( i+1 >= sizes.count() ) break;                    // format error
-                  int v1 = sizes[i+1].toInt( &bOk ); if ( !bOk ) break;  // format error
-                  if ( i+2 >= sizes.count() ) break;                          // format error
-                  int v2 = sizes[i+2].toInt( &bOk ); if ( !bOk ) break;       // format error
+                  // - scale - is a double value specifying scale factor
+                  if ( i+1 >= sizes.count() ) break;                       // format error
+                  int v1 = sizes[i+1].toInt( &bOk ); if ( !bOk ) break;    // format error
+                  if ( i+2 >= sizes.count() ) break;                       // format error
+                  double v2 = sizes[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
                   ballSize = v1;
                   ballScale = v2;
                   i += 2;
@@ -6407,7 +6408,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
               if ( ballSize > 0 )
                 aSmeshActor->SetBallSize( ballSize );
               // ball scale
-              if ( ballScale > 0 )
+              if ( ballScale > 0.0 )
                 aSmeshActor->SetBallScale( ballScale );
               // shrink factor
               if ( shrinkSize > 0 )
index 924ad35894f6aa7e85c12eea0dc3b0ae28d14b6b..368aa77ca6624905b542afd43c2ca2571e31d680 100644 (file)
@@ -384,7 +384,9 @@ void SMESHGUI_DuplicateNodesDlg::onConstructorsClicked (int constructorId)
       break;
     }
   }
-  
+  myGroupArguments->hide();
+  myGroupArguments->show();
+  this->resize(this->sizeHint().width(), this->minimumSizeHint().height());
   // Process selection
   onSelectionChanged();
 }
index 672c679758514f80fd9dd77a137dd4e207c9f569..5dba32360f703511d8bb65eb19559ffd724f2acf 100644 (file)
@@ -487,6 +487,9 @@ void SMESHGUI_ExtrusionDlg::ConstructorsClicked (int constructorId)
   if (CheckBoxMesh->isChecked())
     onSelectMesh(true);
 
+  myEditCurrentArgument->hide();
+  myEditCurrentArgument->show();
+
   connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
 }
 
index 68d20cf4a54b8da72ae95481069028c52c95b3a7..970500e69d7f60d60c8abd5e20da97d695ab7b48 100644 (file)
@@ -61,6 +61,7 @@
 #include <gp_Pnt.hxx>
 
 // Qt includes
+#include <QApplication>
 #include <QGroupBox>
 #include <QGridLayout>
 #include <QHBoxLayout>
@@ -95,12 +96,11 @@ SMESHGUI_MakeNodeAtPointDlg::SMESHGUI_MakeNodeAtPointDlg()
   QVBoxLayout* aDlgLay = new QVBoxLayout (mainFrame());
   aDlgLay->setMargin(0);
   aDlgLay->setSpacing(SPACING);
+  myMainFrame = createMainFrame(mainFrame());
 
-  QWidget* aMainFrame = createMainFrame  (mainFrame());
+  aDlgLay->addWidget(myMainFrame);
 
-  aDlgLay->addWidget(aMainFrame);
-
-  aDlgLay->setStretchFactor(aMainFrame, 1);
+  aDlgLay->setStretchFactor(myMainFrame, 1);
 }
 
 //=======================================================================
@@ -112,62 +112,33 @@ QWidget* SMESHGUI_MakeNodeAtPointDlg::createMainFrame (QWidget* theParent)
   QWidget* aFrame = new QWidget(theParent);
 
   SUIT_ResourceMgr* rm = SMESH::GetResourceMgr( SMESHGUI::GetSMESHGUI() );
-  QPixmap iconMoveNode (rm->loadPixmap("SMESH", tr("ICON_DLG_MOVE_NODE")));
-  QPixmap iconSelect   (rm->loadPixmap("SMESH", tr("ICON_SELECT")));
+  QPixmap iconMoveNode        (rm->loadPixmap("SMESH", tr("ICON_DLG_MOVE_NODE")));
+  QPixmap iconMoveWithoutNode (rm->loadPixmap("SMESH", tr("ICON_DLG_MOVE_WITHOUT_NODE")));
+  QPixmap iconSelect          (rm->loadPixmap("SMESH", tr("ICON_SELECT")));
 
   // constructor
-
-  QGroupBox* aPixGrp = new QGroupBox(tr("MOVE_NODE"), aFrame);
-  QButtonGroup* aBtnGrp = new QButtonGroup(this);
+  QGroupBox* aPixGrp = new QGroupBox(tr("MOVE_NODE"), this);
+  aPixGrp->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+  myButtonGroup = new QButtonGroup(this);
   QHBoxLayout* aPixGrpLayout = new QHBoxLayout(aPixGrp);
   aPixGrpLayout->setMargin(MARGIN);
   aPixGrpLayout->setSpacing(SPACING);
 
-  QRadioButton* aRBut = new QRadioButton(aPixGrp);
-  aRBut->setIcon(iconMoveNode);
-  aRBut->setChecked(true);
-  aPixGrpLayout->addWidget(aRBut);
-  aBtnGrp->addButton(aRBut, 0);
-
-  // coordinates
-
-  QGroupBox* aCoordGrp = new QGroupBox(tr("DESTINATION"), aFrame);
-  QHBoxLayout* aCoordGrpLayout = new QHBoxLayout(aCoordGrp);
-  aCoordGrpLayout->setMargin(MARGIN);
-  aCoordGrpLayout->setSpacing(SPACING);
-
-  myCoordBtn = new QPushButton(aCoordGrp);
-  myCoordBtn->setIcon(iconSelect);
-  myCoordBtn->setCheckable(true);
-
-  QLabel* aXLabel = new QLabel(tr("SMESH_X"), aCoordGrp);
-  myX = new SMESHGUI_SpinBox(aCoordGrp);
-
-  QLabel* aYLabel = new QLabel(tr("SMESH_Y"), aCoordGrp);
-  myY = new SMESHGUI_SpinBox(aCoordGrp);
-
-  QLabel* aZLabel = new QLabel(tr("SMESH_Z"), aCoordGrp);
-  myZ = new SMESHGUI_SpinBox(aCoordGrp);
+  myRButNodeToMove = new QRadioButton(aPixGrp);
+  myRButMoveWithoutNode = new QRadioButton(aPixGrp);
+  myRButNodeToMove->setIcon(iconMoveNode);
+  myRButMoveWithoutNode->setIcon(iconMoveWithoutNode);
+  myRButNodeToMove->setChecked(true);
 
-  myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
-  myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
-  myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  aPixGrpLayout->addWidget(myRButNodeToMove);
+  aPixGrpLayout->addWidget(myRButMoveWithoutNode);
+  myButtonGroup->addButton(myRButNodeToMove, 0);
+  myButtonGroup->addButton(myRButMoveWithoutNode, 1);
 
-  aCoordGrpLayout->addWidget(myCoordBtn);
-  aCoordGrpLayout->addWidget(aXLabel);
-  aCoordGrpLayout->addWidget(myX);
-  aCoordGrpLayout->addWidget(aYLabel);
-  aCoordGrpLayout->addWidget(myY);
-  aCoordGrpLayout->addWidget(aZLabel);
-  aCoordGrpLayout->addWidget(myZ);
-  aCoordGrpLayout->setStretchFactor(myX, 1);
-  aCoordGrpLayout->setStretchFactor(myY, 1);
-  aCoordGrpLayout->setStretchFactor(myZ, 1);
-
-  // node ID
+  // Node to move
 
   myNodeToMoveGrp = new QGroupBox(tr("NODE_2MOVE"), aFrame);
-
+  myNodeToMoveGrp->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   QLabel* idLabel = new QLabel(tr("NODE_2MOVE_ID"), myNodeToMoveGrp);
   myIdBtn = new QPushButton(myNodeToMoveGrp);
   myIdBtn->setIcon(iconSelect);
@@ -195,27 +166,9 @@ QWidget* SMESHGUI_MakeNodeAtPointDlg::createMainFrame (QWidget* theParent)
   myCurrentZ->setButtonSymbols(QAbstractSpinBox::NoButtons);
   myCurrentZ->setReadOnly(true);
 
-  QLabel* aDXLabel = new QLabel(tr("SMESH_DX"), aCoordWidget);
-  myDX = new SMESHGUI_SpinBox(aCoordWidget);
-  myDX->setButtonSymbols(QAbstractSpinBox::NoButtons);
-  myDX->setReadOnly(true);
-
-  QLabel* aDYLabel = new QLabel(tr("SMESH_DY"), aCoordWidget);
-  myDY = new SMESHGUI_SpinBox(aCoordWidget);
-  myDY->setButtonSymbols(QAbstractSpinBox::NoButtons);
-  myDY->setReadOnly(true);
-
-  QLabel* aDZLabel = new QLabel(tr("SMESH_DZ"), aCoordWidget);
-  myDZ = new SMESHGUI_SpinBox(aCoordWidget);
-  myDZ->setButtonSymbols(QAbstractSpinBox::NoButtons);
-  myDZ->setReadOnly(true);
-
   myCurrentX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
   myCurrentY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
   myCurrentZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
-  myDX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
-  myDY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
-  myDZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
 
   QGridLayout* aCoordLayout = new QGridLayout(aCoordWidget);
   aCoordLayout->setMargin(0);
@@ -226,19 +179,10 @@ QWidget* SMESHGUI_MakeNodeAtPointDlg::createMainFrame (QWidget* theParent)
   aCoordLayout->addWidget(myCurrentY,     0, 3);
   aCoordLayout->addWidget(aCurrentZLabel, 0, 4);
   aCoordLayout->addWidget(myCurrentZ,     0, 5);
-  aCoordLayout->addWidget(aDXLabel,       1, 0);
-  aCoordLayout->addWidget(myDX,           1, 1);
-  aCoordLayout->addWidget(aDYLabel,       1, 2);
-  aCoordLayout->addWidget(myDY,           1, 3);
-  aCoordLayout->addWidget(aDZLabel,       1, 4);
-  aCoordLayout->addWidget(myDZ,           1, 5);
   aCoordLayout->setColumnStretch(1, 1);
   aCoordLayout->setColumnStretch(3, 1);
   aCoordLayout->setColumnStretch(5, 1);
 
-  myAutoSearchChkBox = new QCheckBox( tr("AUTO_SEARCH"), myNodeToMoveGrp);
-  myPreviewChkBox = new QCheckBox( tr("PREVIEW"), myNodeToMoveGrp);
-
   QGridLayout* myNodeToMoveGrpLayout = new QGridLayout(myNodeToMoveGrp);
   myNodeToMoveGrpLayout->setSpacing(SPACING);
   myNodeToMoveGrpLayout->setMargin(MARGIN);
@@ -248,20 +192,79 @@ QWidget* SMESHGUI_MakeNodeAtPointDlg::createMainFrame (QWidget* theParent)
   myNodeToMoveGrpLayout->addWidget( myId,    0, 2 );
   myNodeToMoveGrpLayout->addWidget( myUpdateBtn, 0, 3 );
   myNodeToMoveGrpLayout->addWidget( aCoordWidget,       1, 0, 1, 4 );
-  myNodeToMoveGrpLayout->addWidget( myAutoSearchChkBox, 2, 0, 1, 4 );
-  myNodeToMoveGrpLayout->addWidget( myPreviewChkBox,    3, 0, 1, 4 );
+
+  // Destination
+
+  myDestinationGrp = new QGroupBox(tr("DESTINATION"), aFrame);
+  myDestinationGrp->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+
+  myDestBtn = new QPushButton(myDestinationGrp);
+  myDestBtn->setIcon(iconSelect);
+  myDestBtn->setCheckable(true);
+
+  QLabel* aDestinationXLabel = new QLabel(tr("SMESH_X"), myDestinationGrp);
+  myDestinationX = new SMESHGUI_SpinBox(myDestinationGrp);
+
+  QLabel* aDestinationYLabel = new QLabel(tr("SMESH_Y"), myDestinationGrp);
+  myDestinationY = new SMESHGUI_SpinBox(myDestinationGrp);
+
+  QLabel* aDestinationZLabel = new QLabel(tr("SMESH_Z"), myDestinationGrp);
+  myDestinationZ = new SMESHGUI_SpinBox(myDestinationGrp);
+
+  myDestDXLabel = new QLabel(tr("SMESH_DX"), myDestinationGrp);
+  myDestDX = new SMESHGUI_SpinBox(myDestinationGrp);
+  myDestDX->setReadOnly(true);
+
+  myDestDYLabel = new QLabel(tr("SMESH_DY"), myDestinationGrp);
+  myDestDY = new SMESHGUI_SpinBox(myDestinationGrp);
+  myDestDY->setReadOnly(true);
+
+  myDestDZLabel = new QLabel(tr("SMESH_DZ"), myDestinationGrp);
+  myDestDZ = new SMESHGUI_SpinBox(myDestinationGrp);
+  myDestDZ->setReadOnly(true);
+
+  myDestinationX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myDestinationY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myDestinationZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myDestDX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myDestDY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myDestDZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+
+  QGridLayout* aDestLayout = new QGridLayout(myDestinationGrp);
+  aDestLayout->setMargin(MARGIN);
+  aDestLayout->setSpacing(SPACING);
+  aDestLayout->addWidget(myDestBtn, 0, 0);
+  aDestLayout->addWidget(aDestinationXLabel, 0, 1);
+  aDestLayout->addWidget(myDestinationX,     0, 2);
+  aDestLayout->addWidget(aDestinationYLabel, 0, 3);
+  aDestLayout->addWidget(myDestinationY,     0, 4);
+  aDestLayout->addWidget(aDestinationZLabel, 0, 5);
+  aDestLayout->addWidget(myDestinationZ,     0, 6);
+  aDestLayout->addWidget(myDestDXLabel,      1, 1);
+  aDestLayout->addWidget(myDestDX,           1, 2);
+  aDestLayout->addWidget(myDestDYLabel,      1, 3);
+  aDestLayout->addWidget(myDestDY,           1, 4);
+  aDestLayout->addWidget(myDestDZLabel,      1, 5);
+  aDestLayout->addWidget(myDestDZ,           1, 6);
+  aDestLayout->setColumnStretch(2, 1);
+  aDestLayout->setColumnStretch(4, 1);
+  aDestLayout->setColumnStretch(6, 1);
+
+  // Preview
+
+  myPreviewChkBox = new QCheckBox( tr("PREVIEW"), aFrame);
 
   QVBoxLayout* aLay = new QVBoxLayout(aFrame);
   aLay->addWidget(aPixGrp);
-  aLay->addWidget(aCoordGrp);
   aLay->addWidget(myNodeToMoveGrp);
+  aLay->addWidget(myDestinationGrp);
+  aLay->addWidget(myPreviewChkBox);
 
-  connect(myCoordBtn,         SIGNAL (toggled(bool)), this, SLOT(ButtonToggled(bool)));
+  connect(myDestBtn,          SIGNAL (toggled(bool)), this, SLOT(ButtonToggled(bool)));
   connect(myIdBtn,            SIGNAL (toggled(bool)), this, SLOT(ButtonToggled(bool)));
-  connect(myAutoSearchChkBox, SIGNAL (toggled(bool)), this, SLOT(ButtonToggled(bool)));
+  connect(myButtonGroup,      SIGNAL (buttonClicked(int)),  SLOT(ConstructorsClicked(int)));
 
   myIdBtn->setChecked(true);
-  myAutoSearchChkBox->setChecked(true);
 
   return aFrame;
 }
@@ -277,38 +280,61 @@ void SMESHGUI_MakeNodeAtPointDlg::ButtonToggled (bool on)
 {
   const QObject* aSender = sender();
   if ( on ) {
-    if ( aSender == myCoordBtn ) // button to set coord by node selection
+    if ( aSender == myDestBtn ) // button to set coord by node selection
     {
       if ( myIdBtn->isEnabled() )
         myIdBtn->setChecked( !on );
     }
     else if ( aSender == myIdBtn ) // button to select a node to move
     {
-      myCoordBtn->setChecked( !on );
+      myDestBtn->setChecked( !on );
     }
   }      
-  if ( aSender == myAutoSearchChkBox ) // automatic node search
-  {
-    if ( on ) {
+}
+//================================================================================
+/*!
+ * \brief SLOT called when clicked radio button
+  * \param int - number of the button
+ */
+//================================================================================
+void SMESHGUI_MakeNodeAtPointDlg::ConstructorsClicked (int constructorId)
+{
+  switch (constructorId) {
+  case 0:
+    {
+      myDestDXLabel->show();
+      myDestDYLabel->show();
+      myDestDZLabel->show();
+      myDestDX->show();
+      myDestDY->show();
+      myDestDZ->show();
       myCurrentX->SetValue(0);
       myCurrentY->SetValue(0);
       myCurrentZ->SetValue(0);
-      myDX->SetValue(0);
-      myDY->SetValue(0);
-      myDZ->SetValue(0);
-      myId->setText("");
-      myId->setReadOnly ( true );
-      myIdBtn->setChecked( false );
-      myIdBtn->setEnabled( false );
-      myCoordBtn->setChecked( true );
-      myUpdateBtn->setEnabled( false );
+      if (!myNodeToMoveGrp->isVisible()) myNodeToMoveGrp->show();
+      break;
     }
-    else {
-      myId->setReadOnly ( false );
-      myIdBtn->setEnabled( true );
-      myUpdateBtn->setEnabled( true );
+  case 1:
+    {
+      myId->setText("");
+      myCurrentX->SetValue(0);
+      myCurrentY->SetValue(0);
+      myCurrentZ->SetValue(0);
+      myDestDXLabel->hide();
+      myDestDYLabel->hide();
+      myDestDZLabel->hide();
+      myDestDX->hide();
+      myDestDY->hide();
+      myDestDZ->hide();
+      if (myNodeToMoveGrp->isVisible()) {myNodeToMoveGrp->hide();}
+      break;
     }
   }
+  QApplication::instance()->processEvents();
+  myMainFrame->hide();
+  myMainFrame->show();
+  updateGeometry();
+  resize(minimumSizeHint());
 }
 
 //================================================================================
@@ -326,14 +352,17 @@ SMESHGUI_MakeNodeAtPointOp::SMESHGUI_MakeNodeAtPointOp()
 
   myNoPreview = false;
   myUpdateDestination = false;
+  myDestCoordChanged = true;
 
   // connect signals and slots
-  connect(myDlg->myX, SIGNAL (valueChanged(double)), this, SLOT(redisplayPreview()));
-  connect(myDlg->myY, SIGNAL (valueChanged(double)), this, SLOT(redisplayPreview()));
-  connect(myDlg->myZ, SIGNAL (valueChanged(double)), this, SLOT(redisplayPreview()));
+  connect(myDlg->myDestinationX, SIGNAL (valueChanged(double)), this, SLOT(redisplayPreview()));
+  connect(myDlg->myDestinationY, SIGNAL (valueChanged(double)), this, SLOT(redisplayPreview()));
+  connect(myDlg->myDestinationZ, SIGNAL (valueChanged(double)), this, SLOT(redisplayPreview()));
+  connect(myDlg->myDestDX, SIGNAL (valueChanged(double)), this, SLOT(onDestCoordChanged()));
+  connect(myDlg->myDestDY, SIGNAL (valueChanged(double)), this, SLOT(onDestCoordChanged()));
+  connect(myDlg->myDestDZ, SIGNAL (valueChanged(double)), this, SLOT(onDestCoordChanged()));
   connect(myDlg->myId,SIGNAL (textChanged(const QString&)),SLOT(redisplayPreview()));
   connect(myDlg->myPreviewChkBox,   SIGNAL (toggled(bool)),SLOT(redisplayPreview()));
-  connect(myDlg->myAutoSearchChkBox,SIGNAL (toggled(bool)),SLOT(redisplayPreview()));
 
   // IPAL22913: TC6.5.0: selected in "Move node" dialog box node is not highlighted
   // note: this slot seems to be lost together with removed obsolete SMESHGUI_MoveNodesDlg class
@@ -348,6 +377,13 @@ void SMESHGUI_MakeNodeAtPointOp::onUpdateDestination()
   myUpdateDestination = false;
 }
 
+void SMESHGUI_MakeNodeAtPointOp::onDestCoordChanged()
+{
+  myDestCoordChanged = false;
+  redisplayPreview();
+  myDestCoordChanged = true;
+}
+
 //=======================================================================
 // function : startOperation()
 // purpose  : Init dialog fields, connect signals and slots, show dialog
@@ -380,17 +416,23 @@ void SMESHGUI_MakeNodeAtPointOp::startOperation()
   // IPAL19360
   SMESHGUI_SelectionOp::startOperation(); // this method should be called only after filter creation
   //activateSelection(); // set filters   // called inside of previous statement
-
-  myDlg->myX->SetValue(0);
-  myDlg->myY->SetValue(0);
-  myDlg->myZ->SetValue(0);
+  myDlg->myId->setText("");
+  myDlg->myDestinationX->SetValue(0);
+  myDlg->myDestinationY->SetValue(0);
+  myDlg->myDestinationZ->SetValue(0);
+  myDlg->myDestDX->SetValue(0);
+  myDlg->myDestDY->SetValue(0);
+  myDlg->myDestDZ->SetValue(0);
   myDlg->myCurrentX->SetValue(0);
   myDlg->myCurrentY->SetValue(0);
   myDlg->myCurrentZ->SetValue(0);
-  myDlg->myDX->SetValue(0);
-  myDlg->myDY->SetValue(0);
-  myDlg->myDZ->SetValue(0);
-  myDlg->myId->setText("");
+  myDlg->myDestDX->setReadOnly(true);
+  myDlg->myDestDY->setReadOnly(true);
+  myDlg->myDestDZ->setReadOnly(true);
+  myDlg->myRButNodeToMove->setChecked(true);
+
+  myDlg->ConstructorsClicked(GetConstructorId());
+
   myDlg->show();
 
   onSelectionDone(); // init myMeshActor
@@ -403,6 +445,15 @@ void SMESHGUI_MakeNodeAtPointOp::startOperation()
   }
 }
 
+//=================================================================================
+// function : GetConstructorId()
+// purpose  :
+//=================================================================================
+int SMESHGUI_MakeNodeAtPointOp::GetConstructorId()
+{
+  return myDlg->myButtonGroup->checkedId();
+}
+
 //================================================================================
 /*!
  * \brief Stops operation
@@ -450,9 +501,9 @@ bool SMESHGUI_MakeNodeAtPointOp::onApply()
   }
 
   QStringList aParameters;
-  aParameters << myDlg->myX->text();
-  aParameters << myDlg->myY->text();
-  aParameters << myDlg->myZ->text();
+  aParameters << myDlg->myDestinationX->text();
+  aParameters << myDlg->myDestinationY->text();
+  aParameters << myDlg->myDestinationZ->text();
 
   try {
     SMESH::SMESH_Mesh_var aMesh = SMESH::GetMeshByIO(myMeshActor->getIO());
@@ -470,24 +521,23 @@ bool SMESHGUI_MakeNodeAtPointOp::onApply()
     bool ok;
     int anId = myDlg->myId->text().toInt( &ok );
     if( !ok || anId < 1 )
-      anId = aMeshEditor->FindNodeClosestTo(myDlg->myX->GetValue(),
-                                            myDlg->myY->GetValue(),
-                                            myDlg->myZ->GetValue());
+      anId = aMeshEditor->FindNodeClosestTo(myDlg->myDestinationX->GetValue(),
+                                            myDlg->myDestinationY->GetValue(),
+                                            myDlg->myDestinationZ->GetValue());
 
     int aResult = aMeshEditor->MoveNode(anId,
-                                        myDlg->myX->GetValue(),
-                                        myDlg->myY->GetValue(),
-                                        myDlg->myZ->GetValue() );
+                                        myDlg->myDestinationX->GetValue(),
+                                        myDlg->myDestinationY->GetValue(),
+                                        myDlg->myDestinationZ->GetValue() );
 
     if (aResult)
     {
       myDlg->myCurrentX->SetValue(0);
       myDlg->myCurrentY->SetValue(0);
       myDlg->myCurrentZ->SetValue(0);
-      myDlg->myDX->SetValue(0);
-      myDlg->myDY->SetValue(0);
-      myDlg->myDZ->SetValue(0);
-      myDlg->myId->setText("");
+      myDlg->myDestDX->SetValue(0);
+      myDlg->myDestDY->SetValue(0);
+      myDlg->myDestDZ->SetValue(0);
 
       SALOME_ListIO aList;
       selectionMgr()->setSelectedObjects(aList,false);
@@ -515,8 +565,7 @@ bool SMESHGUI_MakeNodeAtPointOp::onApply()
 bool SMESHGUI_MakeNodeAtPointOp::isValid( QString& msg )
 {
   bool ok = true;
-  if ( myMeshActor &&
-       !myDlg->myAutoSearchChkBox->isChecked() )
+  if ( myMeshActor && myDlg->myRButNodeToMove->isChecked() )
   {
     ok = false;
     int id = myDlg->myId->text().toInt();
@@ -527,9 +576,9 @@ bool SMESHGUI_MakeNodeAtPointOp::isValid( QString& msg )
       msg += tr("INVALID_ID") + "\n";
   }
 
-  ok = myDlg->myX->isValid( msg, !myNoPreview ) && ok;
-  ok = myDlg->myY->isValid( msg, !myNoPreview ) && ok;
-  ok = myDlg->myZ->isValid( msg, !myNoPreview ) && ok;
+  ok = myDlg->myDestinationX->isValid( msg, !myNoPreview ) && ok;
+  ok = myDlg->myDestinationY->isValid( msg, !myNoPreview ) && ok;
+  ok = myDlg->myDestinationZ->isValid( msg, !myNoPreview ) && ok;
 
   return ok;
 }
@@ -553,7 +602,7 @@ void SMESHGUI_MakeNodeAtPointOp::onSelectionDone()
     SMESH_Actor* aMeshActor = SMESH::FindActorByEntry(anIO->getEntry());
 
     if (!aMeshActor) { // coord by geom
-      if ( myDlg->myCoordBtn->isChecked() ) {
+      if ( myDlg->myDestBtn->isChecked() ) {
         GEOM::GEOM_Object_var geom = SMESH::IObjectToInterface<GEOM::GEOM_Object>(anIO);
         if ( !geom->_is_nil() ) {
           TopoDS_Vertex aShape;
@@ -561,9 +610,9 @@ void SMESHGUI_MakeNodeAtPointOp::onSelectionDone()
                aShape.ShapeType() == TopAbs_VERTEX ) {
             gp_Pnt P = BRep_Tool::Pnt(aShape);
             myNoPreview = true;
-            myDlg->myX->SetValue(P.X());
-            myDlg->myY->SetValue(P.Y());
-            myDlg->myZ->SetValue(P.Z());
+            myDlg->myDestinationX->SetValue(P.X());
+            myDlg->myDestinationY->SetValue(P.Y());
+            myDlg->myDestinationZ->SetValue(P.Z());
             myNoPreview = false;
             redisplayPreview();
           }
@@ -581,10 +630,10 @@ void SMESHGUI_MakeNodeAtPointOp::onSelectionDone()
       if (SMDS_Mesh* aMesh = aMeshActor->GetObject()->GetMesh()) {
         if (const SMDS_MeshNode* aNode = aMesh->FindNode(aString.toInt())) {
           myNoPreview = true;
-          if ( myDlg->myCoordBtn->isChecked() ) { // set coord
-            myDlg->myX->SetValue(aNode->X());
-            myDlg->myY->SetValue(aNode->Y());
-            myDlg->myZ->SetValue(aNode->Z());
+          if ( myDlg->myDestBtn->isChecked() ) { // set coord
+            myDlg->myDestinationX->SetValue(aNode->X());
+            myDlg->myDestinationY->SetValue(aNode->Y());
+            myDlg->myDestinationZ->SetValue(aNode->Z());
             myNoPreview = false;
             redisplayPreview();
           }
@@ -599,15 +648,18 @@ void SMESHGUI_MakeNodeAtPointOp::onSelectionDone()
             double x = aCurrentNode->X();
             double y = aCurrentNode->Y();
             double z = aCurrentNode->Z();
-            double dx = myDlg->myX->GetValue() - x;
-            double dy = myDlg->myY->GetValue() - y;
-            double dz = myDlg->myZ->GetValue() - z;
+            double dx = myDlg->myDestinationX->GetValue() - x;
+            double dy = myDlg->myDestinationY->GetValue() - y;
+            double dz = myDlg->myDestinationZ->GetValue() - z;
             myDlg->myCurrentX->SetValue(x);
             myDlg->myCurrentY->SetValue(y);
             myDlg->myCurrentZ->SetValue(z);
-            myDlg->myDX->SetValue(dx);
-            myDlg->myDY->SetValue(dy);
-            myDlg->myDZ->SetValue(dz);
+            myDlg->myDestDX->SetValue(dx);
+            myDlg->myDestDY->SetValue(dy);
+            myDlg->myDestDZ->SetValue(dz);
+            myDlg->myDestDX->setReadOnly(false);
+            myDlg->myDestDY->setReadOnly(false);
+            myDlg->myDestDZ->setReadOnly(false);
           }
         }
       }
@@ -633,20 +685,10 @@ void SMESHGUI_MakeNodeAtPointOp::redisplayPreview()
   bool moveShown = false;
   if ( myMeshActor)
   {
-    const bool autoSearch = myDlg->myAutoSearchChkBox->isChecked();
-    const bool preview    = myDlg->myPreviewChkBox->isChecked();
-    if ( autoSearch )
-    {
-      myDlg->myCurrentX->SetValue(0);
-      myDlg->myCurrentY->SetValue(0);
-      myDlg->myCurrentZ->SetValue(0);
-      myDlg->myDX->SetValue(0);
-      myDlg->myDY->SetValue(0);
-      myDlg->myDZ->SetValue(0);
-      myDlg->myId->setText("");
-    }
+    const bool isPreview = myDlg->myPreviewChkBox->isChecked();
+    const bool isMoveNode = myDlg->myRButMoveWithoutNode->isChecked();
     QString msg;
-    if ( autoSearch || isValid( msg ) )
+    if ( isValid( msg ) )
     {
       try {
         SMESH::SMESH_Mesh_var aMesh = SMESH::GetMeshByIO(myMeshActor->getIO());
@@ -656,53 +698,68 @@ void SMESHGUI_MakeNodeAtPointOp::redisplayPreview()
           {
             SUIT_OverrideCursor aWaitCursor;
 
-            int anId = 0;
-            if ( autoSearch )
-              anId = aPreviewer->FindNodeClosestTo(myDlg->myX->GetValue(),
-                                                   myDlg->myY->GetValue(),
-                                                   myDlg->myZ->GetValue());
-            else
-              anId = myDlg->myId->text().toInt();
+            int anId = myDlg->myId->text().toInt();
 
-            // find id and/or just compute preview
-            aPreviewer->MoveNode(anId,
-                                 myDlg->myX->GetValue(),
-                                 myDlg->myY->GetValue(),
-                                 myDlg->myZ->GetValue());
-            if ( autoSearch ) { // set found id
-              QString idTxt("%1");
-              if ( anId > 0 )
-                idTxt = idTxt.arg( anId );
-              else
-                idTxt = "";
-              myDlg->myId->setText( idTxt );
-            }
-
-            SMESH::double_array* aXYZ = aMesh->GetNodeXYZ( anId );
-            if( aXYZ && aXYZ->length() >= 3 )
+            SMESH::double_array_var aXYZ = aMesh->GetNodeXYZ( anId );
+            if( &aXYZ.in() && aXYZ->length() >= 3 )
             {
-              double x = aXYZ->operator[](0);
-              double y = aXYZ->operator[](1);
-              double z = aXYZ->operator[](2);
+              double x = aXYZ[0];
+              double y = aXYZ[1];
+              double z = aXYZ[2];
+              double dx = 0;
+              double dy = 0;
+              double dz = 0;
 
               if ( myUpdateDestination ) {
-                myDlg->myX->SetValue(x);
-                myDlg->myY->SetValue(y);
-                myDlg->myZ->SetValue(z);
+                myDlg->myDestinationX->SetValue(x);
+                myDlg->myDestinationY->SetValue(y);
+                myDlg->myDestinationZ->SetValue(z);
+              }
+              if ( myDestCoordChanged ) {
+                dx = myDlg->myDestinationX->GetValue() - myDlg->myCurrentX->GetValue();
+                dy = myDlg->myDestinationY->GetValue() - myDlg->myCurrentY->GetValue();
+                dz = myDlg->myDestinationZ->GetValue() - myDlg->myCurrentZ->GetValue();
+                myDlg->myDestDX->SetValue(dx);
+                myDlg->myDestDY->SetValue(dy);
+                myDlg->myDestDZ->SetValue(dz);
+              }
+              else {
+                dx = myDlg->myDestDX->GetValue() + myDlg->myCurrentX->GetValue();;
+                dy = myDlg->myDestDY->GetValue() + myDlg->myCurrentY->GetValue();;
+                dz = myDlg->myDestDZ->GetValue() + myDlg->myCurrentZ->GetValue();;
+                myDlg->myDestinationX->SetValue(dx);
+                myDlg->myDestinationY->SetValue(dy);
+                myDlg->myDestinationZ->SetValue(dz);
               }
-
-              double dx = myDlg->myX->GetValue() - x;
-              double dy = myDlg->myY->GetValue() - y;
-              double dz = myDlg->myZ->GetValue() - z;
               myDlg->myCurrentX->SetValue(x);
               myDlg->myCurrentY->SetValue(y);
               myDlg->myCurrentZ->SetValue(z);
-              myDlg->myDX->SetValue(dx);
-              myDlg->myDY->SetValue(dy);
-              myDlg->myDZ->SetValue(dz);
+              myDlg->myDestDX->setReadOnly(false);
+              myDlg->myDestDY->setReadOnly(false);
+              myDlg->myDestDZ->setReadOnly(false);
             }
+            else {
+              myDlg->myCurrentX->SetValue(0);
+              myDlg->myCurrentY->SetValue(0);
+              myDlg->myCurrentZ->SetValue(0);
+              myDlg->myDestDX->SetValue(0);
+              myDlg->myDestDY->SetValue(0);
+              myDlg->myDestDZ->SetValue(0);
+              myDlg->myDestDX->setReadOnly(true);
+              myDlg->myDestDY->setReadOnly(true);
+              myDlg->myDestDZ->setReadOnly(true);
+            }
+            if ( isPreview && isMoveNode && anId == 0 )
+              anId = aPreviewer->FindNodeClosestTo(myDlg->myDestinationX->GetValue(),
+                                                   myDlg->myDestinationY->GetValue(),
+                                                   myDlg->myDestinationZ->GetValue());
+            // find id and/or just compute preview
+            aPreviewer->MoveNode(anId,
+                                 myDlg->myDestinationX->GetValue(),
+                                 myDlg->myDestinationY->GetValue(),
+                                 myDlg->myDestinationZ->GetValue());
 
-            if ( preview ) { // fill preview data
+            if ( isPreview ) { // fill preview data
               aMeshPreviewStruct = aPreviewer->GetPreviewData();
               moveShown = ( anId > 0 );
             }
@@ -718,9 +775,9 @@ void SMESHGUI_MakeNodeAtPointOp::redisplayPreview()
     aMeshPreviewStruct = new SMESH::MeshPreviewStruct();
 
     aMeshPreviewStruct->nodesXYZ.length(1);
-    aMeshPreviewStruct->nodesXYZ[0].x = myDlg->myX->GetValue();
-    aMeshPreviewStruct->nodesXYZ[0].y = myDlg->myY->GetValue();
-    aMeshPreviewStruct->nodesXYZ[0].z = myDlg->myZ->GetValue();
+    aMeshPreviewStruct->nodesXYZ[0].x = myDlg->myDestinationX->GetValue();
+    aMeshPreviewStruct->nodesXYZ[0].y = myDlg->myDestinationY->GetValue();
+    aMeshPreviewStruct->nodesXYZ[0].z = myDlg->myDestinationZ->GetValue();
 
     aMeshPreviewStruct->elementTypes.length(1);
     aMeshPreviewStruct->elementTypes[0].SMDS_ElementType = SMESH::NODE;
@@ -737,7 +794,7 @@ void SMESHGUI_MakeNodeAtPointOp::redisplayPreview()
     mySimulation->SetData(aMeshPreviewStruct._retn());
   }
   else
-{
+  {
     mySimulation->SetVisibility(false);
   }
 
index 140af0bb96b241c4cf599c0a75199fc4561d4767..24be56a428fabd94d59e307bd488096a05851df8 100644 (file)
 #include "SMESHGUI_Dialog.h"
 #include "SMESHGUI_SelectionOp.h"
 
+class QButtonGroup;
+class QCheckBox;
 class QGroupBox;
 class QLineEdit;
 class QPushButton;
-class QCheckBox;
+class QRadioButton;
 class SMESHGUI_SpinBox;
 class SMESHGUI_MeshEditPreview;
 class SMESHGUI_MakeNodeAtPointDlg;
@@ -70,8 +72,11 @@ private slots:
   void                           redisplayPreview();
   void                           onTextChange( const QString& );
   void                           onUpdateDestination();
+  void                           onDestCoordChanged();
 
 private:
+  int                           GetConstructorId();
+
   SMESHGUI_MakeNodeAtPointDlg*  myDlg;
 
   SUIT_SelectionFilter*         myFilter;
@@ -80,6 +85,7 @@ private:
   SMESH_Actor*                  myMeshActor;
   bool                          myNoPreview;
   bool                          myUpdateDestination;
+  bool                          myDestCoordChanged;
 };
 
 /*!
@@ -96,21 +102,29 @@ public:
 private:
   QWidget*                      createMainFrame( QWidget* );
 
-  QPushButton*                  myCoordBtn;
+  QWidget*                      myMainFrame;
+
+  QButtonGroup*                 myButtonGroup;
+  QRadioButton*                 myRButNodeToMove;
+  QRadioButton*                 myRButMoveWithoutNode;
+  QPushButton*                  myDestBtn;
   QPushButton*                  myUpdateBtn;
-  SMESHGUI_SpinBox*             myX;
-  SMESHGUI_SpinBox*             myY;
-  SMESHGUI_SpinBox*             myZ;
+  QGroupBox*                    myDestinationGrp;
   QGroupBox*                    myNodeToMoveGrp;
   QPushButton*                  myIdBtn;
   QLineEdit*                    myId;
   SMESHGUI_SpinBox*             myCurrentX;
   SMESHGUI_SpinBox*             myCurrentY;
   SMESHGUI_SpinBox*             myCurrentZ;
-  SMESHGUI_SpinBox*             myDX;
-  SMESHGUI_SpinBox*             myDY;
-  SMESHGUI_SpinBox*             myDZ;
-  QCheckBox*                    myAutoSearchChkBox;
+  SMESHGUI_SpinBox*             myDestinationX;
+  SMESHGUI_SpinBox*             myDestinationY;
+  SMESHGUI_SpinBox*             myDestinationZ;
+  QLabel*                       myDestDXLabel;
+  QLabel*                       myDestDYLabel;
+  QLabel*                       myDestDZLabel;
+  SMESHGUI_SpinBox*             myDestDX;
+  SMESHGUI_SpinBox*             myDestDY;
+  SMESHGUI_SpinBox*             myDestDZ;
   QCheckBox*                    myPreviewChkBox;
 
   QString                       myHelpFileName;
@@ -119,6 +133,7 @@ private:
 
 private slots:
   void                          ButtonToggled( bool );
+  void                          ConstructorsClicked( int );
 };
 
 #endif // SMESHGUI_MAKENODEATPOINTDLG_H
index c67112d4765300abca647e02e4bbd88c7d50b29b..4fdf52051f5666b3bc9c64614630cfa0a6c910c0 100644 (file)
@@ -29,6 +29,7 @@
 #include "SMDS_EdgePosition.hxx"
 #include "SMDS_FacePosition.hxx"
 #include "SMDS_Mesh.hxx"
+#include "SMESH_Gen_i.hxx"
 #include "SMESHDS_Mesh.hxx"
 #include "SMESHGUI.h"
 #include "SMESHGUI_FilterUtils.h"
@@ -1838,66 +1839,34 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
         // connectivity
         QTreeWidgetItem* conItem = createItem( elemItem, Bold );
         conItem->setText( 0, SMESHGUI_ElemInfo::tr( "CONNECTIVITY" ) );
-        SMDS_ElemIteratorPtr nodeIt = e->nodesIterator();
-        for ( int idx = 1; nodeIt->more(); idx++ ) {
-          const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
-          // node number and ID
-          QTreeWidgetItem* nodeItem = createItem( conItem, Bold );
-          nodeItem->setText( 0, QString( "%1 %2 / %3" ).arg( SMESHGUI_ElemInfo::tr( "NODE" ) ).arg( idx ).arg( e->NbNodes() ) );
-          nodeItem->setText( 1, QString( "#%1" ).arg( node->GetID() ) );
-          nodeItem->setData( 1, TypeRole, ElemConnectivity );
-          nodeItem->setData( 1, IdRole, node->GetID() );
-          nodeItem->setExpanded( false );
-          // node coordinates
-          QTreeWidgetItem* coordItem = createItem( nodeItem );
-          coordItem->setText( 0, SMESHGUI_ElemInfo::tr( "COORDINATES" ) );
-          QTreeWidgetItem* xItem = createItem( coordItem );
-          xItem->setText( 0, "X" );
-          xItem->setText( 1, QString::number( node->X(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
-          QTreeWidgetItem* yItem = createItem( coordItem );
-          yItem->setText( 0, "Y" );
-          yItem->setText( 1, QString::number( node->Y(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
-          QTreeWidgetItem* zItem = createItem( coordItem );
-          zItem->setText( 0, "Z" );
-          zItem->setText( 1, QString::number( node->Z(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
-          // node connectivity
-          QTreeWidgetItem* nconItem = createItem( nodeItem );
-          nconItem->setText( 0, SMESHGUI_ElemInfo::tr( "CONNECTIVITY" ) );
-          Connectivity connectivity = nodeConnectivity( node );
-          if ( !connectivity.isEmpty() ) {
-            QString con = formatConnectivity( connectivity, SMDSAbs_0DElement );
-            if ( !con.isEmpty() ) {
-              QTreeWidgetItem* i = createItem( nconItem );
-              i->setText( 0, SMESHGUI_ElemInfo::tr( "0D_ELEMENTS" ) );
-              i->setText( 1, con );
-            }
-            con = formatConnectivity( connectivity, SMDSAbs_Edge );
-            if ( !con.isEmpty() ) {
-              QTreeWidgetItem* i = createItem( nconItem );
-              i->setText( 0, SMESHGUI_ElemInfo::tr( "EDGES" ) );
-              i->setText( 1, con );
-              i->setData( 1, TypeRole, NodeConnectivity );
-            }
-            con = formatConnectivity( connectivity, SMDSAbs_Ball );
-            if ( !con.isEmpty() ) {
-              QTreeWidgetItem* i = createItem( nconItem );
-              i->setText( 0, SMESHGUI_ElemInfo::tr( "BALL_ELEMENTS" ) );
-              i->setText( 1, con );
-              i->setData( 1, TypeRole, NodeConnectivity );
-            }
-            con = formatConnectivity( connectivity, SMDSAbs_Face );
-            if ( !con.isEmpty() ) {
-              QTreeWidgetItem* i = createItem( nconItem );
-              i->setText( 0, SMESHGUI_ElemInfo::tr( "FACES" ) );
-              i->setText( 1, con );
-              i->setData( 1, TypeRole, NodeConnectivity );
-            }
-            con = formatConnectivity( connectivity, SMDSAbs_Volume );
-            if ( !con.isEmpty() ) {
-              QTreeWidgetItem* i = createItem( nconItem );
-              i->setText( 0, SMESHGUI_ElemInfo::tr( "VOLUMES" ) );
-              i->setText( 1, con );
-              i->setData( 1, TypeRole, NodeConnectivity );
+
+
+        if( e->GetGeomType() != SMDSGeom_POLYHEDRA ) {
+          SMDS_ElemIteratorPtr nodeIt = e->nodesIterator();
+          for ( int idx = 1; nodeIt->more(); idx++ ) {
+            const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
+            nodeInfo( node, idx, e->NbNodes(), conItem );
+          }
+        }
+        else {
+          const SMDS_VtkVolume* aVtkVolume = dynamic_cast<const SMDS_VtkVolume*>(e);
+          SMDS_ElemIteratorPtr nodeIt = aVtkVolume->uniqueNodesIterator();
+          QList<const SMDS_MeshElement*> uniqueNodes;
+          while ( nodeIt->more() )
+            uniqueNodes.append( nodeIt->next() );
+
+          SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
+          SMESH_Mesh_i* mesh_i = SMESH::DownCast< SMESH_Mesh_i* >( aMesh );
+          const int nbFaces = mesh_i->ElemNbFaces( e->GetID() );
+          for( int i = 0; i < nbFaces; i++ ) {
+            QTreeWidgetItem* faceItem = createItem( conItem, Bold );
+            faceItem->setText( 0, QString( "%1 %2 / %3" ).arg( SMESHGUI_ElemInfo::tr( "FACE" ) ).arg( i + 1 ).arg( nbFaces ) );
+               faceItem->setExpanded( true );
+
+               SMESH::long_array_var anNodeIds = mesh_i->GetElemFaceNodes( e->GetID(), i );
+               for( CORBA::Long node_id = 0, n = anNodeIds->length(); node_id < n; node_id++ ) {
+              const SMDS_MeshNode* node = actor()->GetObject()->GetMesh()->FindNode( anNodeIds[node_id] );
+              nodeInfo( node, uniqueNodes.indexOf(node) + 1, aVtkVolume->NbUniqueNodes(), faceItem );
             }
           }
         }
@@ -2077,6 +2046,77 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
   }
 }
 
+/*!
+  \brief Show node information
+  \param node mesh node for showing
+  \param index index of current node
+  \param nbNodes number of unique nodes in element
+  \param parentItem parent item of tree
+*/
+void SMESHGUI_TreeElemInfo::nodeInfo( const SMDS_MeshNode* node, int index,
+                                      int nbNodes, QTreeWidgetItem* parentItem )
+{
+  int precision   = SMESHGUI::resourceMgr()->integerValue( "SMESH", "length_precision", 6 );
+  // node number and ID
+  QTreeWidgetItem* nodeItem = createItem( parentItem, Bold );
+  nodeItem->setText( 0, QString( "%1 %2 / %3" ).arg( SMESHGUI_ElemInfo::tr( "NODE" ) ).arg( index ).arg( nbNodes ) );
+  nodeItem->setText( 1, QString( "#%1" ).arg( node->GetID() ) );
+  nodeItem->setData( 1, TypeRole, ElemConnectivity );
+  nodeItem->setData( 1, IdRole, node->GetID() );
+  nodeItem->setExpanded( false );
+  // node coordinates
+  QTreeWidgetItem* coordItem = createItem( nodeItem );
+  coordItem->setText( 0, SMESHGUI_ElemInfo::tr( "COORDINATES" ) );
+  QTreeWidgetItem* xItem = createItem( coordItem );
+  xItem->setText( 0, "X" );
+  xItem->setText( 1, QString::number( node->X(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+  QTreeWidgetItem* yItem = createItem( coordItem );
+  yItem->setText( 0, "Y" );
+  yItem->setText( 1, QString::number( node->Y(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+  QTreeWidgetItem* zItem = createItem( coordItem );
+  zItem->setText( 0, "Z" );
+  zItem->setText( 1, QString::number( node->Z(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+  // node connectivity
+  QTreeWidgetItem* nconItem = createItem( nodeItem );
+  nconItem->setText( 0, SMESHGUI_ElemInfo::tr( "CONNECTIVITY" ) );
+  Connectivity connectivity = nodeConnectivity( node );
+  if ( !connectivity.isEmpty() ) {
+       QString con = formatConnectivity( connectivity, SMDSAbs_0DElement );
+       if ( !con.isEmpty() ) {
+         QTreeWidgetItem* i = createItem( nconItem );
+         i->setText( 0, SMESHGUI_ElemInfo::tr( "0D_ELEMENTS" ) );
+         i->setText( 1, con );
+       }
+       con = formatConnectivity( connectivity, SMDSAbs_Edge );
+       if ( !con.isEmpty() ) {
+         QTreeWidgetItem* i = createItem( nconItem );
+         i->setText( 0, SMESHGUI_ElemInfo::tr( "EDGES" ) );
+         i->setText( 1, con );
+         i->setData( 1, TypeRole, NodeConnectivity );
+       }
+       con = formatConnectivity( connectivity, SMDSAbs_Ball );
+       if ( !con.isEmpty() ) {
+         QTreeWidgetItem* i = createItem( nconItem );
+         i->setText( 0, SMESHGUI_ElemInfo::tr( "BALL_ELEMENTS" ) );
+         i->setText( 1, con );
+         i->setData( 1, TypeRole, NodeConnectivity );
+       }
+       con = formatConnectivity( connectivity, SMDSAbs_Face );
+       if ( !con.isEmpty() ) {
+                 QTreeWidgetItem* i = createItem( nconItem );
+         i->setText( 0, SMESHGUI_ElemInfo::tr( "FACES" ) );
+         i->setText( 1, con );
+         i->setData( 1, TypeRole, NodeConnectivity );
+       }
+       con = formatConnectivity( connectivity, SMDSAbs_Volume );
+       if ( !con.isEmpty() ) {
+         QTreeWidgetItem* i = createItem( nconItem );
+         i->setText( 0, SMESHGUI_ElemInfo::tr( "VOLUMES" ) );
+         i->setText( 1, con );
+         i->setData( 1, TypeRole, NodeConnectivity );
+       }
+  }
+}
 /*!
   \brief Internal clean-up (reset widget)
 */
index 69faa42cc9797f2612455c97979c8fcc52fd887c..54ee1aca5191d91d0e2e8bbd161d55940c04f9a9 100644 (file)
@@ -226,6 +226,7 @@ public:
 protected:
   void             contextMenuEvent( QContextMenuEvent* e );
   void             information( const QList<long>& );
+  void             nodeInfo( const SMDS_MeshNode*, int, int, QTreeWidgetItem* );
   void             clearInternal();
 
 private slots:
index fddda25c2c61369ee36d7a654a4d0c2e771215fc..59900714e0e1032b34a505f89e98239253467205 100644 (file)
@@ -490,7 +490,7 @@ void SMESHGUI_MeshInfosBox::SetMeshInfo(const SMESH::long_array& theInfo)
     myNbQuadTetra  ->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Tetra] ));
     // hexas
     myNbHexa       ->setText( QString("%1").arg( theInfo[SMDSEntity_Hexa] +
-                                                 theInfo[SMDSEntity_TriQuad_Hexa],
+                                                 theInfo[SMDSEntity_TriQuad_Hexa] +
                                                  theInfo[SMDSEntity_Quad_Hexa] ));
     myNbLinHexa    ->setText( QString("%1").arg( theInfo[SMDSEntity_Hexa] ));
     myNbQuadHexa   ->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Hexa] ));
index 73d384cae7843ed2c6004babe71384af6b90f179..46bf3ef55f73d3773143e785055c307d01a84b01 100755 (executable)
@@ -119,13 +119,13 @@ SMESHGUI_MeshPatternDlg::SMESHGUI_MeshPatternDlg( SMESHGUI* theModule )
   aDlgLay->setMargin( MARGIN );
   aDlgLay->setSpacing( SPACING );
 
-  QWidget* aMainFrame = createMainFrame  ( this );
+  myMainFrame = createMainFrame  ( this );
   QWidget* aBtnFrame  = createButtonFrame( this );
 
-  aDlgLay->addWidget( aMainFrame );
+  aDlgLay->addWidget( myMainFrame );
   aDlgLay->addWidget( aBtnFrame );
 
-  aDlgLay->setStretchFactor( aMainFrame, 1 );
+  aDlgLay->setStretchFactor( myMainFrame, 1 );
 
   mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
 
@@ -1201,11 +1201,16 @@ void SMESHGUI_MeshPatternDlg::onTypeChanged (int theType)
     myNode2Lbl->show();
     myNode2   ->show();
   }
-
   mySelInput = Mesh;
   activateSelection();
   updateWgState();
   displayPreview();
+  myPicture2d->hide();
+  myPicture2d->show();
+  myPicture2d->resize(minimumSizeHint());
+  myMainFrame->hide();
+  myMainFrame->show();
+  resize(minimumSizeHint());
 }
 
 //=======================================================================
@@ -1331,8 +1336,10 @@ void SMESHGUI_MeshPatternDlg::onModeToggled (bool on)
 {
   on ? myRefineGrp->show() : myRefineGrp->hide();
   on ? myGeomGrp->hide()   : myGeomGrp->show();
-
+  myMainFrame->hide();
+  myMainFrame->show();
   displayPreview();
+  resize(minimumSizeHint());
 }
 
 //=======================================================================
index 4f140731cfeb31f38f4b61f1dc0376308b7711a6..43317618f40971ba28f2585a431c4495963be220 100755 (executable)
@@ -141,6 +141,8 @@ private:
   QMap<int, QLineEdit*>               mySelEdit;
   QMap<int, QLabel*>                  mySelLbl;
 
+  QWidget*                            myMainFrame;
+
   QLineEdit*                          myName;
   QPushButton*                        myOpenBtn;
   QPushButton*                        myNewBtn;
index 60c48dd914686d91e5fadd9cfc995f8228fbac88..503de82d7bb741cfb0f69c037a8d6be5d5cef31b 100755 (executable)
@@ -1700,6 +1700,9 @@ void SMESHGUI_SplitVolumesDlg::on3d2dChanged(int isPrism)
   }
   SMESHGUI_MultiEditDlg::on3d2dChanged( !myEntityType );
   myEntityType = 1; // == VOLUME
+  myChoiceWidget->hide();
+  myChoiceWidget->show();
+  resize(minimumSizeHint());
   onSelectionDone();
 }
 
index ce344081373d5690d69eddbd8803c7288d66e8c7..747cd59a82be15a6220fdc5a746fdee67d7cdd88 100644 (file)
@@ -42,7 +42,7 @@ SMESHGUI_PatternWidget::SMESHGUI_PatternWidget( QWidget* parent )
   : QFrame( parent )
 {
   myMinU = myMinV = myMaxU = myMaxV = 0;
-  setMinimumHeight( 150 );
+  //setMinimumHeight( 150 );
 }
 
 //=================================================================================
index ecda71b99a6a00d7bf48c1369411c326fa9e445b..400a02532f77e09d797a6bbdb724343d35509910 100644 (file)
@@ -34,6 +34,7 @@
 #include <QtxBiColorTool.h>
 #include <QtxColorButton.h>
 #include <QtxIntSpinBox.h>
+#include <QtxDoubleSpinBox.h>
 #include <VTKViewer_MarkerWidget.h>
 #include <SUIT_Session.h>
 #include <LightApp_Application.h>
@@ -158,7 +159,7 @@ SMESHGUI_PropertiesDlg::SMESHGUI_PropertiesDlg( const VTK::MarkerMap& customMark
   QLabel* ballSizeLab = new QLabel( tr( "SIZE" ), myBallGrp );
   myBallSize = new QtxIntSpinBox( myBallGrp );
   QLabel* ballScaleLab = new QLabel( tr( "SCALE_FACTOR" ), myBallGrp );
-  myBallScale = new QtxIntSpinBox( myBallGrp );
+  myBallScale = new QtxDoubleSpinBox( 1e-2, 1e7, 0.5, myBallGrp );
   hl = new QHBoxLayout( myBallGrp );
   hl->setMargin( MARGIN );
   hl->setSpacing( SPACING );
@@ -248,7 +249,6 @@ SMESHGUI_PropertiesDlg::SMESHGUI_PropertiesDlg( const VTK::MarkerMap& customMark
   myNodeMarker->setCustomMarkers( customMarkers );
   myElem0dSize->setRange( 1, 10 );
   myBallSize->setRange( 1, 10 );
-  myBallScale->setRange( 1, 10 );
   myEdgeWidth->setRange( 1, 5 );
   myOutlineWidth->setRange( 1, 5 );
   myShrinkSize->setRange( 20, 100 );
@@ -540,7 +540,7 @@ int SMESHGUI_PropertiesDlg::ballSize() const
   \brief Set discrete elements (balls) scale factor
   \param size discrete elements (balls) scale factor
 */
-void SMESHGUI_PropertiesDlg::setBallScale( int size )
+void SMESHGUI_PropertiesDlg::setBallScale( double size )
 {
   myBallScale->setValue( size );
 }
@@ -549,7 +549,7 @@ void SMESHGUI_PropertiesDlg::setBallScale( int size )
   \brief Get discrete elements (balls) scale factor
   \return current discrete elements (balls) scale factor
 */
-int SMESHGUI_PropertiesDlg::ballScale() const
+double SMESHGUI_PropertiesDlg::ballScale() const
 {
   return myBallScale->value();
 }
index eb3e551fc71c84670e285f23668759528e16c841..5ec3ce6200065554c3d89e53dd4ebe5c40106223 100644 (file)
@@ -38,6 +38,7 @@ class QGroupBox;
 class QtxColorButton;
 class QtxBiColorTool;
 class QtxIntSpinBox;
+class QtxDoubleSpinBox;
 class VTKViewer_MarkerWidget;
 
 class SMESHGUI_EXPORT SMESHGUI_PropertiesDlg : public SMESHGUI_Dialog
@@ -83,8 +84,8 @@ public:
   QColor            ballColor() const;
   void              setBallSize( int );
   int               ballSize() const;
-  void              setBallScale( int );
-  int               ballScale() const;
+  void              setBallScale( double );
+  double            ballScale() const;
 
   void              setOrientationColor( const QColor& );
   QColor            orientationColor() const;
@@ -134,7 +135,7 @@ private:
   // - balls
   QtxColorButton*         myBallColor;
   QtxIntSpinBox*          myBallSize;
-  QtxIntSpinBox*          myBallScale;
+  QtxDoubleSpinBox*       myBallScale;
   // - orientation vectors
   QtxColorButton*         myOrientationColor;
   QtxIntSpinBox*          myOrientationSize;
index 99b86a89dfb3411fec80821d6144c23dd2e25bc2..9da433c69e549de8b2fd66354087949690232bed 100644 (file)
@@ -425,6 +425,8 @@ void SMESHGUI_ScaleDlg::ConstructorsClicked (int constructorId)
   connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
 
   QApplication::instance()->processEvents();
+  myEditCurrentArgument->hide();
+  myEditCurrentArgument->show();
   updateGeometry();
   resize(100,100);
 }
index a9744f462beef8909b23088bdda19999c2cf0435..c887edf8444acb16874fd3e34bbd720ceab7d714 100644 (file)
@@ -453,6 +453,8 @@ void SMESHGUI_SymmetryDlg::ConstructorsClicked (int constructorId)
   onDisplaySimulation(true);
 
   QApplication::instance()->processEvents();
+  myEditCurrentArgument->hide();
+  myEditCurrentArgument->show();
   updateGeometry();
   resize(100,100);
 }
index 0c2d376976d959773b872d8778e8dd5fd519f363..e4bf823f8c700252996134fb8f92cf1cc4a82332 100644 (file)
@@ -451,7 +451,8 @@ void SMESHGUI_TranslationDlg::ConstructorsClicked (int constructorId)
   connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
 
   onDisplaySimulation(true);
-
+  myEditCurrentArgument->hide();
+  myEditCurrentArgument->show();
   QApplication::instance()->processEvents();
   updateGeometry();
   resize(100,100);
index f9082a77b06748f7e36bee9f42d4ae56c0d7123a..b27b101ca169423f5e611ff3e73dccd66ccc0137 100644 (file)
             <source>ICON_DLG_MOVE_NODE</source>
             <translation>mesh_move_node.png</translation>
         </message>
+        <message>
+            <source>ICON_DLG_MOVE_WITHOUT_NODE</source>
+            <translation>mesh_move_without_node.png</translation>
+        </message>
         <message>
             <source>ICON_DLG_NODE</source>
             <translation>mesh_vertex.png</translation>
index c31c2e8bc1e90cc2e9e5a26240907a4b6a826b97..d75cd108adc87461108262cbca7bdc22a3cc4c99 100644 (file)
@@ -171,7 +171,7 @@ long SMESH_File::size()
   if ( _size >= 0 ) return _size; // size of an open file
 
   boost::system::error_code err;
-  uintmax_t size = boofs::file_size( _name, err );
+  boost::uintmax_t size = boofs::file_size( _name, err );
   _error = err.message();
 
   return err ? -1 : (long) size;
index 23a285f616ad0f9c9e5c6ce0ccba545f47b776a0..957828474e306b0d3bb07286179f454aaf297c1c 100644 (file)
@@ -759,10 +759,10 @@ SMESH_ElementSearcherImpl::FindClosestTo( const gp_Pnt&       point,
     {
       gp_Pnt boxCenter = 0.5 * ( _ebbTree->getBox()->CornerMin() +
                                  _ebbTree->getBox()->CornerMax() );
-      double radius;
+      double radius = -1;
       if ( _ebbTree->getBox()->IsOut( point.XYZ() ))
         radius = point.Distance( boxCenter ) - 0.5 * _ebbTree->maxSize();
-      else
+      if ( radius < 0 )
         radius = _ebbTree->maxSize() / pow( 2., _ebbTree->getHeight()) / 2;
       while ( suspectElems.empty() )
       {
index e9b14c9196997ab43891e36925153b88c0757ab8..3643f0928f6fdc8c82bccaa8de9e0f4d6d30fc57 100644 (file)
@@ -80,6 +80,7 @@ SET(_link_LIBRARIES
   SMDS
   SMESHDS
   SMESHControls
+  MeshDriverMED
 )
 
 # --- headers ---
index 223cf9130641d3992182d67b70e9cba067548986..ce0a35594f1a35befb4d9109ad41333536073ffd 100644 (file)
@@ -384,9 +384,12 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen):
         #print "init_smesh"
         self.SetCurrentStudy(theStudy,geompyD)
 
-    ## Creates an empty Mesh. This mesh can have an underlying geometry.
-    #  @param obj the Geometrical object on which the mesh is built. If not defined,
-    #             the mesh will have no underlying geometry.
+    ## Creates a mesh. This can be either an empty mesh, possibly having an underlying geometry,
+    #  or a mesh wrapping a CORBA mesh given as a parameter.
+    #  @param obj either (1) a CORBA mesh (SMESH._objref_SMESH_Mesh) got e.g. by calling
+    #         salome.myStudy.FindObjectID("0:1:2:3").GetObject() or
+    #         (2) a Geometrical object for meshing or
+    #         (3) none.
     #  @param name the name for the new mesh.
     #  @return an instance of Mesh class.
     #  @ingroup l2_construct
index 0a7e3301754ee315929c1e865e4f646dca1dfd59..016a5098db2c27e8f35e096d8077e519502b4483 100644 (file)
@@ -5244,6 +5244,7 @@ FaceQuadStruct::Side& FaceQuadStruct::Side::operator=(const Side& otherSide)
         oSide->contacts[iOC].other_side = this;
       }
   }
+  return *this;
 }
 
 //================================================================================
@@ -5290,6 +5291,7 @@ bool FaceQuadStruct::Side::Reverse(bool keepGrid)
       grid->Reverse();
     }
   }
+  return (bool)grid;
 }
 
 //================================================================================
index 9495dd8c383a8b10bcbbd35b20f84d9aa5c954db..bf0346e8fee7bc592240f892bc8550b65dbcd9fe 100644 (file)
@@ -26,6 +26,7 @@ ADD_SUBDIRECTORY(MacMesh)
 IF(SALOME_BUILD_GUI)
   ADD_SUBDIRECTORY(MGCleanerPlug)
   ADD_SUBDIRECTORY(YamsPlug)
+  ADD_SUBDIRECTORY(ZCracksPlug)
 ENDIF(SALOME_BUILD_GUI)
 
 # scripts / static
diff --git a/src/Tools/ZCracksPlug/CMakeLists.txt b/src/Tools/ZCracksPlug/CMakeLists.txt
new file mode 100644 (file)
index 0000000..07cbf93
--- /dev/null
@@ -0,0 +1,33 @@
+# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+
+
+# --- scripts ---
+
+# scripts / static
+SET(plugin_SCRIPTS
+   zcracks_plugin.py
+)
+
+
+# --- rules ---
+
+SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS})
+
diff --git a/src/Tools/ZCracksPlug/zcracks_plugin.py b/src/Tools/ZCracksPlug/zcracks_plugin.py
new file mode 100644 (file)
index 0000000..85ced69
--- /dev/null
@@ -0,0 +1,38 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2006-2013  EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+import SalomePyQt
+sgPyQt = SalomePyQt.SalomePyQt()
+import eficasSalome
+
+class EficasForZcracks(eficasSalome.MyEficas):
+    """
+    """
+    def __init__(self, fichier = None, version = None):
+        eficasSalome.MyEficas.__init__(self, sgPyQt.getDesktop(),
+                                       "ZCRACKS",
+                                       fichier, version = version)
+        #sgPyQt.createView(custom_appli.widgetname, self)
+
+
+def ZcracksLct(context):
+  
+  window=EficasForZcracks()
+  window.show()
index 29d25e4473e009e838ee96870a53b56bf760bd8f..b043ec69271194e080f689e505396f9da4347f41 100644 (file)
@@ -46,3 +46,18 @@ salome_pluginsmanager.AddFunction('ReMesh with MGCleaner',
 salome_pluginsmanager.AddFunction('Meshed Pipe with a crack',
                                   'Create a mesh with blocFissure tool',
                                   fissureCoudeDlg)
+
+# ZCracks plugin requires the module EFICAS to be installed
+# thus it is first tested if this module is available before
+# adding the plugin to salome_pluginsmanager
+enable_zcracks = True
+try:
+  import eficasSalome
+except:
+  enable_zcracks = False
+
+if enable_zcracks:
+  from zcracks_plugin import ZcracksLct
+  salome_pluginsmanager.AddFunction('Run Zcrack',
+                                    'Run Zcrack',
+                                    ZcracksLct)