GeomAPI_PointsToBSplineSurface trouble

Hi, All!

I use GeomAPI_PointsToBSplineSurface to convert set of points to bspline surface, but I have some troubles.
Eg:
There is such set (6 * 5) -
0.000000, 0.000000, -50.000000
50.000000, 0.000000, -50.000000
50.000000, 0.000000, 0.000000
50.000000, 0.000000, 50.000000
0.000000, 0.000000, 50.000000
0.000000, 0.000000, -50.000000
50.000000, 86.602540, -50.000000
50.000000, 86.602540, 0.000000
50.000000, 86.602540, 50.000000
0.000000, 0.000000, 50.000000
-0.000000, 0.000000, -50.000000
-25.000000, 43.301270, -50.000000
-25.000000, 43.301270, 0.000000
-25.000000, 43.301270, 50.000000
-0.000000, 0.000000, 50.000000
-0.000000, 0.000000, -50.000000
-100.000000, 0.000000, -50.000000
-100.000000, 0.000000, 0.000000
-100.000000, 0.000000, 50.000000
-0.000000, 0.000000, 50.000000
-0.000000, -0.000000, -50.000000
-25.000000, -43.301270, -50.000000
-25.000000, -43.301270, 0.000000
-25.000000, -43.301270, 50.000000
-0.000000, -0.000000, 50.000000
0.000000, -0.000000, -50.000000
50.000000, -86.602540, -50.000000
50.000000, -86.602540, 0.000000
50.000000, -86.602540, 50.000000
0.000000, -0.000000, 50.000000
and for this set GeomAPI_PointsToBSplineSurface works fine -
*1 (http://www.rsdn.ru:80/File/857/cas1.jpg,
green shapes are control points
green and red curves are isolines at u, v direction accordingly, surface not render for clarity)
Then I want to add a point to this surface
(I use following algorithm)-
1. make segment from this point to "center"
2. find intersection of this segment and surface (u, v parameter).
3. find intersection points of isoline at this u,v and isolines at control points.
4. add this intersection points as row and column to the new set of points for GeomAPI_PointsToBSplineSurface.
New set (7 * 6):
0.000000, 0.000000, -50.000000
50.000000, 0.000000, -50.000000
51.270200, 0.000000, -22.200486
50.000000, 0.000000, 0.000000
50.000000, 0.000000, 50.000000
0.000000, 0.000000, 50.000000
0.000000, 0.000000, -50.000000
50.132181, 28.481704, -50.000000
123.950399, 70.420207, -53.530192
50.132181, 28.481704, 0.000000
50.132181, 28.481704, 50.000000
0.000000, 0.000000, 50.000000
0.000000, 0.000000, -50.000000
50.000000, 86.602540, -50.000000
51.270200, 88.802591, -22.200486
50.000000, 86.602540, 0.000000
50.000000, 86.602540, 50.000000
0.000000, 0.000000, 50.000000
-0.000000, 0.000000, -50.000000
-25.000000, 43.301270, -50.000000
-25.635100, 44.401296, -22.200486
-25.000000, 43.301270, 0.000000
-25.000000, 43.301270, 50.000000
-0.000000, 0.000000, 50.000000
-0.000000, 0.000000, -50.000000
-100.000000, 0.000000, -50.000000
-102.540400, 0.000000, -22.200486
-100.000000, 0.000000, 0.000000
-100.000000, 0.000000, 50.000000
-0.000000, 0.000000, 50.000000
-0.000000, -0.000000, -50.000000
-25.000000, -43.301270, -50.000000
-25.635100, -44.401296, -22.200486
-25.000000, -43.301270, 0.000000
-25.000000, -43.301270, 50.000000
-0.000000, -0.000000, 50.000000
0.000000, -0.000000, -50.000000
50.000000, -86.602540, -50.000000
51.270200, -88.802591, -22.200486
50.000000, -86.602540, 0.000000
50.000000, -86.602540, 50.000000
0.000000, -0.000000, 50.000000
If interpolate this set of points as rows and cols by GeomAPI_Interpolate, I have this
*2 http://www.rsdn.ru:80/File/857/cas2.jpg
(white shape is the new point which I want add, orange - intersection point of segment and surface, blue shapes is computed points of isoline intersections). It looks fine.
But if I use GeomAPI_PointsToBSplineSurface for this set, I have following -
*3 http://www.rsdn.ru:80/File/857/cas3.jpg
(colors as *1 - *2, red arrows show strangenesses)
Anybody can explain me why some isolines have so large deviation? And how I can solve this problem?
I use
GeomAPI_PointsToBSplineSurface(points, 3, 8, GeomAbs_C2, 0.);
Different combinations of min(max) degree, continuity and tolerance not support... :(
P.S. Maybe somebody knows other algorith for adding points to bspline surface?

LI's picture

HI, I have just finished a work. Make a Bspline surface with your first group of points.

Use the optimization method to make another surface that passes by all groups of points.

Try to find the article:

Curve and Surface Interpolation and Approximation:
Knowledge Unit and Software Tool
John Fisher, John Lowther and ChingKuang

PG's picture

The link to images/snapshots not coming up.

LI's picture

You can try to use google.com to find it.