How to join an array curves to one curve?

Hi,

I have an object with multiple meshes, after I project a curve into this object, many curves are created.
I tried to join the array curves into one curve but unsuccessful.
Here is my code:

double epsilon = 0.001; Curve[] rs = Curve.ProjectToBrep(myCurve, myListTargetBrep, myWorkingPlane.Normal, epsilon); Curve[] prjCrv = Curve.JoinCurves(rs, epsilon, true);

Can you help me?

try only with this:

Curve.JoinCurves(rs, epsilon)
maybe the direction gives a problem.

Also. Is the mesh that you project on closed on the top?
Can you share the file?

Free_Form_Surface_Lens_detail_mode.3dm (492.3 KB)

I’ve tried your way, It seems good. I will improve this way.
And here is my 3dm file.

Thank you!