I'm having real trouble trying to manipulate a BSpline curve so I'm posting this to see if other members have managed to succeed and to find out what I'm doing wrong.
I'm loading point data for an airfoil into a gp_Pnt(x, y, z) array – the z set to zero.
Then, I'm changing the point data to a BSpline with :
Handle(Geom_BSplineCurve) K = GeomAPI_PointsToBSpline(pntArray, 8, 14, GeomAbs_C2, My_tol);
... I eventually end up with a very nice, smooth airfoil (as viewed in Salome_Meca), which I go on to save as an IGES.
With My_tol = 1.0e-3 I have
What I would like to have happened is that the order of the input data is reduced by converting to a BSpline, such that I can manipulate the profile of this airfoil with as few tweaks as possible....However, the point data I load at the beginning consists of 35 (x,y,x) entries anyway. (I'd like to have seen the new Bspline having fewer poles).
I can play with the weights of the BSpline (before I recreate the profile & save it) but unfortunately, no matter what I change the weights to, the differences in the final airfoil profile are tiny.
I've also experimented with using:
GeomAPI_Interpolate K2(pntArray, MyPeriodicFlag, My_tol);
and continuing as before to alter the weights, but I'm still working with 37 poles and 35 knots.
Does anyone have any suggestions for:
1.Reducing the total number of weights that need altering? (I believe than NbWeights == NbPoles)
2.A different approach that doesn't use weights but still deforms the BSpline that I've created?
Thanks very much for any of your ideas,