DisplayConduit refreshes for a Brep, but not for a Line or Points

…Continuing on the development journey. I have a GH Custom Component, that collects parameters and delivers the data to a class in an referenced DLL for processing. (Singleton Pattern) Rather than the GH component to display the processing results, I hope to incorporate a DisplayConduit to view the transformations within Rhino directly.

Based on the code shown below, the Brep ReVesselShape responds to resizing just fine, but the line and two endpoints do not refresh correctly.


The associated code is as follows:

Basically, the Brep ReVesselShape, line and points are animated by changing the slide value, but the DisplayConduit is not fully cleared between firings of the SolveInstance() method. I have tried to use examples offered in the Github CS sample files, but I find no code that addresses my specific goal.

Any ideals? Thanks much.


Further inspection and debugging over the weekend suggest my description of the problem is incomplete.

The Brep, Line, and Points are scaling correctly in the Viewport, however, I discovered that with each firing of SolveInstance(), a new instance of the DisplayConduit is created. Rhino has one DisplayConduit, and I use the SuperHelper plugin in Grasshopper, so that makes 2. However, when I scroll slider, (see above), the SolveInstance() is repeatedly fired. With a bit a scrolling, I see a larger number of _enabledConduits in the debugger.

The more I use the slider the higher the number gets. This leads me to believe that the instances of the DisplayConduits are not cleared when new instances are created. Another hint seen in the gif above is that the shading on the Brep gradually darkens with each tick on the slider. This suggests that with each Viewport refresh, that stack of DisplayConduits are displayed. Please excuse my inexperience on this topic.

Thanks much for any advice.