Point in brep question

Hello!

I have a question about Point in Brep.

I have a bunch of closed breps (boxes) floating in space:

There are two points near these boxes, out of which one is inside the box, yet the component (PointInBrep) seems to ignore that?

On the other hand, the Collision One|Many component appears to treat this correctly, but I can’t always rely on it as it requires longer computation:

Can you show me what’s wrong with the point-in-brep method? Is it a tolerance issue, the fact that these boxes are floating “far” from the origin, or inadequate data management on my part? I thank you in advance for looking into it!

Here’s the sample file:
PtInBrepQ.gh (783.8 KB)

You need to first origanize the issue of matching Brep and Points data, ensuring that each Brep is calculated using the two points closest to it. This can be achieved using Closest Points , and fyi.

Closest Points Grasshopper Online Document :backhand_index_pointing_left:


ClosestPoints.gh (775.4 KB)

@jessesn,

Spot on. Thank you for this. :oncoming_fist:

Needless to say is that the required point is actually the one outside, not inside the brep (irrelevant fact for the purpose of the needed solution: get the correct boolean pattern).

Said points (midpoints) correspond to line pairs, out of which I must keep the one outside.

I’ve successfully integrated your instruction back into the main (larger script):

Best,
RC