Detect that one closed curve is inside another closed curve

Hello Friends
How to detect that one closed curve is inside another closed curve.
2020-12-30_0-01-51
form 55.gh (28.4 KB)


form55_2020Dec29a.gh (27.4 KB)

I’m curious about how you solved this but don’t read icons and won’t attempt to recreate your code from a screen image. For the rest of us, about posting the GH file?


form 55_ForJoe.gh (15.4 KB)

Thank you. That approach is flawed as you can see below. It’s possible for the centroid to be in a circle but the whole triangle is not. I changed the radius slider to REAL and nudged it slightly.

in this case check if all the three points are inside:

What’s the idea of posting images instead of code? Was the code you posted the same as @anon78208900’s image or something different? Images are almost useless, especially images of icons.

1 Like

Was the code you posted the same as @anon78208900’s image ?

In my previuos post yes.

After your “it is not working answer” I added just 1 component(with its name shown) and changed the input of another one(also visible in the image for the attentive observer)
I thought the change was obvious, sorry if it wasn’t.
Here is the code:form 55_ForJoe2.gh (15.9 KB)

OK, thank you, that’s nice. I don’t know why my name is used in your filename because this is all for @eghbalpourf who has marked an invalid solution as the best answer in this thread. Your last one is a better answer, and so was mine. :sunglasses: