DisplayPipeline in conduit not initialised for DrawShadedBrep

Hi

i derived a class from CRhinoDisplayConduit to create a new conduit, which shows geometry in false colors for better identification (e.g. for assembly instructions)

for that i use DrawShadedBrep to draw the shaded brep in the shaded view, but with my own material. All geometry which is shown in false colors i hide in the detail view (HideInDetail).
Everything works fine as long as there is another geometry shown and shaded normal in the view.

But if there is no other geometry shown, the geometry drawn with DrawShadedBrep is not shown in print mode with vector enabled. I tried a workaround with DrawShadedMesh and it looked very odd, because it was not shaded, but was only a filled outline shape without shade or gradient.

So at the moment i can only export to PDF in raster mode, but this also effects annotations. When i switch to vector mode, the views with this conduit disappears.

Any idea why this happens?

BR

Hi @dsw - nice to hear from you.

When printing to vector, Rhino decides per detail whether it needs a raster pass for shaded content, and it decides based only on the document objects visible in that detail. Geometry drawn by a conduit isn’t part of that check. Because all your shaded objects are hidden in the detail, Rhino thinks the detail is wireframe-only and skips the raster pass. That’s why your DrawShadedBrep output disappears, and why DrawShadedMesh only gives you a flat fill.

A workaround is to not hide the objects. Instead, replace how they draw in your conduit:

  • Enable CSupportChannels::SC_DRAWOBJECT.
  • In ExecConduit, when dp.GetRhinoVP() is the detail you care about and m_pChannelAttrs->m_pObject is one of your objects, call DrawShadedBrep with your false-color material, then set m_pChannelAttrs->m_bDrawObject = false.

The objects stay in the detail’s draw list, so Rhino still treats the detail as shaded and prints it with the raster pass. Your replacement drawing goes into that pass.

Does this help?

-- Dale

Thanks, that fixed the problem.