From 852bfa6815309d82b4340d0b108a3b602ebda5fa Mon Sep 17 00:00:00 2001 From: isn Date: Thu, 11 Jun 2015 11:29:33 +0300 Subject: [PATCH] refs #579 --- src/HYDROGUI/HYDROGUI_Shape.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/HYDROGUI/HYDROGUI_Shape.cxx b/src/HYDROGUI/HYDROGUI_Shape.cxx index c430bb51..05e271dd 100644 --- a/src/HYDROGUI/HYDROGUI_Shape.cxx +++ b/src/HYDROGUI/HYDROGUI_Shape.cxx @@ -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 ); -- 2.30.2