With the PR2 release I had some code that created a sphere, added it to a label and displayed it, this code no longer compiles. The code looked like this: (parent is the label)
BRepPrimAPI_MakeSphere S( gp_Pnt(0,0,0), 200.0); TNaming_Builder bld( parent); bld.Generated( S);
Handle(TPrsStd_AISPresentation) pres = new TPrsStd_AISPresentation();
/* ** Drivers and presentation */
TPrsStd_DriverTable drivers; TPrsStd_DriverTable::Get()->InitStandardDrivers(); pres->Set( parent, TNaming_NamedShape::GetID()); pres->Display( true); TPrsStd_AISPresentation::Display( parent, true);
The last line was needed to display the sphere in the view, this method is no longer available, I have added a pres->Display( true), but that does not help anything.
How do I display an object added as an attribute to an OCAF document with the latest release ?