X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_Shape.cxx;h=37eaf35001c6050e1f74bab38968ac0aaa59cef9;hb=a1431f03eac1d1aed4203d0568d987c41ce939b3;hp=ceafe1eb669f408b4fbcfe5fc72bcbec1cf95f31;hpb=dd6cdff692e9ce241c2e5eeb11385a05b3ebbcb3;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_Shape.cxx b/src/HYDROGUI/HYDROGUI_Shape.cxx index ceafe1eb..37eaf350 100644 --- a/src/HYDROGUI/HYDROGUI_Shape.cxx +++ b/src/HYDROGUI/HYDROGUI_Shape.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -350,6 +351,28 @@ void HYDROGUI_Shape::update( const bool theIsUpdateViewer ) setFillingColor( aFillingColor, false, false ); setBorderColor( aBorderColor, false, false ); } + else if ( myObject->IsKind( STANDARD_TYPE(HYDROData_ShapesGroup) ) ) + { + Handle(HYDROData_ShapesGroup) aShapesGroup = + Handle(HYDROData_ShapesGroup)::DownCast( myObject ); + + TopTools_SequenceOfShape aShapes; + aShapesGroup->GetShapes( aShapes ); + + BRepBuilderAPI_MakeWire aMakeWire; + + for ( int i = 1, n = aShapes.Length(); i <= n; ++i ) + { + TopoDS_Edge anEdge = TopoDS::Edge( aShapes.Value( i ) ); + aMakeWire.Add( anEdge ); + } + + aMakeWire.Build(); + TopoDS_Wire aResWire = aMakeWire.Wire(); + + setWire( aResWire, false, false ); + setBorderColor( Qt::red, false, false ); + } } if ( myShape.IsNull() || !isVisible() ) @@ -671,7 +694,10 @@ void HYDROGUI_Shape::colorShapeBorder( const QColor& theColor ) Handle(Prs3d_LineAspect) aBoundaryAspect = anAttributes->FaceBoundaryAspect(); if ( !aBoundaryAspect.IsNull() ) + { aBoundaryAspect->SetColor( aBorderColor ); + anAttributes->SetFaceBoundaryAspect( aBoundaryAspect ); + } } } else if ( myDisplayMode == AIS_WireFrame )