]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Feature #197: translation or georeferencing of OBSTACLES Box and Cylinder.
authormzn <mzn@opencascade.com>
Thu, 16 Jan 2014 09:43:54 +0000 (09:43 +0000)
committermzn <mzn@opencascade.com>
Thu, 16 Jan 2014 09:43:54 +0000 (09:43 +0000)
src/HYDROGUI/CMakeLists.txt
src/HYDROGUI/HYDROGUI_Module.cxx
src/HYDROGUI/HYDROGUI_Operations.cxx
src/HYDROGUI/HYDROGUI_Operations.h
src/HYDROGUI/HYDROGUI_TranslateObstacleDlg.cxx [new file with mode: 0644]
src/HYDROGUI/HYDROGUI_TranslateObstacleDlg.h [new file with mode: 0644]
src/HYDROGUI/HYDROGUI_TranslateObstacleOp.cxx [new file with mode: 0644]
src/HYDROGUI/HYDROGUI_TranslateObstacleOp.h [new file with mode: 0644]
src/HYDROGUI/resources/HYDROGUI_msg_en.ts

index 5eac71fdd40ca83bdccfb37398748d4908d8041a..612e9be9cac2c66671ba3bf7913a2b8b300a86c4 100644 (file)
@@ -84,6 +84,8 @@ set(PROJECT_HEADERS
     HYDROGUI_GeoreferencementOp.h
     HYDROGUI_Actor.h
     HYDROGUI_BathymetryBoundsOp.h
+    HYDROGUI_TranslateObstacleDlg.h
+    HYDROGUI_TranslateObstacleOp.h
 )
 
 QT4_WRAP_CPP(PROJECT_HEADERS_MOC ${PROJECT_HEADERS})
@@ -169,6 +171,8 @@ set(PROJECT_SOURCES
     HYDROGUI_GeoreferencementOp.cxx
     HYDROGUI_Actor.cxx
     HYDROGUI_BathymetryBoundsOp.cxx
+    HYDROGUI_TranslateObstacleDlg.cxx
+    HYDROGUI_TranslateObstacleOp.cxx
 )
 
 add_definitions(
index c409cdbe5a2738bdd14e235df7d22d7e9d5219ee..c9aa1704b558d9240ed4175263256604bdb95820 100644 (file)
@@ -592,6 +592,11 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
         theMenu->addAction( action( EditDigueId ) );
         theMenu->addSeparator();
       }
