X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Object.cxx;h=f2570cfe08970263164b2e063f6b1d50a308c686;hb=a95289fabbb6fbf6f32c06207422c65aafd5bd65;hp=78f734ea0a9b387d71b020c1fbae3f0c5e3ed986;hpb=914d3c8044ea08613f24ce41a94ecf067e0e750f;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Object.cxx b/src/HYDROData/HYDROData_Object.cxx index 78f734ea..f2570cfe 100644 --- a/src/HYDROData/HYDROData_Object.cxx +++ b/src/HYDROData/HYDROData_Object.cxx @@ -25,9 +25,13 @@ #include "HYDROData_IAltitudeObject.h" #include #include +#include #include +#define _DEVDEBUG_ +#include "HYDRO_trace.hxx" + IMPLEMENT_STANDARD_HANDLE(HYDROData_Object,HYDROData_Entity) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Object,HYDROData_Entity) @@ -309,6 +313,7 @@ void HYDROData_Object::checkAndSetAltitudeObject() Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); ObjectKind anAltitudeObjectType = getAltitudeObjectType(); + //DEBTRACE("HYDROData_Object::checkAndSetAltitudeObject anAltitudeObjectType="<< anAltitudeObjectType); if ( anAltitudeObjectType == KIND_UNKNOWN ) return; // No need to create altitude object @@ -323,6 +328,7 @@ void HYDROData_Object::checkAndSetAltitudeObject() HYDROData_Iterator::CreateObject( aChildLabel, anAltitudeObjectType ) ); QString anAltitudePref = GetName() + "_Altitude"; + DEBTRACE("anAltitudePref " << anAltitudePref.toStdString()); QString anAltitudeName = HYDROData_Tool::GenerateObjectName( aDocument, anAltitudePref ); anAltitudeObject->SetName( anAltitudeName ); @@ -374,3 +380,26 @@ void HYDROData_Object::SetIsSubmersible( bool isSubmersible ) const { TDataStd_Integer::Set( myLab, isSubmersible ? 1 : 0 ); } + +void HYDROData_Object::GetBoundaries( QList& theBoundShapes, + QStringList& theBoundNames ) const +{ + HYDROData_SequenceOfObjects aGroups = GetGroups(); + HYDROData_SequenceOfObjects::Iterator anIter( aGroups ); + for ( ; anIter.More(); anIter.Next() ) + { + Handle(HYDROData_ShapesGroup) aGroup = + Handle(HYDROData_ShapesGroup)::DownCast( anIter.Value() ); + if( aGroup.IsNull() ) + continue; + + QString aName = aGroup->GetName(); + TopTools_SequenceOfShape aShapes; + aGroup->GetShapes( aShapes ); + for( int i=1, n=aShapes.Length(); i<=n; i++ ) + { + theBoundShapes.append( aShapes( i ) ); + theBoundNames.append( aName ); + } + } +}