+TCollection_AsciiString HYDROData_Obstacle::GetGeomObjectName() const
+{
+ TCollection_AsciiString aRes;
+
+ int aDocId = -1;
+ if ( !HYDROData_Document::DocumentId( HYDROData_Document::Document( myLab ), aDocId ) || aDocId < 0 ) {
+ return aRes;
+ }
+
+#ifndef LIGHT_MODE
+ SALOMEDS::Study_var aDSStudy = HYDROData_GeomTool::GetStudyByID( aDocId );
+
+ if ( !aDSStudy->_is_nil() ) {
+ TCollection_AsciiString anEntry = GetGeomObjectEntry();
+ SALOMEDS::SObject_var aSObject = aDSStudy->FindObjectID( anEntry.ToCString() );
+ if ( !aSObject->_is_nil() ) {
+ aRes = TCollection_AsciiString( aSObject->GetName() );
+ }
+ }
+#endif
+ return aRes;
+}
+
+void HYDROData_Obstacle::Translate( const double theDx,
+ const double theDy,
+ const double theDz )
+{
+ TopoDS_Shape aShape3D = GetShape3D();
+
+ TopoDS_Shape aTranslatedShape3D = HYDROData_ShapesTool::Translated( aShape3D, theDx, theDy, theDz );
+ if ( aTranslatedShape3D.IsNull() )
+ return;
+
+ SetShape3D( aTranslatedShape3D );
+
+ setTranslation( theDx, theDy, theDz );
+}
+