Get normal distance between a list of curve and an other one

Hi All, I am super new in Dynamo and I am trying to get the distance between exterior walls and other buildings geometry.
I found out how import both lists of geometry, that turns to be two lists of curves by coordinates and length. Now I would like to have the distance between all curves from first list (my walls - 395 items) to the other buildings front lines (7 items). When I use the node “Distance to” in geometry I got a cross product lacing list of 395 sub list containing 7 distance value, which seems to be correct. How can I isolate the item of the sub list which contain the lowest distance value and create a list of them?

Hi @vavi27068 ,

There are various ways to do this, see my 2 examples below (don’t forget the list levels):

PS: The lower method executes a little bit faster with (very) big lists.

Thank you Daan, I will try it as first thing when I start to work on it later today and let you know.

I tried the script and it works, thanks. But I think I am taking the problem in the wrong way, since all my walls are on different levels and the minimum item just return with distance at the ground floor, where my other buildings foot print are placed.
I was trying to translate the walls geometry by vector and distance but there isn´t a way to put automatic distance or a list of distance in that node… so I am at the same point.
What I would like to do is to read the minimum distance from all my walls, maintain the id item or index and apply a if function which read the distance and change a fire rating parameter according with a certain range of values as 30,60,90,180.
It could be I just ignore some functionality but it seems not work, and I am only at the first step. =(

Hi @vavi27068 ,

Maybe you could create some surfaces, from your building footprints, which go vertical for like 1km up and down, then your measurements will be accurate, even if you have some walls on a higher/ lower level.

For the above mentioned quote you could probably do something like this:

Hi @Daan,
I have tried with surfaces and it works thank you. All distances seems to be right. Now I have this list with both exterior and interior walls and I like to have two different list for each category, I know I could select the two categories separately, but it is how it is now and I am wondering if I can obtain two different list from a single list and still be able to maintain the item from the original ones, since that says which element is referred to…

It is kinda hard to help you there without seeing how your data is structured.
This also doesn’t really apply to this topic, could you create a new one containig some screenshots and maybe even some (sample) files?

Yeah, sure . I just create a new topic

Hello, here I am again.
I am struggling to find a solution that allow me to say to which element is a distance referred to and so take that element and change the parameter fire rating. I know there will be a easy solution but I can´t find by my self. Can someone help me please?