I need write a function to creat curve on a on_mesh with some points on the mesh.
the function will like this:
on_curve* CreatCurveOnMesh(on_simpleArray<on_3dpoint>&in_ps,on_mesh* in_mesh);
I wirte this function as follow steps:
1: add many middle point based the in_ps array on the mesh,ensure the distance of the adjoin points are closest enough.
2:creat a curve using RhinoInterpCurve ,named curve A
3:rebulid the curve Using RhinoRebuildCurve().,named curve B
my problem is:
because the mesh is not very smoth,so the curve A is also not smoth,but is closet to the mesh enough.So I using RhinoRebuildCurve to want make the curve become more somth,but if I do that,The curve B will not coset to the mesh enough.
anyone Can give me some ideas how can I Creat the curve very smoth and coset to the mesh enough
2368c.rar (367.9 KB) is the test mesh