]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
refs #579
authorisn <isn@opencascade.com>
Thu, 11 Jun 2015 08:29:33 +0000 (11:29 +0300)
committerisn <isn@opencascade.com>
Thu, 11 Jun 2015 08:29:33 +0000 (11:29 +0300)
src/HYDROGUI/HYDROGUI_Shape.cxx

index c430bb5163bfcc962ed867f22361ca8b43c155b8..05e271dd5a1d6446ca1fef78b752539ab246a05d 100644 (file)
@@ -480,7 +480,17 @@ Handle_AIS_InteractiveObject HYDROGUI_Shape::createShape() const
     return Handle_AIS_InteractiveObject();
   
   TopAbs_ShapeEnum aShapeType = myTopoShape.ShapeType();
-  if ( aShapeType==TopAbs_EDGE || aShapeType==TopAbs_WIRE ) {
+  bool IsWireEdgeCompound = aShapeType==TopAbs_COMPOUND;
+  if (IsWireEdgeCompound) {
+    TopoDS_Iterator itr(myTopoShape);
+    while (itr.More() && IsWireEdgeCompound) {
+      if (itr.Value().ShapeType() != TopAbs_WIRE && itr.Value().ShapeType() != TopAbs_EDGE)
+        IsWireEdgeCompound = false;
+      itr.Next();
+    }
+  }
+
+  if ( aShapeType==TopAbs_EDGE || aShapeType==TopAbs_WIRE || IsWireEdgeCompound) {
     return new HYDROGUI_Polyline( myTopoShape );
   } else {
     return new AIS_Shape( myTopoShape );