Surface trimming using a curve


I’m having the following problem:

First I create an opennurbs surface with the following settings:

// dimension, rational, orderC, orderV, countC, countV
ON_NurbsSurface nurbs(3, false, 3, 3, 2, 2);

After this I add four control vertices to create a square, and then I clamp it.

Then, I create a curve:

// dimension, rational, order, cv_count
ON_NurbsCurve curve(2, false, 3, 9);

I add necessary CVs and weights to form a circle and then I clamp it too.

The problem that I’m having is:
When I use the settings above, and try to trim the surface with the curve, (using pcl library function: nurbs::Triangulation::convertTrimmedSurface2PolygonMesh()) I get this result:

But when I decrease the order of the nurbs surface (orderC & orderV) to 2, I get correct results:

I know I’m using a function outside opennurbs, but does anyone have an idea why I’m getting this result?

Kind regards,


Nobody here (McNeel) is familiar with that library - sorry.

Thank you.