#include "HYDROData_Obstacle.h"
#include "HYDROData_Document.h"
-#include "HYDROData_EdgesGroup.h"
+#include "HYDROData_ShapesGroup.h"
+#include "HYDROData_ShapesTool.h"
#include <Basics_Utils.hxx>
TopoDS_Shape anObstacleShape = GetTopShape();
if ( !anObstacleShape.IsNull() )
{
- HYDROData_SequenceOfEdges aWireEdges;
-
- TopExp_Explorer anExp( anObstacleShape, TopAbs_EDGE );
- for ( ; anExp.More(); anExp.Next() )
- {
- TopoDS_Edge anEdge = TopoDS::Edge( anExp.Current() );
- if ( anEdge.IsNull() )
- continue;
-
- aWireEdges.Append( anEdge );
- }
-
+ TopTools_SequenceOfShape aWireEdges;
+ HYDROData_ShapesTool::ExploreShapeToShapes( anObstacleShape, TopAbs_EDGE, aWireEdges );
if ( !aWireEdges.IsEmpty() )
{
- QString aWireGroupName = GetName() + "_External_Wire";
+ QString aWireGroupName = GetName() + "_Outer_Wire";
- Handle(HYDROData_EdgesGroup) anExtWireGroup = createGroupObject();
+ Handle(HYDROData_ShapesGroup) anExtWireGroup = createGroupObject();
anExtWireGroup->SetName( aWireGroupName );
- anExtWireGroup->SetEdges( aWireEdges );
+ anExtWireGroup->SetShapes( aWireEdges );
}
}
}