+      else if( anIsObstacle )
+      {
+        theMenu->addAction( action( TranslateObstacleId ) );
+        theMenu->addSeparator();
+      }
       else if( anIsVisualState && anIsObjectBrowser )
       {
         theMenu->addAction( action( SaveVisualStateId ) );
index 768781b1229b2b9cc8972e4b73b62d52ab970f02..aedb1dee49b825b7bcf5fd2d5e1954fd11079240 100644 (file)
@@ -48,6 +48,7 @@
 #include "HYDROGUI_ImmersibleZoneOp.h"
 #include "HYDROGUI_ImportGeomObjectOp.h"
 #include "HYDROGUI_ImportObstacleFromFileOp.h"
+#include "HYDROGUI_TranslateObstacleOp.h"
 #include "HYDROGUI_ExportCalculationOp.h"
 #include "HYDROGUI_ImportProfilesOp.h"
 #include "HYDROGUI_GeoreferencementOp.h"
@@ -148,6 +149,7 @@ void HYDROGUI_Module::createActions()
   createAction( ImportGeomObjectAsPolylineId, "IMPORT_GEOM_OBJECT_AS_POLYLINE", "IMPORT_GEOM_OBJECT_ICO" );
   createAction( CreateBoxId, "CREATE_BOX", "CREATE_BOX_ICO" );
   createAction( CreateCylinderId, "CREATE_CYLINDER", "CREATE_CYLINDER_ICO" );
+  createAction( TranslateObstacleId, "TRANSLATE_OBSTACLE" );
 
   createAction( CreateCalculationId, "CREATE_CALCULATION", "CREATE_CALCULATION_ICO" );
   createAction( EditCalculationId, "EDIT_CALCULATION", "EDIT_CALCULATION_ICO" );
@@ -480,6 +482,9 @@ LightApp_Operation* HYDROGUI_Module::createOperation( const int theId ) const
     anOp = new HYDROGUI_ImportGeomObjectOp( aModule, 
       HYDROGUI_ImportGeomObjectOp::ImportCreatedAsObstacle, GEOMOp::OpCylinder );
     break;
+  case TranslateObstacleId:
+    anOp = new HYDROGUI_TranslateObstacleOp( aModule );
+    break;
   case CopyViewerPositionId:
     anOp = new HYDROGUI_CopyPastePositionOp( aModule, false );
     break;
index a376f7b64a72821d22b16a10966867f279ab78cf..435206a23612a47624c3cae6d0d4d77ac56a98bc 100644 (file)
@@ -91,6 +91,7 @@ enum OperationId
   ImportGeomObjectAsPolylineId,
   CreateBoxId,
   CreateCylinderId,
+  TranslateObstacleId,
 
   CopyViewerPositionId,
 
diff --git a/src/HYDROGUI/HYDROGUI_TranslateObstacleDlg.cxx b/src/HYDROGUI/HYDROGUI_TranslateObstacleDlg.cxx
new file mode 100644 (file)
index 0000000..c130f35
--- /dev/null
@@ -0,0 +1,115 @@
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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
+//
+
+#include "HYDROGUI_TranslateObstacleDlg.h"
+
+#include <QtxDoubleSpinBox.h>
+
+#include <QLabel>
+#include <QLineEdit>
+#include <QGroupBox>
+#include <QGridLayout>
+
+#include <limits>
+
+HYDROGUI_TranslateObstacleDlg::HYDROGUI_TranslateObstacleDlg( HYDROGUI_Module* theModule, const QString& theTitle )
+: HYDROGUI_InputPanel( theModule, theTitle )
+{
+  // Obstacle name
+  QGroupBox* aNameGroup = new QGroupBox( tr( "OBSTACLE_NAME" ), this );
+
+  QLabel* aNameLabel = new QLabel( tr( "NAME" ), aNameGroup );
+  myName = new QLineEdit( aNameGroup );
+  myName->setEnabled( false );
+  
+  QBoxLayout* aNameLayout = new QHBoxLayout( aNameGroup );
+  aNameLayout->setMargin( 5 );
+  aNameLayout->setSpacing( 5 );
+  aNameLayout->addWidget( aNameLabel );
+  aNameLayout->addWidget( myName );
+
+  // Translation arguments
+  QGroupBox* anArgGroup = new QGroupBox( tr( "TRANSLATION_ARGUMENTS" ), this );
+
+  QLabel* aDxLabel = new QLabel( tr( "DX" ), anArgGroup );
+  myDxSpin = new QtxDoubleSpinBox( -1e+15, +1e+15, 10, anArgGroup );
+
+  QLabel* aDyLabel = new QLabel( tr( "DY" ), anArgGroup );
+  myDySpin = new QtxDoubleSpinBox( -1e+15, +1e+15, 10, anArgGroup );
+
+  QLabel* aDzLabel = new QLabel( tr( "DZ" ), anArgGroup );
+  myDzSpin = new QtxDoubleSpinBox( -1e+15, +1e+15, 10, anArgGroup );
+
+  QGridLayout* anArgLayout = new QGridLayout( anArgGroup );
+  anArgLayout->setMargin( 5 );
+  anArgLayout->setSpacing( 5 );
+  
+  anArgLayout->addWidget( aDxLabel, 0, 0 );
+  anArgLayout->addWidget( myDxSpin, 0, 1 );
+  anArgLayout->addWidget( aDyLabel, 1, 0 );
+  anArgLayout->addWidget( myDySpin, 1, 1 );
+  anArgLayout->addWidget( aDzLabel, 2, 0 );
+  anArgLayout->addWidget( myDzSpin, 2, 1 );
+
+  // Layout
+  addWidget( aNameGroup );
+  addWidget( anArgGroup );
+  addStretch();
+
+  // Connect signals and slots
+  connect( myDxSpin, SIGNAL( valueChanged( double ) ), this, SIGNAL( argumentsChanged() ) );
+  connect( myDySpin, SIGNAL( valueChanged( double ) ), this, SIGNAL( argumentsChanged() ) );
+  connect( myDzSpin, SIGNAL( valueChanged( double ) ), this, SIGNAL( argumentsChanged() ) );
+}
+
+HYDROGUI_TranslateObstacleDlg::~HYDROGUI_TranslateObstacleDlg()
+{
+}
+
+void HYDROGUI_TranslateObstacleDlg::reset()
+{
+  myName->clear();
+
+  myDxSpin->setValue( 0 );
+  myDySpin->setValue( 0 );
+  myDzSpin->setValue( 0 );
+}
+
+void HYDROGUI_TranslateObstacleDlg::setName( const QString& theName )
+{
+  myName->setText( theName );
+}
+
+double HYDROGUI_TranslateObstacleDlg::getDx() const
+{
+  return myDxSpin->value();
+}
+
+double HYDROGUI_TranslateObstacleDlg::getDy() const
+{
+  return myDySpin->value();
+}
+
+double HYDROGUI_TranslateObstacleDlg::getDz() const
+{
+  return myDzSpin->value();
+}
diff --git a/src/HYDROGUI/HYDROGUI_TranslateObstacleDlg.h b/src/HYDROGUI/HYDROGUI_TranslateObstacleDlg.h
new file mode 100644 (file)
index 0000000..e9c2080
--- /dev/null
@@ -0,0 +1,59 @@
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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
+//
+
+#ifndef HYDROGUI_TranslateObstacleDlg_H
+#define HYDROGUI_TranslateObstacleDlg_H
+
+#include "HYDROGUI_InputPanel.h"
+
+class QtxDoubleSpinBox;
+
+class QLineEdit;
+
+class HYDROGUI_TranslateObstacleDlg : public HYDROGUI_InputPanel
+{
+  Q_OBJECT
+
+public:
+  HYDROGUI_TranslateObstacleDlg( HYDROGUI_Module* theModule, const QString& theTitle );
+  virtual ~HYDROGUI_TranslateObstacleDlg();
+
+  void                       reset();
+
+  void                       setName( const QString& theName );
+
+  double                     getDx() const;
+  double                     getDy() const;
+  double                     getDz() const;
+
+signals:
+  void                       argumentsChanged();
+
+private:
+  QLineEdit*                 myName;
+
+  QtxDoubleSpinBox*          myDxSpin;
+  QtxDoubleSpinBox*          myDySpin;
+  QtxDoubleSpinBox*          myDzSpin;
+};
+
+#endif
diff --git a/src/HYDROGUI/HYDROGUI_TranslateObstacleOp.cxx b/src/HYDROGUI/HYDROGUI_TranslateObstacleOp.cxx
new file mode 100644 (file)
index 0000000..c677191
--- /dev/null
@@ -0,0 +1,201 @@
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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
+//
+
+#include "HYDROGUI_TranslateObstacleOp.h"
+
+#include "HYDROGUI_TranslateObstacleDlg.h"
+#include "HYDROGUI_Module.h"
+#include "HYDROGUI_Shape.h"
+#include "HYDROGUI_Tool.h"
+#include "HYDROGUI_UpdateFlags.h"
+
+#include <LightApp_Application.h>
+#include <LightApp_SelectionMgr.h>
+#include <LightApp_UpdateFlags.h>
+
+#include <SUIT_MessageBox.h>
+#include <SUIT_Desktop.h>
+
+#include <OCCViewer_ViewManager.h>
+#include <OCCViewer_ViewModel.h>
+#include <OCCViewer_ViewWindow.h>
+
+
+HYDROGUI_TranslateObstacleOp::HYDROGUI_TranslateObstacleOp( HYDROGUI_Module* theModule )
+: HYDROGUI_Operation( theModule ), 
+  myPreviewPrs( NULL )
+{
+  setName( tr( "TRANSLATE_OBSTACLE" ) );
+}
+
+HYDROGUI_TranslateObstacleOp::~HYDROGUI_TranslateObstacleOp()
+{
+  erasePreview();
+}
+
+void HYDROGUI_TranslateObstacleOp::startOperation()
+{
+  HYDROGUI_Operation::startOperation();
+
+  // Get panel and reset its state
+  HYDROGUI_TranslateObstacleDlg* aPanel = (HYDROGUI_TranslateObstacleDlg*)inputPanel();
+  aPanel->reset();
+
+  // Get the edited object
+  myEditedObject = Handle(HYDROData_Obstacle)::DownCast( HYDROGUI_Tool::GetSelectedObject( module() ) );
+  if ( myEditedObject.IsNull() ) {
+    abort();
+    return;
+  }
+  else if ( myEditedObject->IsMustBeUpdated() ) {
+    myEditedObject->Update();
+  }
+
+  // Set the edited object name to the panel
+  aPanel->setName( myEditedObject->GetName() );
+
+  // Create preview
+  createPreview();
+}
+
+void HYDROGUI_TranslateObstacleOp::abortOperation()
+{
+  erasePreview();
+  abortDocOperation();
+
+  HYDROGUI_Operation::abortOperation();
+}
+
+void HYDROGUI_TranslateObstacleOp::commitOperation()
+{
+  erasePreview();
+
+  HYDROGUI_Operation::commitOperation();
+}
+
+HYDROGUI_InputPanel* HYDROGUI_TranslateObstacleOp::createInputPanel() const
+{
+  HYDROGUI_TranslateObstacleDlg* aPanel = new HYDROGUI_TranslateObstacleDlg( module(), getName() );
+
+  connect( aPanel, SIGNAL( argumentsChanged() ), this, SLOT( onArgumentsChanged() ) );
+
+  return aPanel;
+}
+
+bool HYDROGUI_TranslateObstacleOp::processApply( int& theUpdateFlags,
+                                                 QString& theErrorMsg )
+{
+  HYDROGUI_TranslateObstacleDlg* aPanel = ::qobject_cast<HYDROGUI_TranslateObstacleDlg*>( inputPanel() );
+  if ( !aPanel || myEditedObject.IsNull() ) {
+    return false;
+  }
+
+  // Get the translated shape
+  TopoDS_Shape aTranslatedShape = getTranslatedShape();
+  if ( aTranslatedShape.IsNull() ) {
+    return false;
+  }
+
+  // Erase preview
+  erasePreview();
+
+  // Set the translated shape to the obstacle
+  myEditedObject->SetShape3D( aTranslatedShape ); 
+  myEditedObject->Update();
+
+  module()->setIsToUpdate( myEditedObject );
+
+  // Set update flags
+  theUpdateFlags = UF_Model | UF_OCCViewer | UF_OCC_Forced | UF_VTKViewer;
+
+  return true;
+}
+
+void HYDROGUI_TranslateObstacleOp::createPreview()
+{
+  if ( myEditedObject.IsNull() ) {
+    return;
+  }
+
+  // Create preview presentation if necessary
+  if ( !myPreviewPrs ) {
+    LightApp_Application* anApp = module()->getApp();
+    OCCViewer_ViewManager* aViewManager = ::qobject_cast<OCCViewer_ViewManager*>( 
+      anApp->getViewManager( OCCViewer_Viewer::Type(), true ) );
+  
+    if ( aViewManager ) {
+      if ( OCCViewer_Viewer* aViewer = aViewManager->getOCCViewer() ) {
+        Handle(AIS_InteractiveContext) aCtx = aViewer->getAISContext();
+        if ( !aCtx.IsNull() ) {
+          myPreviewPrs = new HYDROGUI_Shape( aCtx, NULL );
+          myPreviewPrs->setFillingColor( myEditedObject->GetFillingColor(), false, false );
+          myPreviewPrs->setBorderColor( myEditedObject->GetBorderColor(), false, false );
+        }
+      }
+    }
+  }
+  
+  // Get the translated shape
+  TopoDS_Shape aTranslatedShape = getTranslatedShape();
+
+  // Set the translated shape to the preview presentation
+  if ( myPreviewPrs ) {
+    myPreviewPrs->setShape( aTranslatedShape );
+  }
+}
+
+void HYDROGUI_TranslateObstacleOp::erasePreview()
+{
+  if( myPreviewPrs ) {
+    delete myPreviewPrs;
+    myPreviewPrs = 0;
+  }
+}
+
+void HYDROGUI_TranslateObstacleOp::onArgumentsChanged()
+{
+  // Update preview
+  createPreview();
+}
+
+TopoDS_Shape HYDROGUI_TranslateObstacleOp::getTranslatedShape() const
+{
+  TopoDS_Shape aTranslatedShape;
+
+  HYDROGUI_TranslateObstacleDlg* aPanel = (HYDROGUI_TranslateObstacleDlg*)inputPanel();
+  if ( aPanel && !myEditedObject.IsNull() ) {
+    double aDx = aPanel->getDx();
+    double aDy = aPanel->getDy();
+    double aDz = aPanel->getDz();
+
+    TopoDS_Shape aShape = myEditedObject->GetShape3D();
+    gp_Trsf aTrsf;
+    gp_Vec aVec( aDx, aDy, aDz );
+    aTrsf.SetTranslation(aVec);
+    TopLoc_Location aLocOrig = aShape.Location();
+    gp_Trsf aTrsfOrig = aLocOrig.Transformation();
+    TopLoc_Location aLocRes( aTrsf * aTrsfOrig );
+    aTranslatedShape = aShape.Located( aLocRes );
+  }
+
+  return aTranslatedShape;
+}
\ No newline at end of file
diff --git a/src/HYDROGUI/HYDROGUI_TranslateObstacleOp.h b/src/HYDROGUI/HYDROGUI_TranslateObstacleOp.h
new file mode 100644 (file)
index 0000000..5d21e04
--- /dev/null
@@ -0,0 +1,66 @@
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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
+//
+
+#ifndef HYDROGUI_TranslateObstacleOp_H
+#define HYDROGUI_TranslateObstacleOp_H
+
+#include "HYDROGUI_Operation.h"
+
+#include <HYDROData_Obstacle.h>
+
+class HYDROGUI_Shape;
+class TopoDS_Shape;
+
+class HYDROGUI_TranslateObstacleOp : public HYDROGUI_Operation
+{
+  Q_OBJECT
+
+public:
+  HYDROGUI_TranslateObstacleOp( HYDROGUI_Module* theModule );
+  virtual ~HYDROGUI_TranslateObstacleOp();
+
+protected:
+
+  virtual void                 startOperation();
+  virtual void                 abortOperation();
+  virtual void                 commitOperation();
+
+  virtual HYDROGUI_InputPanel* createInputPanel() const;
+
+  virtual bool                 processApply( int& theUpdateFlags, QString& theErrorMsg );
+
+private slots:
+  void                         onArgumentsChanged();
+
+private:
+  void                         createPreview();
+  void                         erasePreview();
+
+  TopoDS_Shape                 getTranslatedShape() const;
+
+private:
+  Handle(HYDROData_Obstacle)   myEditedObject;
+
+  HYDROGUI_Shape*              myPreviewPrs;
+};
+
+#endif
index 2ccbb1c37fe77da34295983a5740aac5787b37ba..0703adc5d02814ab8e376e675269a0130e80ab80 100644 (file)
@@ -810,6 +810,10 @@ Would you like to remove all references from the image?</translation>
       <source>DSK_CREATE_CYLINDER</source>
       <translation>Create cylinder obstacle</translation>
     </message>
+    <message>
+      <source>DSK_TRANSLATE_OBSTACLE</source>
+      <translation>Translate obstacle</translation>
+    </message>
     <message>
       <source>DSK_COLOR</source>
       <translation>Set object color</translation>
@@ -1050,6 +1054,10 @@ Would you like to remove all references from the image?</translation>
       <source>MEN_CREATE_CYLINDER</source>
       <translation>Create cylinder</translation>
     </message>
+    <message>
+      <source>MEN_TRANSLATE_OBSTACLE</source>
+      <translation>Translate</translation>
+    </message>
     <message>
       <source>MEN_COLOR</source>
       <translation>Color</translation>
@@ -1262,6 +1270,10 @@ Would you like to remove all references from the image?</translation>
       <source>STB_CREATE_CYLINDER</source>
       <translation>Create cylinder obstacle</translation>
     </message>
+    <message>
+      <source>STB_TRANSLATE_OBSTACLE</source>
+      <translation>Translate obstacle</translation>
+    </message>
     <message>
       <source>STB_COLOR</source>
       <translation>Set object color</translation>
@@ -1988,6 +2000,42 @@ Polyline should consist from one not closed curve.</translation>
     </message>
   </context>
 
+  <context>
+    <name>HYDROGUI_TranslateObstacleDlg</name>
+    <message>
+      <source>OBSTACLE_NAME</source>
+      <translation>Obstacle name</translation>
+    </message>
+    <message>
+      <source>NAME</source>
+      <translation>Name</translation>
+    </message>
+    <message>
+      <source>TRANSLATION_ARGUMENTS</source>
+      <translation>Arguments</translation>
+    </message>
+    <message>
+      <source>DX</source>
+      <translation>Dx</translation>
+    </message>
+    <message>
+      <source>DY</source>
+      <translation>Dy</translation>
+    </message>
+    <message>
+      <source>DZ</source>
+      <translation>Dz</translation>
+    </message>
+  </context>
+
+  <context>
+    <name>HYDROGUI_TranslateObstacleOp</name>
+    <message>
+      <source>TRANSLATE_OBSTACLE</source>
+      <translation>Translation of an obstacle</translation>
+    </message>
+  </context>
+  
 
   <context>
     <name>HYDROGUI_RunBrowser</name>