Highlight an ON_Brep geometry


#1

Dale,

We display an ON_Brep geometry with the following code. Could you show us how to highlight the ON_Brep geometry when displaying it?

ON_Brep * prnBrep…
pBrepObject->SetBrep(prnBrep);
m_pDoc->AddObject(pBrepObject);
m_pDoc->Redraw();


(Dale Fugier) #2

Hi @XNurbs,

If you want to select the object, then you can do this:

ON_Brep * prnBrep…
pBrepObject->SetBrep(prnBrep);
if (m_pDoc->AddObject(pBrepObject))
{
  pBrepObject->Select(true);
  m_pDoc->Redraw();
}

Does this help?

– Dale


#3

We want to highlight it without selecting it. Is that possible?


(Dale Fugier) #4

Rather than calling CRhinoObject::Select, call CRhinoObject::Highlight.

– Dale