Centroids not matching

Hi all,

I’ve drawn some breps that are stacked on top of each other and want to cull the overlapping surfaces that make up the shared “ceiling/floor”. It’s all part of a much larger definition, so this is just a simplified example. I’ve managed to single out these surfaces (four in the attached example) and now I want to use their centroids as a culling pattern.

For some reason, this has proved impossible using equality, equality with tolerance, similarity, etc, etc. I get values that match perfectly on screen, but no matter how I tinker with tolerances, GH won’t treat them as identical.

To illustrate the issue, in the attached file I drew small spheres around the four centroids that I want to use for the culling, and larger spheres around the list of centroids for all surfaces that I want to cull from. Shouldn’t ShapeIn now recognise the four smaller spheres inside the larger spheres (instead of recognising just one of them)?

I’m clearly missing something here - what am I doing wrong?

Thanks

191112_gh-question.gh (47.5 KB)

Hi,

you can try this…

191112_gh-question_RE.gh (52.1 KB)

Thanks Jakinta!

That workaround does the trick.

Did you understand why what I was trying to do didn’t work?

How would you extend the logic above to overlapping (vertical) “walls” inside the structure? I guess changing the angle input to x/y and projecting to other planes than XY. Hm, need to play around with it a bit more…

Cheers.