Placing an obstacle inside bunch of curves

hello everyone

so I have a script where it generates automatically bunch of lines (from one point to every other point - repeating this process to all other points) and then it only shows the group of the longest. The curves that you are seeing in the image are the longest one.

However, I would like to add an obstacle inside of the object and want curves to recognize that as an obstacle - i.e. i included a box inside (black curve) and want curves to avoid hitting it but still find the longest line while acknowledging that there is an obstacle. Im understand for some points, its impossible but which component should I use?

thank you very much in advance


You can use Curve|Curve intersection component for tracing the intersections.

thank you for the reply Mahan
Instead of finding where they intersect, I would love to set the middle geometry highlighted as yellow to be an “obstacle” so that when I run the analysis, it avoids hitting the obstacle and finding the longest line

Do you want to remove the lines which intersects with the Box(obstale)?

i want lines to acknowledge that there is an obstacle in the center so no intersection. so all the lines that are currently going through the box in the center would be reshaped to be in more straight lines either below or above the box without touching it - box being the obstacle.

3. Attach minimal versions of all the relevant files

image

sorry if my description was confusing and needed more info
this is what i want to acheive on top/

I get the idea but why don’t you post a GH file (as always recommended) to save each of us from having to create our own geometry to show you a solution?

oops very sorry!
still getting used to this forum. thank you for your advice.
here is my GH file below.

thank you in advance
obstacle.gh (8.9 KB)

You didn’t internalize your geometry (curves) so your model is useless.

internalize_2020May19a

Sort Connection Length_reV2.gh (11.9 KB)

thank you Mr. Kim. appreciate it!