DynamicDraw non-highlighting

Hello everyone.
I want to draw non-highlighted (non-overlay) in dynamic drawing, what should I do.
SC_DRAWOVERLAY//CRhinoDisplayConduit , DynamicDraw() //CRhinoGetPoint ,It seems to be overlay.
Is it possible?
like this:

In addition:

bool COrientGemsOnSufaceConduit::ExecConduit(CRhinoDisplayPipeline& dp, UINT     nActiveChannel, bool& bTerminateChannel)
      {
      	UNREFERENCED_PARAMETER(bTerminateChannel);
      	if (nActiveChannel == CSupportChannels::SC_CALCBOUNDINGBOX)
      	{
      		int i;
      		for (i = 0; i < m_objects.Count(); i++)
      		{
      			const CRhinoObject* obj = m_objects[i];
      			if (obj)
      			{
      				ON_BoundingBox bbox = obj->BoundingBox();
      				bbox.Transform(m_xform);
      				m_pChannelAttrs->m_BoundingBox.Union(bbox);
      			}
      		}
      	}
      else if (nActiveChannel == CSupportChannels::SC_DRAWOVERLAY)
      	{ 		int i, count = m_objects.Count();
      		if (count > 0)
      		{
      			dp.PushModelTransform(m_xform);
      			for (i = 0; i < count; i++)
      			{
      				const CRhinoObject* obj = m_objects[i];
      				if (obj)
      				{
      					const ON_Brep* brep;
      					ON::object_type type = obj->ObjectType();
      					if (type == ON::brep_object)
      					{
      						brep = ON_Brep::Cast(obj->Geometry());
      						if (brep)
      						{
      							CDisplayPipelineMaterial mat;
      							dp.SetupDisplayMaterial(mat, RGB(0, 0, 255));
     							dp.DrawShadedBrep(brep, &mat, nullptr);
      						}
      					}
      					if (dp.InterruptDrawing())
      						break;
      				}
      			}
     			dp.PopModelTransform();
      		}
      	}
      	return true;
     }

Is there any error in this code? The Xform in the code is constantly changing, and the displayed objects will still be trimmed or displayed incompletely.
This code in (DynamicDraw() / / CRhinoGetPoint) has the same effect, and the display is incomplete.

Thank you in advance!

Hi @Easy,

Instead of using a conduit, try doing this in a CRhinoGetPoint-derived class, in this class, override the following virtual functions:

CRhinoGetPoint::OnMouseMove() // do transform calculation here
CRhinoGetPoint::DynamicDraw() // draw your dynamic geometry here

– Dale

I use CRhinoGetPoint- derived class. In some places or angles, the display is incomplete.

void CGetInsertPoint::DynamicDraw(CRhinoDisplayPipeline& dp, const ON_3dPoint& pt)
{
	CDisplayPipelineMaterial mat;
	dp.SetupDisplayMaterial(mat, RGB(0, 0, 127));
	dp.DrawShadedBrep(&m_brep, &mat, nullptr);
	CRhinoGetPoint::DynamicDraw(dp, pt);
}

image Display incomplete
image Display incomplete
imagesuccessful

I want to create the effect of dynamically drawing “PostDrawObjects”,Any short examples?

Hi @Easy,

Dynamic drawing is not designed to draw “shaded” anything, because “shaded” also implies “depth buffered”, and the dynamic drawing routines only draw directly to the so called “front buffer” and are executed inside Rhino’s Overlay channel.

– Dale

Hi @dale
My problem is solved with SC_POSTDRAWOBJECTS, but need to refresh the view when necessary