Error when applying PreDrawObjects


#1

Hi guys,

While trying to add lines in PreDrawObjects of conduit class I have noticed that some lines are missing when you try to rotate the view.

When declaring the conduit - I am joining all the bounding boxes of the lines into one bounding box (m_bbox) which is used later in the following sub:

Protected Overrides Sub CalculateBoundingBox(e As Rhino.Display.CalculateBoundingBoxEventArgs)
      MyBase.CalculateBoundingBox(e)
      e.BoundingBox.Union(m_bbox)
End Sub

So, what can be the problem?

Thanks in advance!

Kind regards,
Dmitriy


#2

It seems that i fixed the problem by using IncludeBoundingBox method.
However would like to know what is the difference between IncludeBoundingBox and Union methods.

Thanks,
Dmitriy


(Steve Baer) #3

The problem with Union is that it is working on a value class and therefore that value is not getting set back on the eventargs


#4

Thanks, David

Now it is clear.