Need some help about displayConduit

“I have a Brep A, and I want to display two of its edges in a specific display conduit. Can I make Edge 1 and Edge 2 display in front of Brep A and behind Brep B?”


This is the result displayed in the PostDrawObjects conduit.


This is the result displayed in the DrawForeground conduit.

Could anyone provide some suggestions?

    Here is some of my code:

    protected override void DrawForeground(Rhino.Display.DrawEventArgs e)
    {
        Brep myBrep;

        Curve edge1 = myBrep.Edges[0];
        Curve edge2 = myBrep.Edges[1];

        e.Display.DrawCurve(edge1, Color.Black);
        e.Display.DrawCurve(edge2, Color.Black);
    }

The problem has been resolved. Use RhinoViewport.ClientToWorld Method (Point2d), and just move the edge slightly towards the camera. I’m sorry for my stupid question. :sweat:

1 Like

No need to apologise @Zhang, there’s no such thing as a stupid question, and thanks for adding your solution for others :blush:

1 Like

Thank you , Sykes :blush: :blush: :blush: