Match 2D profile to cable tray center line

Hi, I have been developed a script for conduit placement (based on drafting view reference) along shortest cable tray path. I took a shortest path but I don’t know how to match 2D profile to cable center line. Can any one share a concept to achieve this?