For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

constrained BSpline with tangent

Anonymous's picture
Forums: 

Hello,

I try to defined a bSpline Curve with 2 points and 2 tangents using this algorythm but it didn't run :

Handle(Geom_BSplineCurve) SPL;

gp_Pnt QQ;
QQ.SetCoord(0,1,0);
gp_Vec initialTangent(0,1,0);

gp_Pnt PP;
PP.SetCoord(1,0,0);
gp_Vec finalTangent(1,0,0);

Handle(TColgp_HArray1OfPnt) myArray1 = new TColgp_HArray1OfPnt (0,1);
myArray1->SetValue(0,QQ);
myArray1->SetValue(1,PP);

GeomAPI_Interpolate algo(myArray1,Standard_False,0.1);
algo.Load(initialTangent,finalTangent);
algo.Perform();
SPL = algo.Curve();

What's wrong or what is the good way to do that ?

Thank you for youranswers,

Norbert