Display.Conduit bounding box/clipping problem

Hi guys.

I am coding a custom display.conduit and i have a problem. When i draw some geometry, line from conduit appears only when object is extremelly close (almos intersecting) with it. If its further, line from conduit disappear. Anyone knows why?

(“front” viewport)

Also, second question. When i draw/change any geometry, i have to click again on viewports to redraw conduit line. Can it somehow be done automatically?

Hi @aleksanderdynarek,
for the first issue, you need to override the DisplayConduit.CalculateBoundingBox() function. For example if you are trying to draw a Curve,

Curve curve;
protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)

And for second issue, you could redraw all viewports, RhinoDoc.ActiveDoc.Views.Redraw()

ok, but how i can get bounding box of a particular curve if its generated in another method (another scopre)? should i make it global?

regardin second issue, it works, but after starting rhino, before i click anything, i get something like this

This documentation has an example you could refer

clipping is fine now, great thanks!

now i have only problem with the second issue (please see the screen )

did it happen because of RhinoDoc.ActiveDoc.Views.Redraw()?

yes. before using this method there was no such problem