You might want to have a look at BRepBuilderAPI_MakePolygon to build a wire from you connected segments (if the segment are linear) or just build a wire (BRepBuilderAPI_MakeWire) with your connected segments. Then, with the wire, you could use BRepAdaptor_CompCurve to transform your wire and make it look like a curve. Read the cdl files for details about use and limitations...
Then, a lot of algorithm work with adaptor, like Extrema_ExtPC to project a point on a curve.
Good Luck,
Commenter-1.