X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_Shape.cxx;h=7739a90ed91925faf577af9c7c5c45b407847c7e;hb=f34b90e9e4e02ba65419134d5d37a2e42aecfabf;hp=ca88fc01f75ba050ebd222463b41c5630578fd48;hpb=b7337e3ea5eeb15fdad4eac991480a20405f8cff;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_Shape.cxx b/src/HYDROGUI/HYDROGUI_Shape.cxx index ca88fc01..7739a90e 100644 --- a/src/HYDROGUI/HYDROGUI_Shape.cxx +++ b/src/HYDROGUI/HYDROGUI_Shape.cxx @@ -362,19 +362,17 @@ void HYDROGUI_Shape::update( const bool theIsUpdateViewer, TopTools_SequenceOfShape aShapes; aShapesGroup->GetShapes( aShapes ); - BRepBuilderAPI_MakeWire aMakeWire; + TopoDS_Compound aCompound; + BRep_Builder aCompoundBuilder; + aCompoundBuilder.MakeCompound( aCompound ); for ( int i = 1, n = aShapes.Length(); i <= n; ++i ) { - TopoDS_Edge anEdge = TopoDS::Edge( aShapes.Value( i ) ); - aMakeWire.Add( anEdge ); + const TopoDS_Shape& aShape = aShapes.Value( i ); + aCompoundBuilder.Add( aCompound, aShape ); } - aMakeWire.Build(); - TopoDS_Wire aResWire = aMakeWire.Wire(); - - setWire( aResWire, false, false ); - setBorderColor( Qt::red, false, false ); + setShape( aCompound, false, false ); } } @@ -581,6 +579,8 @@ void HYDROGUI_Shape::buildShape() myShape = new AIS_Shape( myTopoShape ); } + myShape->SetHLRAngleAndDeviation( 0.001 ); + if ( !myObject.IsNull() ) myShape->SetOwner( myObject ); @@ -620,9 +620,9 @@ void HYDROGUI_Shape::buildShape() Handle(Prs3d_ShadingAspect) aShadingAspect = anAttributes->ShadingAspect(); if ( !aShadingAspect.IsNull() ) { - Graphic3d_MaterialAspect aMatAspect; - aMatAspect.SetAmbient( 1 ); - aMatAspect.SetDiffuse( 0 ); + Graphic3d_MaterialAspect aMatAspect( Graphic3d_NOM_PLASTIC ); + //aMatAspect.SetAmbient( 1 ); + //aMatAspect.SetDiffuse( 0 ); aShadingAspect->Aspect()->SetFrontMaterial( aMatAspect ); aShadingAspect->Aspect()->SetBackMaterial( aMatAspect );