From: asl Date: Mon, 15 Jun 2015 07:56:41 +0000 (+0300) Subject: Merge remote-tracking branch 'origin/BR_SHAPE_RECOGNITION' into BR_v14_rc X-Git-Tag: v1.4.1~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7bc13643f345b813472c30c65307ea78c12df428;p=modules%2Fhydro.git Merge remote-tracking branch 'origin/BR_SHAPE_RECOGNITION' into BR_v14_rc --- 7bc13643f345b813472c30c65307ea78c12df428 diff --cc src/HYDROGUI/HYDROGUI_Shape.cxx index 05e271dd,60962d74..113d9724 --- a/src/HYDROGUI/HYDROGUI_Shape.cxx +++ b/src/HYDROGUI/HYDROGUI_Shape.cxx @@@ -476,21 -476,12 +476,22 @@@ void HYDROGUI_Shape::setZLayer( const i Handle_AIS_InteractiveObject HYDROGUI_Shape::createShape() const { - if( myTopoShape.IsNull() ) + if( myTopoShape.IsNull() ) { 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 );