0022922: Clean up warnings on uninitialized / unused variables
[occt.git] / src / IntWalk / IntWalk_IWalking_6.gxx
CommitLineData
7fd59977 1//-- File IntWalk_IWalking_6.gxx
2
3#ifndef DEB
4#define No_Standard_RangeError
5#define No_Standard_OutOfRange
6#endif
7
8
9void IntWalk_IWalking::AddPointInCurrentLine
10 (const Standard_Integer N,
11 const ThePointOfPath& PathPnt,
12 const Handle(IntWalk_TheIWLine)& CurrentLine) const {
13
14
15 IntSurf_PntOn2S Psol;
16 Psol.SetValue(ThePointOfPathTool::Value3d(PathPnt),
17 reversed,ustart1(N),vstart1(N));
18 CurrentLine->AddPoint(Psol);
19}
20
21
22void IntWalk_IWalking::MakeWalkingPoint
23 (const Standard_Integer Case,
24 const Standard_Real U,
25 const Standard_Real V,
26 TheIWFunction& sp,
27 IntSurf_PntOn2S& Psol )
28
29{
30
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.
37
38 if (Case == 1)
39 Psol.SetValue(sp.Point(),reversed, U, V);
40 else if (Case == 2) {
7fd59977 41 Psol.SetValue(sp.Point(),reversed, U, V);
42 }
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);
47 UV(1) = U;
48 UV(2) = V;
49 sp.Values(UV, FF, DD);
50 MakeWalkingPoint(Case - 10, U, V, sp, Psol);
51 }
52 else {
53 Standard_ConstructionError::Raise();
54 }
55
56
57}
58
59
60
61void IntWalk_IWalking::OpenLine(const Standard_Integer N,
62 const IntSurf_PntOn2S& Psol,
63 const ThePOPIterator& Pnts1,
64 TheIWFunction& sp,
65 const Handle(IntWalk_TheIWLine)& Line )
66// **************** ouverture de la ligne et repartir dans l autre sens********
67
68{
69 ThePointOfPath PathPnt;
70
71 static math_Vector UV(1, 2);
72 static math_Vector FF(1, 1);
73 static math_Matrix DD(1, 1, 1, 2);
74
75 previousPoint = Line->Value(1);
76 if (!reversed) {
77 previousPoint.ParametersOnS2(UV(1),UV(2));
78 }
79 else {
80 previousPoint.ParametersOnS1(UV(1),UV(2));
81 }
82 sp.Values(UV, FF, DD);
83 previousd3d = sp.Direction3d();
84 previousd2d = sp.Direction2d();
85
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);
90
91
92 AddPointInCurrentLine(N,PathPnt,Line);
93
94 }
95 else {
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
99 }
100 Line->Reverse(); //inverser la ligne
101 Line->SetTangentVector(previousd3d.Reversed(),Line->NbPoints());
102}
103
104
105
106
107
108
109
110