-
-/*
- //essai avec batten
- Standard_Real h = 0.005*mref;
- Standard_Real ang1,ang2;
- ang1=dref.Angle(d1);
- if (dref.Angle(d2) > 0) ang2=PI-dref.Angle(d2);
- else ang2=-PI-dref.Angle(d2);
- Standard_Real angmax = 0.5*PI;
- if((Abs(ang1)>angmax)||(Abs(ang2)>angmax)) {
- //On fait une cubique a la mords moi le noeud
- TColgp_Array1OfPnt2d pol(1,4);
- pol(1)=p1;
- pol(4)=p2;
- Standard_Real Lambda1 = Max(Abs(d2.Dot(d1)),Abs(dref.Dot(d1)));
- Lambda1 = Max(0.5*mref*Lambda1,1.e-5);
- pol(2) = gp_Pnt2d(p1.XY()+Lambda1*d1.XY());
- Standard_Real Lambda2 = Max(Abs(d1.Dot(d2)),Abs(dref.Dot(d2)));
- Lambda2 = Max(0.5*mref*Lambda2,1.e-5);
- pol(3)=gp_Pnt2d(p2.XY()+Lambda2*d2.XY());
- return new Geom2d_BezierCurve(pol);
- }
- else{
- //On lance un Batten
-#ifdef DEB
- OSD_Chronometer ch;
- ChFi3d_InitChron(ch);// init performances pour les batten
-#endif
- FairCurve_Batten Bat(p1,p2,h);
- Bat.SetFreeSliding (Standard_True);
- Bat.SetAngle1(ang1);
- Bat.SetAngle2(ang2);
- FairCurve_AnalysisCode Iana;
- Standard_Real tol = 1.e-3;
- Standard_Integer nbit;
- Standard_Boolean ok;
-// nbit = 5;
-// ok = Bat.Compute(Iana,nbit,tol);
- nbit = 25;
- ok = Bat.Compute(Iana,nbit,tol);
-#ifdef DEB
- ChFi3d_ResultChron( ch,t_batten); // result performances pour les batten
-#endif
- if(!ok) Standard_Failure::Raise("Echec Batten");
- return Bat.Curve();
- }
-*/