Salome HOME
Exlude the user input during process events by application (Bug #325).
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Shape.cxx
index ca88fc01f75ba050ebd222463b41c5630578fd48..7739a90ed91925faf577af9c7c5c45b407847c7e 100644 (file)
@@ -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 );