INVALID BOX Output in c#

while i’m creating some bounding boxes in C# component everything is going okie but one of outputs tell me that it’s invalid box , but i didn’t change anything in my method of creating bounding boxes , this is the only one of many boxes . it appear in rhino but output tell me it’s invalid box while other bounding boxes have a box as an output

Hi @Mu_taz_Mutawea,

One of your boxes is reporting as invalid because BoundingBox.IsValid is returning false for that object.

BoundingBox.IsValid verifies that the components for each point is a valid double using RhinoMath.IsValidDouble. A valid double is:

  1. Not an unset value ( or equal to -1.23432101234321e+308)
  2. Not infinite (double.IsInfinity)
  3. Is a number (double.IsNan)

After your bounding box creation code, you might call BoundingBox.IsValid so you can detect at what point your calculation is faiiling

Hope this helps.

– Dale

If box is invalid but displayd, then you have inverted points.

1 Like

yes it is … this is so silly now i get it . bounding box need to start from the first point and moving towards second point only in positive directions in world axis .