X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FGraphic3d%2FGraphic3d_ClipPlane.cxx;h=4cc44913e2ff64d5c80b170217a85a25ba2c1b06;hb=611684187de2a7b7c59c33f7da9ca51afa64a326;hpb=c8428cb3e456e42cbe875baf6a2b39be41fe0ff3 diff --git a/src/Graphic3d/Graphic3d_ClipPlane.cxx b/src/Graphic3d/Graphic3d_ClipPlane.cxx index 22ac56c4b6..4cc44913e2 100755 --- a/src/Graphic3d/Graphic3d_ClipPlane.cxx +++ b/src/Graphic3d/Graphic3d_ClipPlane.cxx @@ -27,13 +27,13 @@ namespace static Handle(Graphic3d_AspectFillArea3d) defaultAspect() { - const Graphic3d_MaterialAspect aMaterial (Graphic3d_NOM_DEFAULT); + Graphic3d_MaterialAspect aMaterial (Graphic3d_NOM_DEFAULT); Handle(Graphic3d_AspectFillArea3d) anAspect = new Graphic3d_AspectFillArea3d(); anAspect->SetDistinguishOff(); anAspect->SetFrontMaterial (aMaterial); anAspect->SetHatchStyle (Aspect_HS_HORIZONTAL); anAspect->SetInteriorStyle (Aspect_IS_SOLID); - anAspect->SetInteriorColor (aMaterial.Color()); + anAspect->SetInteriorColor (Quantity_NOC_GRAY20); anAspect->SetSuppressBackFaces (false); return anAspect; } @@ -177,6 +177,17 @@ Handle(Graphic3d_ClipPlane) Graphic3d_ClipPlane::Clone() const return new Graphic3d_ClipPlane(*this); } +// ======================================================================= +// function : SetCappingColor +// purpose : +// ======================================================================= +void Graphic3d_ClipPlane::SetCappingColor (const Quantity_Color& theColor) +{ + myAspect->SetInteriorColor (theColor); + myAspect->ChangeFrontMaterial().SetColor (theColor); + ++myAspectMod; +} + // ======================================================================= // function : SetCappingMaterial // purpose : @@ -184,7 +195,10 @@ Handle(Graphic3d_ClipPlane) Graphic3d_ClipPlane::Clone() const void Graphic3d_ClipPlane::SetCappingMaterial (const Graphic3d_MaterialAspect& theMat) { myAspect->SetFrontMaterial (theMat); - myAspect->SetInteriorColor (theMat.Color()); + if (myAspect->FrontMaterial().MaterialType() != Graphic3d_MATERIAL_ASPECT) + { + myAspect->SetInteriorColor (theMat.Color()); + } ++myAspectMod; }