#include "HYDROData_IAltitudeObject.h"
#include <TopoDS_Shape.hxx>
#include <TDataStd_Integer.hxx>
+#include <TDataStd_Real.hxx>
#include <QColor>
-IMPLEMENT_STANDARD_HANDLE(HYDROData_Object,HYDROData_Entity)
+#define _DEVDEBUG_
+#include "HYDRO_trace.hxx"
+
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Object,HYDROData_Entity)
HYDROData_Object::HYDROData_Object( Geometry theGeometry )
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
HYDROData_Iterator::CreateObject( aChildLabel, anAltitudeObjectType ) );
QString anAltitudePref = GetName() + "_Altitude";
+ DEBTRACE("anAltitudePref " << anAltitudePref.toStdString());
QString anAltitudeName = HYDROData_Tool::GenerateObjectName( aDocument, anAltitudePref );
anAltitudeObject->SetName( anAltitudeName );
{
TDataStd_Integer::Set( myLab, isSubmersible ? 1 : 0 );
}
+
+void HYDROData_Object::GetBoundaries( QList<TopoDS_Shape>& 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 );
+ }
+ }
+}