Salome HOME
projects
/
modules
/
hydro.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'origin/master' into BR_LAND_COVER_MAP
[modules/hydro.git]
/
src
/
HYDROData
/
HYDROData_SplitToZonesTool.cxx
diff --git
a/src/HYDROData/HYDROData_SplitToZonesTool.cxx
b/src/HYDROData/HYDROData_SplitToZonesTool.cxx
index 821db0edb99860f1e739183b781cf8169d4e203d..cd7a2d0de9c0701a925441c9cd2d0ddc6f7dd1cb 100644
(file)
--- a/
src/HYDROData/HYDROData_SplitToZonesTool.cxx
+++ b/
src/HYDROData/HYDROData_SplitToZonesTool.cxx
@@
-1,8
+1,4
@@
-// Copyright (C) 2007-2015 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
-//
+// Copyright (C) 2014-2015 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
// 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
@@
-23,6
+19,7
@@
#include "HYDROData_SplitToZonesTool.h"
#include "HYDROData_PolylineXY.h"
#include "HYDROData_SplitToZonesTool.h"
#include "HYDROData_PolylineXY.h"
+#include "HYDROData_LandCover.h"
#include "HYDROData_ShapesGroup.h"
#include <HYDROData_Transform.h>
#include <BRepAlgoAPI_Cut.hxx>
#include "HYDROData_ShapesGroup.h"
#include <HYDROData_Transform.h>
#include <BRepAlgoAPI_Cut.hxx>
@@
-143,12
+140,19
@@
HYDROData_SplitToZonesTool::SplitDataList
#endif
for( int anIndex = 1, aLength = theObjectList.Length(); anIndex <= aLength; anIndex++ )
{
#endif
for( int anIndex = 1, aLength = theObjectList.Length(); anIndex <= aLength; anIndex++ )
{
- Handle(HYDROData_Object) aGeomObj =
- Handle(HYDROData_Object)::DownCast( theObjectList.Value( anIndex ) );
- if( aGeomObj.IsNull() )
- continue;
+ Handle(HYDROData_Entity) anObj = theObjectList.Value( anIndex );
+ TopoDS_Shape aShape;
+
+ Handle(HYDROData_Object) aGeomObj = Handle(HYDROData_Object)::DownCast( anObj );
+ if( !aGeomObj.IsNull() ) {
+ aShape = aGeomObj->GetTopShape();
+ } else {
+ Handle(HYDROData_LandCover) aLandCoverObj = Handle(HYDROData_LandCover)::DownCast( anObj );
+ if ( !aLandCoverObj.IsNull() ) {
+ aShape = aLandCoverObj->GetShape();
+ }
+ }
- TopoDS_Shape aShape = aGeomObj->GetTopShape();
if ( aShape.IsNull() )
continue;
#ifdef DEB_SPLIT_TO_ZONES
if ( aShape.IsNull() )
continue;
#ifdef DEB_SPLIT_TO_ZONES
@@
-161,12
+165,12
@@
HYDROData_SplitToZonesTool::SplitDataList
for ( ; anExp.More(); anExp.Next() ) {
const TopoDS_Face& aFace = TopoDS::Face( anExp.Current() );
if ( !aFace.IsNull() ) {
for ( ; anExp.More(); anExp.Next() ) {
const TopoDS_Face& aFace = TopoDS::Face( anExp.Current() );
if ( !aFace.IsNull() ) {
- SplitData aSplitData( SplitData::Data_Zone, aFace, a
Geom
Obj->GetName() );
+ SplitData aSplitData( SplitData::Data_Zone, aFace, a
n
Obj->GetName() );
anInputSplitDataList.append( aSplitData );
}
}
} else {
anInputSplitDataList.append( aSplitData );
}
}
} else {
- SplitData aSplitData( SplitData::Data_Zone, aShape, a
Geom
Obj->GetName() );
+ SplitData aSplitData( SplitData::Data_Zone, aShape, a
n
Obj->GetName() );
anInputSplitDataList.append( aSplitData );
}
}
anInputSplitDataList.append( aSplitData );
}
}
@@
-600,3
+604,11
@@
HYDROData_SplitToZonesTool::SplitDataList
return anOutputSplitDataList;
}
return anOutputSplitDataList;
}
+HYDROData_SplitToZonesTool::SplitDataList
+ HYDROData_SplitToZonesTool::Split( const HYDROData_SequenceOfObjects& theObjectList )
+{
+ HYDROData_SequenceOfObjects aGeomGroups;
+ Handle(HYDROData_PolylineXY) aPolyline;
+
+ return Split( theObjectList, aGeomGroups, aPolyline );
+}
\ No newline at end of file