How can I refresh the screen without full drawing?

Hello,

I want to refresh the screen without full drawing, but I can not do it at Rhino 6.

At Rhino 5 I was able to do it with the following code:

CRhinoDoc* pDoc = RhinoApp().ActiveDoc();
pDoc->SetRedrawDisplayHint(CRhinoView::refresh_display_hint);
pDoc->Redraw();

After that, only CRhinoDrawCallback::DrawDecorations is called. (expected behavior)

However, at Rhino 6, CRhinoDisplayConduit::ExecConduit is called many times with various channels. (For example, SC_PREDRAWOBJECTS etc.)
Therefore full drawing will be done.
Changing DISPLAY_HINT does not change the result.
It seems that the SetRedrawDisplayHint function doesn’t work at Rhino 6.

How can I refresh the screen without full drawing?

Rhino 6 SR15 (6.15.19164)
Rhino 6 C++ SDK (6.15.19164.21011)

I used 6.12.19029.06381 before. The issue was the same.

@stevebaer, can you look at this?

– Dale

Is this causing a problem? The V6 display was dramatically changed from what it was in V5.

Thank you for you reply.

Yes, I know it.
However most of our functions could be ported from Rhino 5 to 6 except for a few issues.
I’m very happy.

Refreshing is one of my remaining issues.
Does this function work well elsewhere?

Are you using a CRhinoDrawCallback class or a CRhinoDisplayConduit?

I’ve tested both of them.

CRhinoDoc* pDoc = RhinoApp().ActiveDoc();
pDoc->SetRedrawDisplayHint(CRhinoView::refresh_display_hint);
pDoc->Redraw(); // (A)

After calling Redraw at (A) above, the following (1) to (6) are called before returning from there.
(CRhinoDisplayConduit class is constructed with the channel_mask of CSupportChannels::SC_DRAWOBJECT|CSupportChannels::SC_PREDRAWOBJECTS|CSupportChannels::SC_CALCBOUNDINGBOX|CSupportChannels::SC_CALCCLIPPINGPLANES|CSupportChannels::SC_DRAWOVERLAY)

(1) CRhinoDisplayConduit::ExecConduit with nChannel == SC_CALCBOUNDINGBOX
(2) CRhinoDisplayConduit::ExecConduit with nChannel == SC_CALCCLIPPINGPLANES
(3) CRhinoDisplayConduit::ExecConduit with nChannel == SC_PREDRAWOBJECTS
(4) CRhinoDisplayConduit::ExecConduit with nChannel == SC_DRAWOBJECT
(5) CRhinoDisplayConduit::ExecConduit with nChannel == SC_DRAWOVERLAY
(6) CRhinoDrawCallback::DrawDecorations

For Rhino 5, even the same code will only call (6).
Is this behavior as expected?

I believe this is expected behavior now as the display is noticing the existence of conduits which may need to be executed. Is you display frame rate slow? If so, I may be able to help with your conduit code to speed things up.