X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_Polyline.cxx;h=4f070b47c634761832d79a24ef1b43df8269f823;hb=9c947f35615e69e9e54a8c4b074dd1f2be13689c;hp=91e0a06ab5c10de7e1653de9b4776db9f950ce4c;hpb=f709724a7a412254db7ee6ca094b01b6dc75e82b;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_Polyline.cxx b/src/HYDROGUI/HYDROGUI_Polyline.cxx index 91e0a06a..4f070b47 100644 --- a/src/HYDROGUI/HYDROGUI_Polyline.cxx +++ b/src/HYDROGUI/HYDROGUI_Polyline.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -82,8 +83,11 @@ void HYDROGUI_Polyline::Compute(const Handle(PrsMgr_PresentationManager3d)& aPre aPrs->Clear(); Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup( aPrs ); - Handle(Graphic3d_AspectLine3d) anAspect = Attributes()->FaceBoundaryAspect()->Aspect(); - aGroup->SetGroupPrimitivesAspect( anAspect ); + Quantity_Color aColor; + Aspect_TypeOfLine aType; + Standard_Real anWidth; + Attributes()->LineAspect()->Aspect()->Values( aColor, aType, anWidth ); + Handle(Graphic3d_AspectLine3d) anAspect = new Graphic3d_AspectLine3d( aColor, aType, anWidth ); TopExp_Explorer Exp1 ( myshape, TopAbs_EDGE ); for ( ; Exp1.More(); Exp1.Next() ) @@ -91,7 +95,10 @@ void HYDROGUI_Polyline::Compute(const Handle(PrsMgr_PresentationManager3d)& aPre TopoDS_Edge anEdge = TopoDS::Edge( Exp1.Current() ); Handle( Graphic3d_ArrayOfPolylines ) anArray = BuildEdgePresentation( anEdge, 0.1 ); if( !anArray.IsNull() ) - aGroup->AddPrimitiveArray ( anArray ); + { + aGroup->SetPrimitivesAspect( anAspect ); + aGroup->AddPrimitiveArray( anArray ); + } }