Rhino conduit mac alternative?

Hi all,

I am working on a Grasshopper toolpath visualizer that relies on DisplayConduit on Windows. It keeps a list of extrusion meshes and draws them during the preview:


namespace Toolpaths.Fdm.Visualizers
{
    public class AdditiveDisplayConduit : DisplayConduit
    {
        public List<Mesh> ChunksToDraw { get; set; } = new List<Mesh>();
        public List<Mesh> ActiveMeshesToDraw { get; set; } = new List<Mesh>();
        public Mesh ToolMesh { get; set; }
        public Point3d ToolPosition { get; set; }

        private readonly DisplayMaterial _material;

        public AdditiveDisplayConduit()
        {
            _material = new DisplayMaterial(Color.CornflowerBlue);
        }

        public void DrawMeshes(IGH_PreviewArgs args)
        {
            foreach (var mesh in ChunksToDraw)
            {
                if (mesh != null && mesh.IsValid)
                    args.Display.DrawMeshShaded(mesh, _material);
            }

            foreach (var mesh in ActiveMeshesToDraw)
            {
                if (mesh != null && mesh.IsValid)
                    args.Display.DrawMeshShaded(mesh, _material);
            }

            if (ToolMesh != null && ToolMesh.IsValid)
            {
                args.Display.DrawMeshShaded(ToolMesh, _material);
            }
        }

        public void DrawWires(IGH_PreviewArgs args) { }
    }
}

This works great on Windows Rhino 8, but I’m now trying to use something similar for Mac. From what I can tell DisplayConduit doesn’t exists there, at least that’s what the docs say.

Is there a recommended cross-platform replacement for conduit-style previews on Mac? Should I tap into the viewport draw events differently, or move the logic into the Grasshopper preview pipeline somehow? Any examples or docs that show how to render large meshes on rhino for mac would be appreciated.

Thanks!

Displayconduit absolutey exisits on Mac. Was some of our documentation misleading on this and if so can you point me to it?

Thats good to know! I don’t have a mac near me so I could not test it but assumed it’s not supported as it is pointed out here:
Rhino - Display Conduits

Here’s a script I just tested (positively) on a Mac:

Conduit test_get from layer_discourse.cs (3.9 KB)

It gets all the Meshes on a layer called “Meshes“, and uses the Display Conduit to highlight their edges. It runs from Rhino’s ScriptEditor directly.

Super, Thank you for testing! Much appreciated :grinning_face:

Actually, I decided to test following your post…. :sweat_smile:

Thanks for pointing out the “Windows only” flag @Konrad. We’ve updated that web page and removed the “Windows only” bit