Finding / filtering lines that intersect with elements

Hello everyone,

I have bunch of Planting elements and lines.
I want to intersect the planting and lines together and boolean the ones that are intersecting and ones that are not.

I was planning on using geometery,doesintersect node in order to do that but failed.
any suggestion? thank you very much in advance!

I believe you will need to convert the mesh into a lower level object. Try using an Element.Location node and building a circle with a radius that is driven by each plant’s size (hopefully you have a parameter there, if not Element.BoundingBox, convert your cuboid, cuboid.width and divide by two). Once that is done the DoesIntersect should work.

You may want to build a surface from each planting circle, then a polysurface from all the surfaces, and split each curve by the polysurface, then get the first item in each sublist to reduce complexity of the calculations.

Thank you very much for your response. its perfect.
However, I think I’m doing something wrong with data organization.

I thought geometry.doesintersect would give me all the lines that are intersecting with circle surfaces beneath each plantings.

Not only the result seems odd (there cant be only 14 lines) and not sure how to highlight / select the lines that are intersecting - I want to visually see the results although it seem odd.

thank you in advance.

Lacing will matter there. Alternatively you could join the surfaces into a polysurface.

ah thank you very much for the tip
I changed lacing to cross product and it definitely gave me a better result.
I’m still trying to visually view those lines that are getting intersected but which node do i need to use in order to translate list / boolean into lines again?

thank you for your help once again

  1. Don’t flatten your list of booleans. Instead ask if any values in the level 2 sub-list are true. List.AllFalse will help there, or you can try a List.Contains.

  2. List.FilterByBoolMask with the list as the list of lines, and the list of booleans as the mask.

thank you for your response! it definitely took me to the next step.
however it seems like list.filterbyboolmask isn’t doing its job - that it is still selecting the entire set of lines.

@L2, no need for the second List.Filter node.

Thank you Jacob,

I tried to find a different way of solving this (image 01) which shows the lines that are under the tree - meanwhile I wanted lines to start from the wall to the end of the vector (as shown as red lines).

I also tried scripting based on your most recent advice but the result is still highlighting the entire set of lines.

I have a feeling that this is not too difficult but I don’t know what I’m doing wrong exactly in terms of data structuring.

thank you in advance

Turn off all geometry previews for the lines.

Add an Object.Identity node after the FilterByBoolMask node.

Connect the ‘in’ output from the filter by book mask to the Object.Identity node.