X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FAIS%2FAIS_RubberBand.cxx;h=80641f00fd299aeb95ffafef2d0be68ef0a15def;hp=08779c33f8a12a7904ae90a8beb5e1219c82b4f8;hb=4c7a3faef5f292475c23ee615ad49d57fc039b58;hpb=7bd071edb13e5aa7a1d3aed4ed4366fe3da83324 diff --git a/src/AIS/AIS_RubberBand.cxx b/src/AIS/AIS_RubberBand.cxx index 08779c33f8..80641f00fd 100644 --- a/src/AIS/AIS_RubberBand.cxx +++ b/src/AIS/AIS_RubberBand.cxx @@ -44,6 +44,7 @@ AIS_RubberBand::AIS_RubberBand() myDrawer->SetLineAspect (new Prs3d_LineAspect (Quantity_NOC_WHITE, Aspect_TOL_SOLID, 1.0)); myDrawer->SetShadingAspect (new Prs3d_ShadingAspect()); myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NOM_PLASTIC); + myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TOSM_UNLIT); myDrawer->ShadingAspect()->Aspect()->SetInteriorStyle (Aspect_IS_EMPTY); myDrawer->ShadingAspect()->Aspect()->SetAlphaMode (Graphic3d_AlphaMode_Blend); myDrawer->ShadingAspect()->SetTransparency (1.0); @@ -66,6 +67,7 @@ AIS_RubberBand::AIS_RubberBand (const Quantity_Color& theLineColor, myDrawer->SetLineAspect (new Prs3d_LineAspect (theLineColor, theLineType, theWidth)); myDrawer->SetShadingAspect (new Prs3d_ShadingAspect()); myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NOM_PLASTIC); + myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TOSM_UNLIT); myDrawer->ShadingAspect()->Aspect()->SetInteriorStyle (Aspect_IS_EMPTY); myDrawer->ShadingAspect()->Aspect()->SetAlphaMode (Graphic3d_AlphaMode_Blend); myDrawer->ShadingAspect()->SetTransparency (1.0); @@ -91,6 +93,7 @@ AIS_RubberBand::AIS_RubberBand (const Quantity_Color& theLineColor, myDrawer->SetShadingAspect (new Prs3d_ShadingAspect()); myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NOM_PLASTIC); myDrawer->ShadingAspect()->SetColor (theFillColor); + myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TOSM_UNLIT); myDrawer->ShadingAspect()->Aspect()->SetInteriorStyle (Aspect_IS_SOLID); myDrawer->ShadingAspect()->Aspect()->SetAlphaMode (Graphic3d_AlphaMode_Blend); myDrawer->ShadingAspect()->SetTransparency (theTransparency); @@ -392,13 +395,12 @@ void AIS_RubberBand::Compute (const Handle(PrsMgr_PresentationManager3d)& /*theP const Handle(Prs3d_Presentation)& thePresentation, const Standard_Integer /*theMode*/) { - Handle (Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (thePresentation); - // Draw filling if (IsFilling() && fillTriangles()) { - aGroup->SetGroupPrimitivesAspect (myDrawer->ShadingAspect()->Aspect()); - aGroup->AddPrimitiveArray (myTriangles); + Handle(Graphic3d_Group) aGroup1 = thePresentation->NewGroup(); + aGroup1->SetGroupPrimitivesAspect (myDrawer->ShadingAspect()->Aspect()); + aGroup1->AddPrimitiveArray (myTriangles); } // Draw frame @@ -433,6 +435,7 @@ void AIS_RubberBand::Compute (const Handle(PrsMgr_PresentationManager3d)& /*theP } } + Handle(Graphic3d_Group) aGroup = thePresentation->NewGroup(); aGroup->SetGroupPrimitivesAspect (myDrawer->LineAspect()->Aspect()); aGroup->AddPrimitiveArray (myBorders); }