X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketcherPrs%2FSketcherPrs_Coincident.cpp;h=26a5e682c9c4f200a339410ed107b9e9b1974bc8;hb=9968ec652480079d0ca91b2040f6327a164807cf;hp=c4539bf63f4faf837bc4aa47da53f5d75ad0b8d9;hpb=62f5b155e079d304e2017c7bc5e7ba825b5738da;p=modules%2Fshaper.git diff --git a/src/SketcherPrs/SketcherPrs_Coincident.cpp b/src/SketcherPrs/SketcherPrs_Coincident.cpp index c4539bf63..26a5e682c 100644 --- a/src/SketcherPrs/SketcherPrs_Coincident.cpp +++ b/src/SketcherPrs/SketcherPrs_Coincident.cpp @@ -86,7 +86,7 @@ void SketcherPrs_Coincident::Compute(const Handle(PrsMgr_PresentationManager3d)& // The external yellow contour aPtA->SetType(Aspect_TOM_RING3); aPtA->SetScale(2.); - aPtA->SetColor(aValid ? Quantity_NOC_YELLOW : Quantity_NOC_BLACK); + aPtA->SetColor(aValid ? Quantity_NOC_YELLOW : myConflictingColor); Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(thePresentation); aGroup->SetPrimitivesAspect(aPtA); @@ -97,7 +97,7 @@ void SketcherPrs_Coincident::Compute(const Handle(PrsMgr_PresentationManager3d)& // Make a black mid ring aPtA->SetType(Aspect_TOM_RING1); aPtA->SetScale(1.); - aPtA->SetColor(Quantity_NOC_BLACK); + aPtA->SetColor(aValid ? Quantity_NOC_BLACK : myConflictingColor); aGroup->SetPrimitivesAspect(aPtA); aGroup->AddPrimitiveArray (aPntArray); @@ -134,18 +134,6 @@ void SketcherPrs_Coincident::SetConflictingConstraint(const bool& theConflicting const std::vector& theColor) { myIsConflicting = theConflicting; - - /*if (theConflicting) - { - if (!myAspect.IsNull()) - myAspect->SetColor (Quantity_Color (theColor[0] / 255., theColor[1] / 255., theColor[2] / 255., - Quantity_TOC_RGB)); - myIsConflicting = true; - } - else - { - if (!myAspect.IsNull()) - myAspect->SetColor (Quantity_Color (1.0, 1.0, 0.0, Quantity_TOC_RGB)); - myIsConflicting = false; - }*/ + myConflictingColor = Quantity_Color(theColor[0] / 255., theColor[1] / 255., theColor[2] / 255., + Quantity_TOC_RGB); }