DisplayPipeline/Conduit Objects

Hi All,

I don’t know if there is already a script for that need,
in practice with Py/RCommon I create points/curves objects etc
how could I before creating them, see them in preview and then create them

Thanks. . .

 public class CsDrawBrepConduit : Rhino.Display.DisplayConduit
            public Rhino.Geometry.Brep Brep { get; set; }

            protected override void CalculateBoundingBox(Rhino.Display.CalculateBoundingBoxEventArgs e)
                if (null != Brep)

            protected override void PostDrawObjects(Rhino.Display.DrawEventArgs e)
                if (null != Brep)
                    Rhino.Display.DisplayMaterial material = new Rhino.Display.DisplayMaterial();
                    material.IsTwoSided = true;
                    material.Diffuse = System.Drawing.Color.DeepPink;
                    material.BackDiffuse = System.Drawing.Color.HotPink;
                    e.Display.DrawBrepShaded(Brep, material);
                    e.Display.DrawBrepWires(Brep, System.Drawing.Color.Black);

To display it →

CsDrawBrepConduit conduit = new CsDrawBrepConduit();
conduit.Brep = breptodisplay;
conduit.Enabled = true;

@farouk.serragedine thanks for reply

I’m new to using RhinoCommon, I’m using it in Python, I try it, but I don’t think I can convert it from C#

Depending on what you need to draw, the CustomDisplay class is quite simple to implement in Python. I wrote a couple of helper functions here that might help:

@AndersDeleuran @farouk.serragedine

I think I have a lot to learn, either way I can’t get them to work. :triumph:

Add your code to the post so that I can show you how to integrate a preview in your use case using cc