How to select faces/edges/vertices on one side of an object?
i think first of all you should use the decimate modifier, depending on how many details the mesh has to provide.
i guess the tubes shall have the same spacing, right?
i don't know if my approach is overly complicated, but you could try (referring to the last image) to get a center point from wich you can measure the distances. i don't really know how you would do that, but maybe someone can help you with that. form that point/vertical line you could define a segment of the mesh going left and right from the desired degree of the tubes location. now you let your script select all vertices within this segment and measure the distance from the line (0,0,Z from the selected vertex) for each of them. then you get the location of the tube as you add the farthest vertex distance from the center and your set distance from it.
i hope this helps as an approach to a workflow.