SketcherPrs_SymbolPrs::SketcherPrs_SymbolPrs(ModelAPI_Feature* theConstraint,
- ModelAPI_CompositeFeature* theSketcher,
- const std::shared_ptr<GeomAPI_Ax3>& thePlane)
+ SketchPlugin_Sketch* theSketcher)
: AIS_InteractiveObject(), myConstraint(theConstraint),
- myPlane(thePlane), myIsCustomColor(false),
+ myPlane(theSketcher->coordinatePlane()), myIsCustomColor(false),
mySketcher(theSketcher)
{
SetAutoHilight(Standard_False);
if (!myAspect.IsNull())
myAspect->SetColor (myCustomColor);
+
+ Handle(Prs3d_Presentation) aPrs = Presentation();
+ if (!aPrs.IsNull()) {
+ if (myIsCustomColor) {
+ Handle(Graphic3d_PresentationAttributes) aAttr = new Graphic3d_PresentationAttributes();
+ aAttr->SetColor(myCustomColor);
+ aPrs->Highlight(aAttr);
+ }
+ else {
+ aPrs->UnHighlight();
+ }
+ }
}
//*********************************************************************************
const Handle(Prs3d_Presentation)& thePrs,
Quantity_Color theColor) const
{
- int aColNam = theColor.Name();
- //cout<<"### SketcherPrs_SymbolPrs::drawShape "<<theColor.Name()<<endl;
Handle(Graphic3d_AspectLine3d) aLineAspect =
new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);