List logic/levels help

I have a list of floor curves, I want to find out if there is an intersecting, parallel wall modeled for each curve, and get a boolean value for each curve.

This is pretty complicated and I am unsure how to organize the comparison of a list of multiple items to a list of multiple items. I’ve tried changing lacing settings but have been unsuccessful, one of the lists has to be singular. Any tips? Will I have to go to Python, or is there a way to accomplish this with nodes to generate sublists?

Can you illustrate what you mean by ‘intersecting parallel wall?’

Offhand you could take the sketch curves of the floor and intersect those with the unioned solid of all walls; anything returning a single curve with start and end points matching the original sketch curve would have a matching wall.

The question becomes what if the wall is only partially on the floor curve?

Thanks! I went with your suggestion, but quickly hit that roadblock of wall only partially on the floor curve.

I think the easiest workaround that will be close enough to 100% accurate might be to get a random point along the intersect geometry (say midpoint) and see if it intersects the original curve? But now I am again left with the original issue: I have a list of multiple curves, and a list with multiple points. How do I compare them properly? I need to know if the points in this sublist interact with their corresponding elements in the original list, not any of them. I have no way of knowing how long these lists will be or how many will have multiple points of intersection.

This would be easy to do in Python I think, if I knew how to determine if a point is on a curve.

I accomplished what I wanted; I got the intersect geometry and used a boolean mask for anything small which would be a crossing wall rather than a parallel wall, then wrote some Python script to deal with the lists.

But to answer the above question you can use if Point.DistanceTo(Line) == 0 in Python to determine if a point intersects a line.

Are you trying to find which wall is on which curve, or is there a wall on the curve? The former is quite different from the later.

I was trying to figure out if there is a wall on a curve, to discard curves without support walls below. See for instance, in this screenshot (just some random test modeling) there are two edges with walls, at 2 edges without walls:

I did make a graph that does this as described above (get edges, find edges that intersect walls below (via intersection check with solid union of all walls), get intersection curves, flag edges that don’t have any intersection curves greater than 1.5 feet as false/others as true and then filter in Python), but if there is an easier way please feel free to share.

That would be how I would go about it.

Once you have the desired lines what is the end use?

Modeling a standard perimeter board (beam).

1 Like

I’ve run into this situation again and I still can’t figure out a solution without Python. I have a list of lines, and a list of surfaces. I want to find out where the lines intersect any of the surfaces. I can only get Dynamo to get intersection of one line to one surface (which may not be the correct surface). Lacing longest still just compares each line to the surface with the same index.

Seems like there should be an easy solution without Python? Or no?

I’m a actually not sure how to do this in Python as I don’t know a Python function to get that intersection.

When possible, reduce the number of actions.

N surfaces steered against M lines is N*M tests. 1 Polysurface tested against M lines is M tests. Such code will run in 1/Nth the time.

  1. Flatten the list of surfaces.
  2. Build a Polysurface from them with a PolySurface.ByJoinedSurfaces.
  3. Geometry.Intersect to get the portion of each line which overlaps any surface.
1 Like

Yeah I will just make a polysurface. I guess there is just no native Dynamo solution (other than reducing the list.)

Cross product lacing is likely what you need, but we can’t see as you haven’t provided a data set.

Build some fake surfaces using Dynamo’s geometry library, then some fake lines. Make sure the structure on both matches what you have now (ie: if the surfaces are three levels deep in your data set, they should be 3 levels deep in this data set). Post that .dyn and we can help. Short of that, try cross product lacing, or take the polysurface advice to reduce the runtime.