Help Retriving Hangers Along Pipe Path

Hello All,

I am needing some assistance with retrieving hangers from the path of piping. I have develop a graph that does what I am expecting only when the pipe is either perfectly horizontal or perfectly vertical. The graph falls apart when piping that is drawn at an angle is introduced. My current method is to get the bounding box of the hangers and pipe then use bounding box intersects to attempt to identify what hangers are associated to a particular pipe. See image and attached graph. I fear this is not the proper approach. I would greatly appreciate any guidance or assistance anyone is willing to offer. For convienienace I have attached a link to an example file I am using to develop the script.


HangersAlongPipe-v5.dyn (26.8 KB)

Ideoending on how they are built, you could get the pipes location curves and test that against the location points of the hangers. Sorting the pipes in order of their flow and then grabbing the location curves and building a poly-line afterwards may also open a method to sort innsequence the hangers along along the pipe network. Look into the MEPover package for some helpfule nodes on that front.