Draw a curve on a polysurface

I need write a function draw a curve on a polysurface,and the curve maybe has a part on one brepface of the polysurface,and has anther part on anther brepface.

then I need Using this curve to trim the polysurface ,and get a new brep.

how can I do these?

please give me some ideas
thanks

Hi,

A shot in the dark but maybe (just maybe) this could be of help:
http://wiki.mcneel.com/labs/curveonsurfacev5

-Willem

thanks ,but these has"t the source code.
I have wrtie a command just like you provide to me,but my command just can draw curves on single face.

Have you seen this tool:

http://wiki.mcneel.com/labs/curveonsurfacev5

I’m not sure it allows you to draw on a polysurface though.

dale:
thanks I have seen this tool ,this is the same tool just as Willem provided
and this tool has"t the source code.
I have wrtie a command just like you provide to me,but my command just can draw curves on a single face.

The Rhino SDK does not have a function that will allow you to draw a curve on a polysurface. If you need to draw a curve on a polysurface, then you are going to have to come up with your own function.

One way of doing this is to pick points on surface and then create an interpolated curve on the surface. There is an SDK function to help with this. The challenge will be in what to do when you cross a surface boundary.

dale:
why sdk does’t provide these function,it’s very usefull I think

I find this tool have a problem: the edit point if closed to the edge of the face ,then the curve not correct
http://wiki.mcneel.com/labs/curveonsurfacev58

The Curve on Surface Labs plug-in was an experimental project that @GregArden initiated. To my knowledge, the project was never completed, which is why you don’t see this feature in V5.

Maybe ShortPath will help, if there are only two points to connect. I think that is in Rhino Common.

-Pascal

RhinoShortPath is the SDK function. It too is declared in rhinoSdkUtilities.h…

but my points are not only two points .
Curve on Surface is really very usefull ,and I see other 3d tools (for example shoemaker) has this function, this function is the basic demand in my plugin. so it’s important for me.