Bounding Box C# behaviour

I try to get the bounding box for several curves together.
Individually, it works tightly for each curve. For a list input, I get the bounding box which also contains the origin (0,0,0), although the union function is set to “true”. I’d prefer to have the real minimum xy oriented bounding box. Do I miss something?

Hello
very hard to tell without a file. No need of all the script but geometries and some C# could be useful !

Voilà!
BB-FORUM.gh (7.6 KB)
Merci

Just put that
var bbox = BoundingBox.Empty;
or !
var bbox = BoundingBox.Unset;
instead of
var bbox = new BoundingBox();

There is no empty constructor for BoundigBox(), strange it worked !

image

When you use the constructor without parameter it creates a box which is singular centered on the origin with no volume
image

1 Like

Thank you very much Laurent. it takes patience to understand all the mysteries of c#!

That’s a RC thing (related strictly with the available Methods for that Class) and thus has nothing to do with C#.