Finding intersection points

Hi,

What would be the best approach to find the intersection points of several lines and to then find the centre of them?

Instead of doing reverse engineering use points from dividing some surface and then make the connections required (Relative items on the divPts Tree is the way to go - or if you are lazy try LunchBox ).

BTW: GH is 99.99999% DataTrees. Despite that the vast majority of users have - more or less - permanent issues with these mysterious/ominous things. Open attached (left unfinished as a challenge) and have a turbulent time (be brave).

Points_VS_RelItems_VS_Masks_V1.gh (24.5 KB)

1 Like

See # 3. Attach minimal versions of all the relevant files

Hi thanks for the reply. The string is great. I was wondering if you would be able to explain the methored some more. You used “(”&y&")… in to the evaluate. Can an mathematical expression not be used instead?

All these actually are dealing with tree branches and indices. If we did that with code (my style) we could create Methods that could combine anything imaginable.

The syntax on RelItems and Masks is David’s (hope that you know who’s David) stuff. There’s a classic thread (or more) in the old GH Forum where David exposes/explains the rules … if I’ll find it I’ll provide the link here.

In the mean time:


1 Like

And these … well … are very old things (prehistoric I guess) made to train my people on data tree matters (before switching 100% to coding).

POINTS_VS_GRIDS_V2.gh (157.8 KB)
Points_and_then_some_V1.gh (107.6 KB)

May the Force (the dark option) be with you

1 Like

Another very old thingy that I guess suits your surface adventures: mask games and the likes (notice the combined input in the last filter option).

Masks_VS_Surface_V1.gh (17.4 KB)

1 Like

And here comes the pain (are you brave enough? that’s the big question, he he):

Added a small piece of C# that does something. Obviously the purpose of that is not to teach you coding > the task for you is to see what it does and do it using native GH components.

Masks_VS_Surface_V1A.gh (22.3 KB)

1 Like