Looking for pointers with offsets on ductwork

Hello, helping people and brainscratchers alike,
posting here a second time, got some great tips on the first problem I had so shooting my shot again.
Basically im trying to automate dynamo to insert hatches on a duct system in a way, where the hatch is not more than X meters away from a duct end or another hatch.
Maybe its impossible because the if statement would be checking itself. Or maybe because i havent found a way to convert the duct system in to a propper polycurve with one startpoint and multiple endpoints.
Best ive managed is to place hatches in an array along a duct patch with a specifiec distance between them.
So if anyone could point me in the right direction or straight up tell me its impossible i would be very happy and finally find peace.
cheers