Highlight an ON_Brep geometry

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();

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

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

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

– Dale