Distance between piles

Hello

The following code collects all piles in the project and examines the mutual distance between these piles. I would like to see, for all piles in this list, whether they are prefabricated or cast in situ. How can you see, in the list under Geometry.DistanceTo, which value in the list is a prefabricated pile and which is a screw pile?

I have no clue how to approach this.
Thanks

Your question isn’t entirely clear, but I believe that 3 nodes can get you there, but you won’t need the List.FilterByBoolMask.

List.Create, List.Transpose, and List.GroupByKey.

I want to check the minimum distance between the piles, which depends on the diameter of the piles. This minimum distance depends on the type of pile and therefore differs between precast and cast-in-place piles.

Geometry.DistanceTo node tells me the distances between all piles, but I can no longer see whether a pile in the list is prefab or not. It’s just a list with distances

Something like this, but sadly this doesnt work

It sounds like you want to maintain two lists of the same structure/element count - the crosslaced distance check, and a list containing the Types. While you can smash the lists together, the value of doing so depends on the downstream workflow.

Given that your distance crosslace is just [Set A] X [Set A], you could just build the second list like this:

but replace the simple numbered list with the filter output, wired to an ElementType/Name node.

@kboschJGDNZ

Don’t zoom out so you see your whole graph when export you workspace as image.
Only a part of your graph has to be visible when export your workspace as image.
Nodes that are not visible also get exported.
This way the titles of the node stay readable :sweat_smile:.

I think the logic should be like this:

For each pile:

>>calculate the distance between the centre of that pile to the centre of all other piles, subtracting the radii of both piles

>>sort this list by distance, and select the minimum value. Associate this distance with an ID of pile 1

Repeat for all other piles

I’d work with the solids.

  1. Start by getting all the elements.
  2. Element.Solids > Solid.ByUnion to generate a single solid for each pile.
  3. List.RemoveItemAtIndex(solidsList, 0..List.Count(solidsList)-1)@L1<1>) to get a list of lists of solids where the solid at any given index is no longer present in the sublist.
  4. Solid.ByUnion to get a list of solids form the list of lists of solids.
  5. Geometry.DistanceTo to get the distance from each original solid to all the other solids now combined into one solid at each index.
  6. Element.GetParameterValueByName to get the minimum clearance from each pile to the others based on it’s unique configuration. Might need to fetch the type parameter and mulitiply by the dimameter or something, but this is pretty simple data fetching and manipulation.
  7. < node to check if the minimum distance is less than the geometry distance.
  8. List.FilterByBoolMask to filter out any elements which don’t have the required clearance; setting a graphics override or something as a thing that needs adjustment.

not sure if I agree @jacob.small (but that’s the beauty of this forum)

I’m assuming all the piles are circular and vertical & the distance between them is measured horizontally. So it’s a fairly simple exercise of distances between circles:

for circle centres with radius r

The beauty of the forum indeed!

My thought was that there was a near zero chance of all piles being perfect cylinders, and that 3D clearances would be wanted. That I use this method weekly for clearance validation in 3D might make me a bit predisposed though.

Personally my ideal solution would be to skip Dynamo here and include the clearance as geometry in the family, using a boolean value to control it’s display. This would allow the use of standard interference check tools and provide support for users in the UI.