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 );