How to Keep Object Hidden While Dragging in DisplayConduit?

Hello everyone,

In the DrawForeground method using DisplayConduit, I am drawing my object with:

display.DrawBrepShaded(toDraw, _material);

I rotate the object while dragging it based on the angle difference between the original point and the current mouse position. After releasing the mouse, the object’s new position becomes the dropped location.

However, I want the object to be hidden during the click-and-drag operation. I’m trying to make it invisible while dragging, and only show the updated object after the mouse is released.

I’m having trouble getting this behavior to work properly. What would be the correct approach to hide the object during dragging?

Hi @ilterhan,

In a DisplayConduit.PreDrawObject override, if the the Rhino object about to be drawn is the one you care about, set DrawObjectEventArgs.DrawObject to false.

– Dale

1 Like

Thank you very much, Dale. This is exactly what I needed.