RhinoCommmon Intersect.Intersection function question

All of the Rhino.Geometry.Intersect.Intersection… methods (such as BrepBrep, BrepSurface, etc) seem to return True even if there is no intersection found… Wouldn’t it be more useful if it returned False if there were no intersections? Right now it looks like I have to check both the list of possible curves and possible points to see if they are empty in order to determine if there was an intersection or not… Or am I missing something dumb here…

–Mitch

I am not sure I understand correctly what the docs say.

But I think that a False result might mean 'I was not able to calculate’
and a True result then might mean 'I believe I was able to calculate’
And in the second case we can get intersections or not.

I like the current behavior, since I can understand if Rhino was able to calculate or not.
If the calculations fail, any other data received is meaningless, but if the calculations are OK
and Rhino tells me that there are no intersection, that is a valid information.

2 Likes

Griezi Helvetosaur!

from my knowledge, a valid or successful intersection command can have three types of results: intersection. intersection on point or noIntersection, which are represented by different arrays or empty array. The bool parameter is to check the success of the command, not the success of the intersection. if you checked only by a bool, you would be obliged to check the type of the output, as e.g. BrepBrepX can have Point3d or Curve as out. A simple bool is therefor not enough to express all the data that comes out.

cheers from helvetia, too