Redisplaying objects

Hi everybody,

I'm facing a quite strange problem so I need a little help. Does anybody know how should I tell the viewer to regenerate the displayed object? Let's say that I generate a TopoDS_Edge with a circular curve. When the edge is loaded into the AIS_InteractiveContext with the Display method the edge appears but it very "coarse". It seems that it is displayed like a polyline. Hovewer if I select and change the DisplayMode to shaded, the edge appears perfectly smooth. But when I switch back to wireframe it's again coarse. I tried to redisplay the object but no result. I use the following code:

for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ())
myAISContext->Redisplay(myAISContext->Current(), Standard_False, Standard_True);

myAISContext->UpdateCurrentViewer();

Does anybody a solution?

Andras

Andras's picture

Sorry but I had no feedback from the server and I posted several time :)

Andras

Zsolt Draga's picture

Szia András,

Légyszives küld már el az e-mail cimmed.
Szakmai illetve munkaügyében szeretnék veled beszélni.

Üdv:zsolti

Joe's picture

Hi
Reference sample CDisplayAnimationDoc::OnShading()

Joe

Andras's picture

Thanks Joe,

It works.

Andras

Andras's picture

Try this in OCC_3dView::OnMouseMove(UINT nFlags, CPoint point)
...
switch (myCurrentMode)
{
case CurAction3d_DynamicZooming :
myView->Zoom(point.y, 0, myYmax, 0);
// save the current mouse coordinate in min \n";
myXmax = point.x;
myYmax = point.y;
break;

Andras

Andras's picture

Sorry it was for another topic :)