1 //-- File IntWalk_IWalking_6.gxx
4 #define No_Standard_RangeError
5 #define No_Standard_OutOfRange
9 void IntWalk_IWalking::AddPointInCurrentLine
10 (const Standard_Integer N,
11 const ThePointOfPath& PathPnt,
12 const Handle(IntWalk_TheIWLine)& CurrentLine) const {
16 Psol.SetValue(ThePointOfPathTool::Value3d(PathPnt),
17 reversed,ustart1(N),vstart1(N));
18 CurrentLine->AddPoint(Psol);
22 void IntWalk_IWalking::MakeWalkingPoint
23 (const Standard_Integer Case,
24 const Standard_Real U,
25 const Standard_Real V,
27 IntSurf_PntOn2S& Psol )
31 // Case == 1 : make a WalkinkPoint.
32 // Case == 2 : make a WalkinkPoint.
33 // The computation of the tangency on is done
34 // Case == 10 + i : make a WalkinkPoint according to i.
35 // but F is updated according to U and V
36 // Case == other : the exception Standard_Failure is raised.
39 Psol.SetValue(sp.Point(),reversed, U, V);
41 Psol.SetValue(sp.Point(),reversed, U, V);
43 else if (Case == 11 || Case == 12 ) {
44 static math_Vector UV(1, 2);
45 static math_Vector FF(1, 1);
46 static math_Matrix DD(1, 1, 1, 2);
49 sp.Values(UV, FF, DD);
50 MakeWalkingPoint(Case - 10, U, V, sp, Psol);
53 Standard_ConstructionError::Raise();
61 void IntWalk_IWalking::OpenLine(const Standard_Integer N,
62 const IntSurf_PntOn2S& Psol,
63 const ThePOPIterator& Pnts1,
65 const Handle(IntWalk_TheIWLine)& Line )
66 // **************** ouverture de la ligne et repartir dans l autre sens********
69 ThePointOfPath PathPnt;
71 static math_Vector UV(1, 2);
72 static math_Vector FF(1, 1);
73 static math_Matrix DD(1, 1, 1, 2);
75 previousPoint = Line->Value(1);
77 previousPoint.ParametersOnS2(UV(1),UV(2));
80 previousPoint.ParametersOnS1(UV(1),UV(2));
82 sp.Values(UV, FF, DD);
83 previousd3d = sp.Direction3d();
84 previousd2d = sp.Direction2d();
86 if (N>0) { //point de depart donne en entree
87 PathPnt = Pnts1.Value(N);
88 //marque la ligne comme ouverte avec point d arret donne
89 Line->AddStatusFirst(Standard_False,Standard_True,N,PathPnt);
92 AddPointInCurrentLine(N,PathPnt,Line);
96 if (N <0) Line->AddPoint(Psol);
97 Line->AddStatusFirst(Standard_False,Standard_False);
98 //marque la ligne comme ouverte sans point d arret donne
100 Line->Reverse(); //inverser la ligne
101 Line->SetTangentVector(previousd3d.Reversed(),Line->NbPoints());