1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
18 // Approximation d un ensemble de points contraints (MultiLine) avec une
19 // solution approchee (MultiCurve). L algorithme utilise est l algorithme
20 // d Uzawa du package mathematique.
22 #define No_Standard_RangeError
23 #define No_Standard_OutOfRange
25 #include <math_Vector.hxx>
26 #include <math_Matrix.hxx>
27 #include <AppParCurves_Constraint.hxx>
28 #include <AppParCurves_ConstraintCouple.hxx>
29 #include <AppParCurves_MultiPoint.hxx>
30 #include <AppParCurves.hxx>
31 #include <Standard_DimensionError.hxx>
32 #include <math_Uzawa.hxx>
33 #include <TColStd_Array1OfInteger.hxx>
34 #include <TColStd_Array2OfInteger.hxx>
36 #include <gp_Pnt2d.hxx>
38 #include <gp_Vec2d.hxx>
39 #include <TColgp_Array1OfPnt.hxx>
40 #include <TColgp_Array1OfPnt2d.hxx>
41 #include <TColgp_Array1OfVec.hxx>
42 #include <TColgp_Array1OfVec2d.hxx>
45 AppParCurves_ResolConstraint::
46 AppParCurves_ResolConstraint(const MultiLine& SSP,
47 AppParCurves_MultiCurve& SCurv,
48 const Standard_Integer FirstPoint,
49 const Standard_Integer LastPoint,
50 const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints,
51 const math_Matrix& Bern,
52 const math_Matrix& DerivativeBern,
53 const Standard_Real Tolerance):
54 Cont(1, NbConstraints(SSP, FirstPoint,
55 LastPoint, TheConstraints),
56 1, NbColumns(SSP, SCurv.NbPoles()-1), 0.0),
57 DeCont(1, NbConstraints(SSP, FirstPoint,
58 LastPoint, TheConstraints),
59 1, NbColumns(SSP, SCurv.NbPoles()-1), 0.0),
60 Secont(1, NbConstraints(SSP, FirstPoint,
61 LastPoint, TheConstraints), 0.0),
62 CTCinv(1, NbConstraints(SSP, FirstPoint,
63 LastPoint, TheConstraints),
64 1, NbConstraints(SSP, FirstPoint,
65 LastPoint, TheConstraints)),
66 Vardua(1, NbConstraints(SSP, FirstPoint,
67 LastPoint, TheConstraints)),
68 IPas(1, LastPoint-FirstPoint+1),
69 ITan(1, LastPoint-FirstPoint+1),
70 ICurv(1, LastPoint-FirstPoint+1)
72 Standard_Integer i, j, k, NbCu= SCurv.NbCurves();
74 Standard_Integer Inc3, IncSec, IncCol, IP = 0, CCol;
75 Standard_Integer myindex, Def = SCurv.NbPoles()-1;
76 Standard_Integer nb3d, nb2d, Npol= Def+1, Npol2 = 2*Npol;
77 Standard_Real T1 = 0., T2 = 0., T3, Tmax, Daij;
82 AppParCurves_ConstraintCouple mycouple;
83 AppParCurves_Constraint FC = AppParCurves_NoConstraint,
84 LC = AppParCurves_NoConstraint, Cons;
88 // Boucle de calcul du nombre de points de passage afin de dimensionner
93 for (i = TheConstraints->Lower(); i <= TheConstraints->Upper(); i++) {
94 mycouple = TheConstraints->Value(i);
95 myindex = mycouple.Index();
96 Cons = mycouple.Constraint();
97 if (myindex == FirstPoint) FC = Cons;
98 if (myindex == LastPoint) LC = Cons;
100 IncPass++; // IncPass = nbre de points de passage.
101 IPas(IncPass) = myindex;
104 IncTan++; // IncTan= nbre de points de tangence.
105 ITan(IncTan) = myindex;
108 IncCurv++; // IncCurv = nbre de pts de courbure.
109 ICurv(IncCurv) = myindex;
115 Done = Standard_True;
119 nb3d = ToolLine::NbP3d(SSP);
120 nb2d = ToolLine::NbP2d(SSP);
121 Standard_Integer mynb3d=nb3d, mynb2d=nb2d;
122 if (nb3d == 0) mynb3d = 1;
123 if (nb2d == 0) mynb2d = 1;
124 CCol = nb3d* 3 + nb2d* 2;
127 // Declaration et initialisation des matrices et vecteurs de contraintes:
128 math_Matrix ContInit(1, IncPass, 1, Npol);
129 math_Vector Start(1, CCol*Npol);
130 TColStd_Array2OfInteger Ibont(1, NbCu, 1, IncTan);
133 // Remplissage de Cont pour les points de passage:
134 // =================================================
135 for (i =1; i <= IncPass; i++) { // Cette partie ne depend que de Bernstein
137 for (j = 1; j <= Npol; j++) {
138 ContInit(i, j) = Bern(Npt, j);
141 for (i = 1; i <= CCol; i++) {
142 Cont.Set(IncPass*(i-1)+1, IncPass*i, Npol*(i-1)+1, Npol*i, ContInit);
146 // recuperation des vecteurs de depart pour Uzawa. Ce vecteur represente les
148 // Remplissage de secont et resolution.
150 TColgp_Array1OfVec tabV(1, mynb3d);
151 TColgp_Array1OfVec2d tabV2d(1, mynb2d);
152 TColgp_Array1OfPnt tabP(1, mynb3d);
153 TColgp_Array1OfPnt2d tabP2d(1, mynb2d);
155 Inc3 = CCol*IncPass +1;
158 for (k = 1; k <= NbCu; k++) {
160 for (i = 1; i <= IncTan; i++) {
162 // choix du maximum de tangence pour exprimer la colinearite:
163 ToolLine::Tangency(SSP, Npt, tabV);
168 if (Abs(T2) > Tmax) {
172 if (Abs(T3) > Tmax) {
176 if (Ibont(k, i) == 3) {
177 for (j = 1; j <= Npol; j++) {
178 Daij = DerivativeBern(Npt, j);
179 Cont(Inc3, j+ Npol + IncCol) = Daij*T3/Tmax;
180 Cont(Inc3, j + Npol2 + IncCol) = -Daij *T2/Tmax;
181 Cont(Inc3+1, j+ IncCol) = Daij* T3/Tmax;
182 Cont(Inc3+1, j+ Npol2 + IncCol) = -Daij*T1/Tmax;
185 else if (Ibont(k, i) == 1) {
186 for (j = 1; j <= Npol; j++) {
187 Daij = DerivativeBern(Npt, j);
188 Cont(Inc3, j + IncCol) = Daij*T3/Tmax;
189 Cont(Inc3, j + Npol2 + IncCol) = -Daij *T1/Tmax;
190 Cont(Inc3+1, j+ IncCol) = Daij* T2/Tmax;
191 Cont(Inc3+1, j+ Npol +IncCol) = -Daij*T1/Tmax;
194 else if (Ibont(k, i) == 2) {
195 for (j = 1; j <= Def+1; j++) {
196 Daij = DerivativeBern(Npt, j);
197 Cont(Inc3, j+ Npol + IncCol) = Daij*T3/Tmax;
198 Cont(Inc3, j + Npol2 + IncCol) = -Daij *T2/Tmax;
199 Cont(Inc3+1, j+ IncCol) = Daij* T2/Tmax;
200 Cont(Inc3+1, j+ Npol + IncCol) = -Daij*T1/Tmax;
206 // Remplissage du second membre:
207 for (i = 1; i <= IncPass; i++) {
208 ToolLine::Value(SSP, IPas(i), tabP);
210 Secont(i + IncSec) = Poi.X();
211 Secont(i + IncPass + IncSec) = Poi.Y();
212 Secont(i + 2*IncPass + IncSec) = Poi.Z();
214 IncSec = IncSec + 3*IncPass;
216 // Vecteur de depart:
217 for (j =1; j <= Npol; j++) {
218 Poi = SCurv.Value(j).Point(k);
219 Start(j + IncCol) = Poi.X();
220 Start(j+ Npol + IncCol) = Poi.Y();
221 Start(j + Npol2 + IncCol) = Poi.Z();
223 IncCol = IncCol + 3*Npol;
228 for (i = 1; i <= IncTan; i++) {
230 ToolLine::Tangency(SSP, Npt, tabV2d);
231 V2d = tabV2d(k-nb3d);
236 if (Abs(T2) > Tmax) {
240 for (j = 1; j <= Npol; j++) {
241 Daij = DerivativeBern(Npt, j);
242 Cont(Inc3, j + IncCol) = Daij*T2;
243 Cont(Inc3, j + Npol + IncCol) = -Daij*T1;
248 // Remplissage du second membre:
249 for (i = 1; i <= IncPass; i++) {
250 ToolLine::Value(SSP, IPas(i), tabP2d);
251 Poi2d = tabP2d(i-nb3d);
252 Secont(i + IncSec) = Poi2d.X();
253 Secont(i + IncPass + IncSec) = Poi2d.Y();
255 IncSec = IncSec + 2*IncPass;
257 // Remplissage du vecteur de depart:
258 for (j = 1; j <= Npol; j++) {
259 Poi2d = SCurv.Value(j).Point2d(k);
260 Start(j + IncCol) = Poi2d.X();
261 Start(j + Npol + IncCol) = Poi2d.Y();
263 IncCol = IncCol + Npol2;
267 // Equations exprimant le meme rapport de tangence sur chaque courbe:
268 // On prend les coordonnees les plus significatives.
271 for (i = 1; i <= IncTan; ++i) {
274 for (k = 1; k <= NbCu-1; ++k) {
276 // Initialize first relation variable (T1)
277 Standard_Integer addIndex_1 = 0, aVal = Ibont(k, i);
283 ToolLine::Tangency(SSP, Npt, tabV);
289 ToolLine::Tangency(SSP, Npt, tabV2d);
290 V2d = tabV2d(k-nb3d);
300 ToolLine::Tangency(SSP, Npt, tabV);
305 ToolLine::Tangency(SSP, Npt, tabV2d);
306 V2d = tabV2d(k-nb3d);
315 ToolLine::Tangency(SSP, Npt, tabV);
319 addIndex_1 = 2 * Npol;
323 // Initialize second relation variable (T2)
324 Standard_Integer addIndex_2 = 0, aNextVal = Ibont(k + 1, i);
330 ToolLine::Tangency(SSP, Npt, tabV);
335 ToolLine::Tangency(SSP, Npt, tabV2d);
336 V2d = tabV2d(k+1-nb3d);
345 ToolLine::Tangency(SSP, Npt, tabV);
350 ToolLine::Tangency(SSP, Npt, tabV2d);
351 V2d = tabV2d(k+1-nb3d);
359 ToolLine::Tangency(SSP, Npt, tabV);
362 addIndex_2 = 2 * Npol;
367 // Relations between T1 and T2:
368 for (j = 1; j <= Npol; j++) {
369 Daij = DerivativeBern(Npt, j);
370 Cont(Inc3, j + IncCol + addIndex_1) = Daij*T2;
371 Cont(Inc3, j + IP + IncCol + addIndex_2) = -Daij*T1;
379 // Equations concernant la courbure:
384 for (k = 1; k <= NbCu; k++) {
385 for (i = 1; i <= IncCurv; i++) {
387 AppDef_MultiPointConstraint MP = SSP.Value(Npt);
388 DDA = SecondDerivativeBern(Parameters(Npt));
389 if (SSP.Value(1).Dimension(k) == 3) {
393 for (j = 1; j <= Npol; j++) {
394 Daij = DerivativeBern(Npt, j);
396 Cont(Inc3, j + IncCol) = D2Aij;
397 Cont(Inc3, j + Npol2 + IncCol) = -C2*Daij;
398 Cont(Inc3, j + Npol + IncCol) = C3*Daij;
400 Cont(Inc3+1, j + Npol + IncCol) = D2Aij;
401 Cont(Inc3+1, j +IncCol) = -C3*Daij;
402 Cont(Inc3+1, j + Npol2 + IncCol) = C1*Daij;
404 Cont(Inc3+2, j + Npol2+IncCol) = D2Aij;
405 Cont(Inc3+2, j + Npol+IncCol) = -C1*Daij;
406 Cont(Inc3+2, j + IncCol) = C2*Daij;
410 else { // Dimension 2:
411 C1 = MP.Curv2d(k).X();
412 C2 = MP.Curv2d(k).Y();
413 for (j = 1; j <= Npol; j++) {
414 Daij = DerivativeBern(Npt, j);
416 Cont(Inc3, j + IncCol) = D2Aij*C1;
417 Cont(Inc3+1, j + Npol + IncCol) = D2Aij*C2;
425 // Resolution par Uzawa:
427 math_Uzawa UzaResol(Cont, Secont, Start, Tolerance);
428 if (!(UzaResol.IsDone())) {
429 Done = Standard_False;
432 CTCinv = UzaResol.InverseCont();
433 UzaResol.Duale(Vardua);
434 for (i = 1; i <= CTCinv.RowNumber(); i++) {
435 for (j = i; j <= CTCinv.RowNumber(); j++) {
436 CTCinv(i, j) = CTCinv(j, i);
439 Done = Standard_True;
440 math_Vector VecPoles (1, CCol*Npol);
441 VecPoles = UzaResol.Value();
443 Standard_Integer polinit = 1, polfin=Npol;
444 if (FC >= 1) polinit = 2;
445 if (LC >= 1) polfin = Npol-1;
447 for (i = polinit; i <= polfin; i++) {
449 AppParCurves_MultiPoint MPol(nb3d, nb2d);
450 for (k = 1; k <= NbCu; k++) {
452 gp_Pnt Pol(VecPoles(IncCol + i),
453 VecPoles(IncCol + Npol +i),
454 VecPoles(IncCol + 2*Npol + i));
455 MPol.SetPoint(k, Pol);
456 IncCol = IncCol + 3*Npol;
459 gp_Pnt2d Pol2d(VecPoles(IncCol + i),
460 VecPoles(IncCol + Npol + i));
461 MPol.SetPoint2d(k, Pol2d);
462 IncCol = IncCol + 2*Npol;
465 SCurv.SetValue(i, MPol);
472 Standard_Boolean AppParCurves_ResolConstraint::IsDone () const {
477 Standard_Integer AppParCurves_ResolConstraint::
478 NbConstraints(const MultiLine& SSP,
479 const Standard_Integer,
480 const Standard_Integer,
481 const Handle(AppParCurves_HArray1OfConstraintCouple)&
485 // Boucle de calcul du nombre de points de passage afin de dimensionner
487 Standard_Integer aIncPass, aIncTan, aIncCurv, aCCol;
489 AppParCurves_Constraint Cons;
495 for (i = TheConstraints->Lower(); i <= TheConstraints->Upper(); i++) {
496 Cons = (TheConstraints->Value(i)).Constraint();
498 aIncPass++; // IncPass = nbre de points de passage.
501 aIncTan++; // IncTan= nbre de points de tangence.
504 aIncCurv++; // IncCurv = nbre de pts de courbure.
507 Standard_Integer nb3d = ToolLine::NbP3d(SSP);
508 Standard_Integer nb2d = ToolLine::NbP2d(SSP);
509 aCCol = nb3d* 3 + nb2d* 2;
511 return aCCol*aIncPass + aIncTan*(aCCol-1) + 3*aIncCurv;
516 Standard_Integer AppParCurves_ResolConstraint::NbColumns(const MultiLine& SSP,
517 const Standard_Integer Deg)
520 Standard_Integer nb3d = ToolLine::NbP3d(SSP);
521 Standard_Integer nb2d = ToolLine::NbP2d(SSP);
522 Standard_Integer CCol = nb3d* 3 + nb2d* 2;
527 const math_Matrix& AppParCurves_ResolConstraint::ConstraintMatrix() const
532 const math_Matrix& AppParCurves_ResolConstraint::InverseMatrix() const
538 const math_Vector& AppParCurves_ResolConstraint::Duale() const
545 const math_Matrix& AppParCurves_ResolConstraint::
546 ConstraintDerivative(const MultiLine& SSP,
547 const math_Vector& Parameters,
548 const Standard_Integer Deg,
549 const math_Matrix& DA)
551 Standard_Integer i, j, k, nb2d, nb3d, CCol, Inc3, IncCol, Npt;
552 Standard_Integer Npol, Npol2, NbCu =ToolLine::NbP3d(SSP)+ToolLine::NbP2d(SSP);
555 Npol = Deg+1; Npol2 = 2*Npol;
556 TColStd_Array2OfInteger Ibont(1, NbCu, 1, IncTan);
557 math_Matrix DeCInit(1, IncPass, 1, Npol);
558 math_Vector DDA(1, Npol);
561 Standard_Real T1, T2, T3, Tmax, DDaij;
562 // Standard_Integer FirstP = IPas(1);
563 nb3d = ToolLine::NbP3d(SSP);
564 nb2d = ToolLine::NbP2d(SSP);
565 Standard_Integer mynb3d = nb3d, mynb2d = nb2d;
566 if (nb3d == 0) mynb3d = 1;
567 if (nb2d == 0) mynb2d = 1;
568 CCol = nb3d* 3 + nb2d* 2;
570 TColgp_Array1OfVec tabV(1, mynb3d);
571 TColgp_Array1OfVec2d tabV2d(1, mynb2d);
572 TColgp_Array1OfPnt tabP(1, mynb3d);
573 TColgp_Array1OfPnt2d tabP2d(1, mynb2d);
575 for (i = 1; i <= DeCont.RowNumber(); i++)
576 for (j = 1; j <= DeCont.ColNumber(); j++)
580 // Remplissage de DK pour les points de passages:
582 for (i =1; i <= IncPass; i++) {
584 for (j = 1; j <= Npol; j++) DeCInit(i, j) = DA(Npt, j);
586 for (i = 1; i <= CCol; i++) {
587 DeCont.Set(IncPass*(i-1)+1, IncPass*i, Npol*(i-1)+1, Npol*i, DeCInit);
591 // Pour les points de tangence:
593 Inc3 = CCol*IncPass +1;
596 for (k = 1; k <= NbCu; k++) {
598 for (i = 1; i <= IncTan; i++) {
600 // MultiPoint MPoint = ToolLine::Value(SSP, Npt);
601 // choix du maximum de tangence pour exprimer la colinearite:
602 ToolLine::Tangency(SSP, Npt, tabV);
607 if (Abs(T2) > Tmax) {
611 if (Abs(T3) > Tmax) {
615 AppParCurves::SecondDerivativeBernstein(Parameters(Npt), DDA);
616 if (Ibont(k, i) == 3) {
617 for (j = 1; j <= Npol; j++) {
619 DeCont(Inc3, j+ Npol + IncCol) = DDaij*T3/Tmax;
620 DeCont(Inc3, j + Npol2 + IncCol) = -DDaij *T2/Tmax;
621 DeCont(Inc3+1, j+ IncCol) = DDaij* T3/Tmax;
622 DeCont(Inc3+1, j+ Npol2 + IncCol) = -DDaij*T1/Tmax;
625 else if (Ibont(k, i) == 1) {
626 for (j = 1; j <= Npol; j++) {
628 DeCont(Inc3, j + IncCol) = DDaij*T3/Tmax;
629 DeCont(Inc3, j + Npol2 + IncCol) = -DDaij *T1/Tmax;
630 DeCont(Inc3+1, j+ IncCol) = DDaij* T2/Tmax;
631 DeCont(Inc3+1, j+ Npol +IncCol) = -DDaij*T1/Tmax;
634 else if (Ibont(k, i) == 2) {
635 for (j = 1; j <= Npol; j++) {
637 DeCont(Inc3, j+ Npol + IncCol) = DDaij*T3/Tmax;
638 DeCont(Inc3, j + Npol2 + IncCol) = -DDaij *T2/Tmax;
639 DeCont(Inc3+1, j+ IncCol) = DDaij* T2/Tmax;
640 DeCont(Inc3+1, j+ Npol + IncCol) = -DDaij*T1/Tmax;
645 IncCol = IncCol + 3*Npol;
648 for (i = 1; i <= IncTan; i++) {
650 AppParCurves::SecondDerivativeBernstein(Parameters(Npt), DDA);
651 ToolLine::Tangency(SSP, Npt, tabV2d);
656 if (Abs(T2) > Tmax) {
660 for (j = 1; j <= Npol; j++) {
662 DeCont(Inc3, j + IncCol) = DDaij*T2;
663 DeCont(Inc3, j + Npol + IncCol) = -DDaij*T1;
670 // Equations exprimant le meme rapport de tangence sur chaque courbe:
671 // On prend les coordonnees les plus significatives.
674 for (i =1; i <= IncTan; i++) {
677 AppParCurves::SecondDerivativeBernstein(Parameters(Npt), DDA);
678 // MultiPoint MP = ToolLine::Value(SSP, Npt);
679 for (k = 1; k <= NbCu-1; k++) {
681 if (Ibont(k, i) == 1) {
683 ToolLine::Tangency(SSP, Npt, tabV);
689 ToolLine::Tangency(SSP, Npt, tabV2d);
694 if (Ibont(k+1, i) == 1) { // Relations entre T1x et T2x:
696 ToolLine::Tangency(SSP, Npt, tabV);
701 ToolLine::Tangency(SSP, Npt, tabV2d);
705 for (j = 1; j <= Npol; j++) {
707 Cont(Inc3, j + IncCol) = Daij*T2;
708 Cont(Inc3, j + IP + IncCol) = -Daij*T1;
710 IncCol = IncCol + IP;
712 else if (Ibont(k+1, i) == 2) { // Relations entre T1x et T2y:
714 ToolLine::Tangency(SSP, Npt, tabV);
719 ToolLine::Tangency(SSP, Npt, tabV2d);
723 for (j = 1; j <= Npol; j++) {
725 Cont(Inc3, j + IncCol) = Daij*T2;
726 Cont(Inc3, j + IP + Npol + IncCol) = -Daij*T1;
728 IncCol = IncCol + IP;
730 else if (Ibont(k+1,i) == 3) { // Relations entre T1x et T2z:
731 ToolLine::Tangency(SSP, Npt, tabV);
734 for (j = 1; j <= Npol; j++) {
736 Cont(Inc3, j + IncCol) = Daij*T2;
737 Cont(Inc3, j + IP + 2*Npol + IncCol) = -Daij*T1;
739 IncCol = IncCol + IP;
742 else if (Ibont(k,i) == 2) {
744 ToolLine::Tangency(SSP, Npt, tabV);
750 ToolLine::Tangency(SSP, Npt, tabV2d);
755 if (Ibont(k+1, i) == 1) { // Relations entre T1y et T2x:
757 ToolLine::Tangency(SSP, Npt, tabV);
762 ToolLine::Tangency(SSP, Npt, tabV2d);
766 for (j = 1; j <= Npol; j++) {
768 Cont(Inc3, j + Npol + IncCol) = Daij*T2;
769 Cont(Inc3, j + IP + IncCol) = -Daij*T1;
771 IncCol = IncCol + IP;
774 else if (Ibont(k+1, i) == 2) { // Relations entre T1y et T2y:
776 ToolLine::Tangency(SSP, Npt, tabV);
781 ToolLine::Tangency(SSP, Npt, tabV2d);
785 for (j = 1; j <= Npol; j++) {
787 Cont(Inc3, j + Npol + IncCol) = Daij*T2;
788 Cont(Inc3, j + IP + Npol + IncCol) = -Daij*T1;
790 IncCol = IncCol + IP;
793 else if (Ibont(k+1,i)== 3) { // Relations entre T1y et T2z:
794 ToolLine::Tangency(SSP, Npt, tabV);
797 for (j = 1; j <= Npol; j++) {
799 Cont(Inc3, j + Npol +IncCol) = Daij*T2;
800 Cont(Inc3, j + IP + 2*Npol + IncCol) = -Daij*T1;
802 IncCol = IncCol + IP;
807 ToolLine::Tangency(SSP, Npt, tabV);
811 if (Ibont(k+1, i) == 1) { // Relations entre T1z et T2x:
813 ToolLine::Tangency(SSP, Npt, tabV);
818 ToolLine::Tangency(SSP, Npt, tabV2d);
822 for (j = 1; j <= Npol; j++) {
824 Cont(Inc3, j + 2*Npol +IncCol) = Daij*T2;
825 Cont(Inc3, j + IP + IncCol) = -Daij*T1;
827 IncCol = IncCol + IP;
830 else if (Ibont(k+1, i) == 2) { // Relations entre T1z et T2y:
832 ToolLine::Tangency(SSP, Npt, tabV);
837 ToolLine::Tangency(SSP, Npt, tabV2d);
841 for (j = 1; j <= Npol; j++) {
843 Cont(Inc3, j + 2*Npol +IncCol) = Daij*T2;
844 Cont(Inc3, j + IP + Npol + IncCol) = -Daij*T1;
846 IncCol = IncCol + IP;
849 else if (Ibont(k+1,i)==3) { // Relations entre T1z et T2z:
850 ToolLine::Tangency(SSP, Npt, tabV);
853 for (j = 1; j <= Npol; j++) {
855 Cont(Inc3, j + 2*Npol + IncCol) = Daij*T2;
856 Cont(Inc3, j + IP + 2*Npol + IncCol) = -Daij*T1;
858 IncCol = IncCol + IP;