How to tell Grasshopper, if there is intersections

I have two questions,

  1. I want to tell grasshopper if there is an intersection between line 1 and line 2, do this.
  2. But, for sure there is one intersection in the middle of line 2 because I made line 2 from line 1( dividing line 1 into several parts, then made line 2 perpendicular to line 1). However, I want to know if there is an intersection other than the middle ones.
    how can I do it?
    You can See the intersections that I want in Blue Crosses.
    22 Test_inter (19.1 KB)

and also there some intersections on the down lines. there are two rows intersections

Internalize the geometry

Test_inter (21.1 KB)
maybe this version is better

there is one definition on the right side of the file which I deactivated the. They do not seem to be a solution, but take a look at it, it may help you


Test_inter (22.7 KB)

no, Actually I do not want the middle ones, I want these ones.

Dude I really strugle to understand. What do you mean first of all by line 1 and line 2?
And what do you mean by “the middle ones”?

ok de
I want these ones.

and by middle ones I mean these intersections. middle one that red lines these intersections

I found this from the deactivated commands in the right side of the GH file. but it is not correct, because I have to find all the intersecion, and cull the ones which are in the middle. In this file I tried to deceive grasshopper :joy:

Test_inter (22.2 KB)

1 Like

that’s awesome, Thank you, can you tell me what Invert do? I just want to learn.

Turns True to False and vice versa.

Thank you so much David

1 Like

No worries mate! The whole trick when you want to Cull something is to think of propper criteria how to do it.

1 Like

Just one more question, can you tell me if there is a component telling me ( if there is intersection: true, if not: false)

You can make one… (7.7 KB)

This is just an idea. You have to make it so it solves it according to whatever logic you have. This is just a simple example. When you start working with trees and branches then it becomes a bit more complicated.

After you finish with the logic, just create a cluster, put a name to it and whatever logo you want and create an user object so you can always use it.

1 Like

perfect thanks

1 Like

sorry for bothering you again, I am stuck in this issue.
You showed me how to find intersections. Now I have another problem. Before the problem with intersection, I asked grasshopper for checking if the end of the lines in X zone, if it is inside X zone, offset the Intervals and make a surface as you can see in the picture.

You can find the definition inside the GH file.

Now I want to tell grasshoppe that before considering the end of the line if it is inside X zone or not, check if there is intersection between Line A( Blue) and lines B(orange) , if yes, offset the intervals and make surface how we made surface in X zones( by intervals).

temp (41.4 KB)