Testing for unbroken lines

Using the Brep Curve node i’ve tried to determine which of my set of lines are intersecting something and then culling them to produce only the lines that are continuous from the single point to the points on the face.
I feel the problem is with the way i’ve structured the data but i am also skeptical of whether the node is correct for the situation im in and whether the input geometries should be somehow union-ed.

I made a post similar to this about a month ago but since then i’ve revamped the geometry and it now doesn’t work. I’ve fiddled around by flattening inputs/outputs but i’m now lost.
File below.


Sightlines.gh (13.7 KB)

Good morning @Brennan_van_den_Boga
This should do the trick. (Famous last words.)
I think that it just had to do with your tree structure… I changed a few things.
Let me know what you think.
Sightlines RG.gh (15.6 KB)



Any talk of “Sightlines” without mentioning IVRay (IsoVist Ray) is incomplete .

1 Like

Thanks Ryan, this is fascinating and the tree structure is definitely on the right track but i think i explained poorly my example. With my geometry i was trying to cull any line that didn’t have any intersections between its start point and the final single point thus leaving only lines that could represent sightlines from the points

This is an amazing tool Joseph, thanks for sharing. Is there a way i could then cull the lines that have come from points on the back-side of the geometry?
The idea was to find the clear (lines that have no intersection between their parent points) sightlines and thus could represent the ability to see something unobstructed on a geometry.

Sightlines[fixed].gh (14.5 KB)

@Brennan_van_den_Boga

I guess I am a little confused… I thought that that was what I gave.

Orange is obstructed and the red is unobnstructed. Both come out of the “Dispatch” Component.

Come to think of it though… You could at a “clean tree” component to get rid of the empty branches.

It turns out that all i needed to fix the problem was unflatten the line node and revamp my geometry into 1 unioned brep, it was not liking the 12 different surfaces that it had to deal with.


This is all the lines.

and this is the result i wanted.
but tanks a lot for the help it was very useful and may refer to it later.

Ok… Yeah it was really just your tree structure. Yours will not support more than 1 object. Mine will support many.
Glad you got it to work!
-Ryan Grossmann

but it’s not what you explained here

cull a line is not the same as trim a line.

well, glad you figured it out.

btw, if this is for an architectural analysis, i’m curious to know what you’re trying to accomplish

Hey Adel, there is a cull occurring, those lines have origin points on the front face of the geometry whereas the photo that had all the of lines was a mixture of lines that had origins on the back side of the geometry and when connected to the singular point it would pass through the geometry. Thus the cull, i tested all the lines for how many surfaces they passed through and culled the lines that had more than 1. hopefully i’ve explained that right, still quite new to the technical grasshopper jargon. :slight_smile:

To answer the architectural purpose of this: i intend to use this as a primitive view quality indicator from windows, at the moment theres just 1 outer point but ill add a couple more to represent stimulating views around the site and then from there i run an evolutionary solver to rotate the whole building based off what rotation creates the most sightlines (each face doesnt have the same amount of viewports)
I can also see this being useful for sun studies but realistically ill just use Ladybug plugin for that.