Creat a smoth brep using curves

I need a funtion like that:
// in_cs is array of 3d curves,these curves can be merged to a closed curve.
on_brep* CreatBrepUsingCloseCurves(on_simpleArray<on_curve*> in_cs,double tol=0.00001);

I try ro use patch to write this function.but I find it has some problems:
1:the tol of brep’s edges and the input curves sometimes are too large.
2:the brep sometimes are not very smoth.

So I need a more common approach to write this function

It’s hard to suggest the best method to create a surface from an arbitrary set of curves - that is why there are so many different methods for surface creation in Rhino.

  • Are they planar? Use surface from planar curves (CreatePlanarBreps).
  • Are there only 2, 3 or 4 curves ? It might work with Edge surface (CreateEdgeSurface).
  • Are they organized in a logical UV fashion? Network surface might work (CreateNetworkSurface)

Otherwise Patch may be the only way to get a surface from an arbitrary number and disposition of curves…

–Mitch

helevetosaur:
thanks very much,they are arbitrary number and disposition of curves