0024057: Eliminate compiler warning C4100 in MSVC++ with warning level 4
[occt.git] / src / GccIter / GccIter_FunctionTanCuCuCu.gxx
CommitLineData
b311480e 1// Created on: 1992-01-20
2// Created by: Remi GILET
3// Copyright (c) 1992-1999 Matra Datavision
4// Copyright (c) 1999-2012 OPEN CASCADE SAS
5//
6// The content of this file is subject to the Open CASCADE Technology Public
7// License Version 6.5 (the "License"). You may not use the content of this file
8// except in compliance with the License. Please obtain a copy of the License
9// at http://www.opencascade.org and read it completely before using this file.
10//
11// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13//
14// The Original Code and all software distributed under the License is
15// distributed on an "AS IS" basis, without warranty of any kind, and the
16// Initial Developer hereby disclaims all such warranties, including without
17// limitation, any warranties of merchantability, fitness for a particular
18// purpose or non-infringement. Please see the License for the specific terms
19// and conditions governing the rights and limitations under the License.
20
7fd59977 21
22#include <Standard_ConstructionError.hxx>
23#include <ElCLib.hxx>
24#include <gp.hxx>
25
26void GccIter_FunctionTanCuCuCu::
27 InitDerivative(const math_Vector& X,
28 gp_Pnt2d& Point1,
29 gp_Pnt2d& Point2,
30 gp_Pnt2d& Point3,
31 gp_Vec2d& Tan1,
32 gp_Vec2d& Tan2,
33 gp_Vec2d& Tan3,
34 gp_Vec2d& D21,
35 gp_Vec2d& D22,
36 gp_Vec2d& D23) {
37 switch (TheType) {
38 case GccIter_CiCuCu:
39 {
40 ElCLib::D2(X(1),Circ1,Point1,Tan1,D21);
41 TheCurveTool::D2(Curv2,X(2),Point2,Tan2,D22);
42 TheCurveTool::D2(Curv3,X(3),Point3,Tan3,D23);
43 }
44 break;
45 case GccIter_CiCiCu:
46 {
47 ElCLib::D2(X(1),Circ1,Point1,Tan1,D21);
48 ElCLib::D2(X(2),Circ2,Point2,Tan2,D22);
49 TheCurveTool::D2(Curv3,X(3),Point3,Tan3,D23);
50 }
51 break;
52 case GccIter_CiLiCu:
53 {
54 ElCLib::D2(X(1),Circ1,Point1,Tan1,D21);
55 ElCLib::D1(X(2),Lin2,Point2,Tan2);
56 D22 = gp_Vec2d(0.,0.);
57 TheCurveTool::D2(Curv3,X(3),Point3,Tan3,D23);
58 }
59 break;
60 case GccIter_LiCuCu:
61 {
62 ElCLib::D1(X(1),Lin1,Point1,Tan1);
63 D21 = gp_Vec2d(0.,0.);
64 TheCurveTool::D2(Curv2,X(2),Point2,Tan2,D22);
65 TheCurveTool::D2(Curv3,X(3),Point3,Tan3,D23);
66 }
67 break;
68 case GccIter_LiLiCu:
69 {
70 ElCLib::D1(X(1),Lin1,Point1,Tan1);
71 D21 = gp_Vec2d(0.,0.);
72 ElCLib::D1(X(2),Lin2,Point2,Tan2);
73 D22 = gp_Vec2d(0.,0.);
74 TheCurveTool::D2(Curv3,X(3),Point3,Tan3,D23);
75 }
76 break;
77 case GccIter_CuCuCu:
78 {
79 TheCurveTool::D2(Curv1,X(1),Point1,Tan1,D21);
80 TheCurveTool::D2(Curv2,X(2),Point2,Tan2,D22);
81 TheCurveTool::D2(Curv3,X(3),Point3,Tan3,D23);
82 }
83 break;
84 default:
85 {
86 Standard_ConstructionError::Raise();
87 }
88 }
89}
90
91GccIter_FunctionTanCuCuCu::
92 GccIter_FunctionTanCuCuCu(const TheCurve& C1 ,
93 const TheCurve& C2 ,
94 const TheCurve& C3 ) {
95 Curv1 = C1;
96 Curv2 = C2;
97 Curv3 = C3;
98 TheType = GccIter_CuCuCu;
99}
100
101GccIter_FunctionTanCuCuCu::
102 GccIter_FunctionTanCuCuCu(const gp_Circ2d& C1 ,
103 const TheCurve& C2 ,
104 const TheCurve& C3 ) {
105 Circ1 = C1;
106 Curv2 = C2;
107 Curv3 = C3;
108 TheType = GccIter_CiCuCu;
109}
110
111GccIter_FunctionTanCuCuCu::
112 GccIter_FunctionTanCuCuCu(const gp_Circ2d& C1 ,
113 const gp_Circ2d& C2 ,
114 const TheCurve& C3 ) {
115 Circ1 = C1;
116 Circ2 = C2;
117 Curv3 = C3;
118 TheType = GccIter_CiCiCu;
119}
120
121GccIter_FunctionTanCuCuCu::
122 GccIter_FunctionTanCuCuCu(const gp_Circ2d& C1 ,
123 const gp_Lin2d& L2 ,
124 const TheCurve& C3 ) {
125 Circ1 = C1;
126 Lin2 = L2;
127 Curv3 = C3;
128 TheType = GccIter_CiLiCu;
129}
130
131GccIter_FunctionTanCuCuCu::
132 GccIter_FunctionTanCuCuCu(const gp_Lin2d& L1 ,
133 const gp_Lin2d& L2 ,
134 const TheCurve& C3 ) {
135 Lin1 = L1;
136 Lin2 = L2;
137 Curv3 = C3;
138 TheType = GccIter_LiLiCu;
139}
140
141GccIter_FunctionTanCuCuCu::
142 GccIter_FunctionTanCuCuCu(const gp_Lin2d& L1 ,
143 const TheCurve& C2 ,
144 const TheCurve& C3 ) {
145 Lin1 = L1;
146 Curv2 = C2;
147 Curv3 = C3;
148 TheType = GccIter_LiCuCu;
149}
150
151//==========================================================================
152
153Standard_Integer GccIter_FunctionTanCuCuCu::
154 NbVariables () const { return 3; }
155
156Standard_Integer GccIter_FunctionTanCuCuCu::
157 NbEquations () const { return 3; }
158
159Standard_Boolean GccIter_FunctionTanCuCuCu::
160 Value (const math_Vector& X ,
161 math_Vector& Fval ) {
162 gp_Pnt2d Point1;
163 gp_Pnt2d Point2;
164 gp_Pnt2d Point3;
165 gp_Vec2d Tan1;
166 gp_Vec2d Tan2;
167 gp_Vec2d Tan3;
168 gp_Vec2d D21;
169 gp_Vec2d D22;
170 gp_Vec2d D23;
171 InitDerivative(X,Point1,Point2,Point3,Tan1,Tan2,Tan3,D21,D22,D23);
172//pipj (normes) et PiPj (non Normes).
173 gp_XY P1P2(gp_Vec2d(Point1,Point2).XY());
174 gp_XY P2P3(gp_Vec2d(Point2,Point3).XY());
175 gp_XY P3P1(gp_Vec2d(Point3,Point1).XY());
176 Standard_Real NorP1P2 = P1P2.Modulus();
177 Standard_Real NorP2P3 = P2P3.Modulus();
178 Standard_Real NorP3P1 = P3P1.Modulus();
179 gp_XY p1p2,p2p3,p3p1;
180 if (NorP1P2 >= gp::Resolution()) { p1p2 = P1P2/NorP1P2; }
181 else { p1p2 = gp_XY(0.,0.); }
182 if (NorP2P3 >= gp::Resolution()) { p2p3 = P2P3/NorP2P3; }
183 else { p2p3 = gp_XY(0.,0.); }
184 if (NorP3P1 >= gp::Resolution()) { p3p1 = P3P1/NorP3P1; }
185 else { p3p1 = gp_XY(0.,0.); }
186//derivees premieres non normees Deriv1ui.
187 gp_XY Deriv1u1(Tan1.XY());
188 gp_XY Deriv1u2(Tan2.XY());
189 gp_XY Deriv1u3(Tan3.XY());
190//normales aux courbes.
191 Standard_Real nnor1 = Deriv1u1.Modulus();
192 Standard_Real nnor2 = Deriv1u2.Modulus();
193 Standard_Real nnor3 = Deriv1u3.Modulus();
194 gp_XY Nor1(-Deriv1u1.Y(),Deriv1u1.X());
195 gp_XY Nor2(-Deriv1u2.Y(),Deriv1u2.X());
196 gp_XY Nor3(-Deriv1u3.Y(),Deriv1u3.X());
197 gp_XY nor1,nor2,nor3;
198 if (nnor1 >= gp::Resolution()) { nor1 = Nor1/nnor1; }
199 else { nor1 = gp_XY(0.,0.); }
200 if (nnor2 >= gp::Resolution()) { nor2 = Nor2/nnor2; }
201 else { nor2 = gp_XY(0.,0.); }
202 if (nnor3 >= gp::Resolution()) { nor3 = Nor3/nnor3; }
203 else { nor3 = gp_XY(0.,0.); }
204//determination des signes pour les produits scalaires.
205 Standard_Real signe1 = 1.;
206 Standard_Real signe2 = 1.;
207 Standard_Real signe3 = 1.;
208 gp_Pnt2d Pcenter(gp_XY(Point1.XY()+Point2.XY()+Point3.XY())/3.);
209 gp_XY fic1(Pcenter.XY()-Point1.XY());
210 gp_XY fic2(Pcenter.XY()-Point2.XY());
211 gp_XY fic3(Pcenter.XY()-Point3.XY());
212 Standard_Real pscal11 = nor1.Dot(fic1);
213 Standard_Real pscal22 = nor2.Dot(fic2);
214 Standard_Real pscal33 = nor3.Dot(fic3);
215 if (pscal11 <= 0.) { signe1 = -1; }
216 if (pscal22 <= 0.) { signe2 = -1; }
217 if (pscal33 <= 0.) { signe3 = -1; }
218// Fonctions Fui.
219// ==============
220 Fval(1) = signe1*nor1.Dot(p1p2)+signe2*nor2.Dot(p1p2);
221 Fval(2) = signe2*nor2.Dot(p2p3)+signe3*nor3.Dot(p2p3);
222 Fval(3) = signe3*nor3.Dot(p3p1)+signe1*nor1.Dot(p3p1);
223 return Standard_True;
224}
225
226
227
35e08fe8 228Standard_Boolean GccIter_FunctionTanCuCuCu::Derivatives (const math_Vector&,
229 math_Matrix&)
230{
7fd59977 231#if 0
232 gp_Pnt2d Point1;
233 gp_Pnt2d Point2;
234 gp_Pnt2d Point3;
235 gp_Vec2d Tan1;
236 gp_Vec2d Tan2;
237 gp_Vec2d Tan3;
238 gp_Vec2d D21;
239 gp_Vec2d D22;
240 gp_Vec2d D23;
241 InitDerivative(X,Point1,Point2,Point3,Tan1,Tan2,Tan3,D21,D22,D23);
242//derivees premieres non normees Deriv1ui.
243 gp_XY Deriv1u1(Tan1.XY());
244 gp_XY Deriv1u2(Tan2.XY());
245 gp_XY Deriv1u3(Tan3.XY());
246//pipj (normes) et PiPj (non Normes).
247 gp_XY P1P2(gp_Vec2d(Point1,Point2).XY());
248 gp_XY P2P3(gp_Vec2d(Point2,Point3).XY());
249 gp_XY P3P1(gp_Vec2d(Point3,Point1).XY());
250 Standard_Real NorP1P2 = P1P2.Modulus();
251 Standard_Real NorP2P3 = P2P3.Modulus();
252 Standard_Real NorP3P1 = P3P1.Modulus();
253 gp_XY p1p2,p2p3,p3p1;
254 if (NorP1P2 >= gp::Resolution()) { p1p2 = P1P2/NorP1P2; }
255 else { p1p2 = gp_XY(0.,0.); }
256 if (NorP2P3 >= gp::Resolution()) { p2p3 = P2P3/NorP2P3; }
257 else { p2p3 = gp_XY(0.,0.); }
258 if (NorP3P1 >= gp::Resolution()) { p3p1 = P3P1/NorP3P1; }
259 else { p3p1 = gp_XY(0.,0.); }
260//normales au courbes normees Nori et non nromees nori et norme des nori.
261 Standard_Real nnor1 = Deriv1u1.Modulus();
262 Standard_Real nnor2 = Deriv1u2.Modulus();
263 Standard_Real nnor3 = Deriv1u3.Modulus();
264 gp_XY Nor1(-Deriv1u1.Y(),Deriv1u1.X());
265 gp_XY Nor2(-Deriv1u2.Y(),Deriv1u2.X());
266 gp_XY Nor3(-Deriv1u3.Y(),Deriv1u3.X());
267 gp_XY nor1,nor2,nor3;
268 if (nnor1 >= gp::Resolution()) { nor1 = Nor1/nnor1; }
269 else { nor1 = gp_XY(0.,0.); }
270 if (nnor2 >= gp::Resolution()) { nor2 = Nor2/nnor2; }
271 else { nor2 = gp_XY(0.,0.); }
272 if (nnor3 >= gp::Resolution()) { nor3 = Nor3/nnor3; }
273 else { nor3 = gp_XY(0.,0.); }
274//derivees des normales.
275 gp_XY NorD21,NorD22,NorD23;
276 NorD21 = gp_XY(-D21.Y(),D21.X());
277 NorD22 = gp_XY(-D22.Y(),D22.X());
278 NorD23 = gp_XY(-D23.Y(),D23.X());
279//determination des signes pour les produits scalaires.
280 Standard_Real signe1 = 1.;
281 Standard_Real signe2 = 1.;
282 Standard_Real signe3 = 1.;
283 gp_XY P = Point1.XY();
284 P += Point2.XY();
285 P += Point3.XY();
286 P /= 3.;
287 gp_Pnt2d Pcenter(P);
288 gp_XY fic1 = Pcenter.XY();
289 fic1 -= Point1.XY();
290 gp_XY fic2 = Pcenter.XY();
291 fic2 -= Point2.XY();
292 gp_XY fic3 = Pcenter.XY();
293 fic3 -= Point3.XY();
294 Standard_Real pscal11 = nor1.Dot(fic1);
295 Standard_Real pscal22 = nor2.Dot(fic2);
296 Standard_Real pscal33 = nor3.Dot(fic3);
297 if (pscal11 <= 0.) { signe1 = -1; }
298 if (pscal22 <= 0.) { signe2 = -1; }
299 if (pscal33 <= 0.) { signe3 = -1; }
300
301// Derivees dFui/uj 1 <= ui <= 3 , 1 <= uj <= 3
302// =============================================
303 Standard_Real partie1,partie2;
304 if (nnor1 <= gp::Resolution()) { partie1 = 0.; }
305 else { partie1 = (signe1*NorD21/nnor1-(Nor1.Dot(NorD21)/(nnor1*nnor1*nnor1))
306 *Nor1).Dot(p1p2); }
307 if (NorP1P2 <= gp::Resolution()) { partie2 = 0.; }
308 else {partie2=((Deriv1u1.Dot(p1p2)/(NorP1P2*NorP1P2))*P1P2-Deriv1u1/NorP1P2)
309 .Dot(signe1*nor1+signe2*nor2); }
310 Deriv(1,1) = partie1 + partie2;
311 if (nnor2 <= gp::Resolution()) { partie1 = 0.; }
312 else { partie1=(signe2*NorD22/(nnor2)-(Nor2.Dot(NorD22)/(nnor2*nnor2*nnor2))
313 *Nor2).Dot(p1p2); }
314 if (NorP1P2 <= gp::Resolution()) { partie2 = 0.; }
315 else{partie2=((-Deriv1u2.Dot(p1p2)/(NorP1P2*NorP1P2))*P1P2+Deriv1u2/NorP1P2)
316 .Dot(signe1*nor1+signe2*nor2); }
317 Deriv(1,2) = partie1 + partie2;
318 Deriv(1,3) = 0.;
319 Deriv(2,1) = 0.;
320 if (nnor2 <= gp::Resolution()) { partie1 = 0.; }
321 else { partie1=(signe2*NorD22/(nnor2)-(Nor2.Dot(NorD22)/(nnor2*nnor2*nnor2))
322 *Nor2).Dot(p2p3); }
323 if (NorP2P3 <= gp::Resolution()) { partie2 = 0.; }
324 else { partie2=((Deriv1u2.Dot(p2p3)/(NorP2P3*NorP2P3))*P2P3-Deriv1u2/NorP2P3)
325 .Dot(signe2*nor2+signe3*nor3); }
326 Deriv(2,2) = partie1 +partie2;
327 if (nnor3 <= gp::Resolution()) { partie1 = 0.; }
328 else { partie1=(signe3*NorD23/(nnor3)-(Nor3.Dot(NorD23)/(nnor3*nnor3*nnor3))
329 *Nor3).Dot(p2p3); }
330 if (NorP2P3 <= gp::Resolution()) { partie2 = 0.; }
331 else {partie2=((-Deriv1u3.Dot(p2p3)/(NorP2P3*NorP2P3))*P2P3+Deriv1u3/NorP2P3)
332 .Dot(signe2*nor2+signe3*nor3); }
333 Deriv(2,3) = partie1 + partie2;
334 if (nnor1 <= gp::Resolution()) { partie1 = 0.; }
335 else { partie1 =(signe1*NorD21/(nnor1)-(Nor1.Dot(NorD21)/(nnor1*nnor1*nnor1))
336 *Nor1).Dot(p3p1); }
337 if (NorP3P1 <= gp::Resolution()) { partie2 = 0.; }
338 else {partie2=((-Deriv1u1.Dot(p3p1)/(NorP3P1*NorP3P1))*P3P1+Deriv1u1/NorP3P1)
339 .Dot(signe1*nor1+signe3*nor3); }
340 Deriv(3,1) = partie1 + partie2;
341 Deriv(3,2) = 0.;
342 if (nnor3 <= gp::Resolution()) { partie1 = 0.; }
343 else { partie1=(signe3*NorD23/(nnor3)-(Nor3.Dot(NorD23)/(nnor3*nnor3*nnor3))
344 *Nor3).Dot(p3p1); }
345 if (NorP3P1 <= gp::Resolution()) { partie2 = 0.; }
346 else {partie2=((Deriv1u3.Dot(p3p1)/(NorP3P1*NorP3P1))*P3P1-Deriv1u3/NorP3P1)
347 .Dot(signe1*nor1+signe3*nor3); }
348 Deriv(3,3) = partie1+partie2;
349#endif
350 return Standard_True;
351}
352
353
35e08fe8 354Standard_Boolean GccIter_FunctionTanCuCuCu:: Values (const math_Vector&,
355 math_Vector&,
356 math_Matrix& )
357{
7fd59977 358#if 0
359 gp_Pnt2d Point1;
360 gp_Pnt2d Point2;
361 gp_Pnt2d Point3;
362 gp_Vec2d Tan1;
363 gp_Vec2d Tan2;
364 gp_Vec2d Tan3;
365 gp_Vec2d D21;
366 gp_Vec2d D22;
367 gp_Vec2d D23;
368 InitDerivative(X,Point1,Point2,Point3,Tan1,Tan2,Tan3,D21,D22,D23);
369//derivees premieres non normees Deriv1ui.
370 gp_XY Deriv1u1(Tan1.XY());
371 gp_XY Deriv1u2(Tan2.XY());
372 gp_XY Deriv1u3(Tan3.XY());
373//pipj (normes) et PiPj (non Normes).
374 gp_XY P1P2(gp_Vec2d(Point1,Point2).XY());
375 gp_XY P2P3(gp_Vec2d(Point2,Point3).XY());
376 gp_XY P3P1(gp_Vec2d(Point3,Point1).XY());
377 Standard_Real NorP1P2 = P1P2.Modulus();
378 Standard_Real NorP2P3 = P2P3.Modulus();
379 Standard_Real NorP3P1 = P3P1.Modulus();
380 gp_XY p1p2,p2p3,p3p1;
381 if (NorP1P2 >= gp::Resolution()) { p1p2 = P1P2/NorP1P2; }
382 else { p1p2 = gp_XY(0.,0.); }
383 if (NorP2P3 >= gp::Resolution()) { p2p3 = P2P3/NorP2P3; }
384 else { p2p3 = gp_XY(0.,0.); }
385 if (NorP3P1 >= gp::Resolution()) { p3p1 = P3P1/NorP3P1; }
386 else { p3p1 = gp_XY(0.,0.); }
387//normales au courbes normees Nori et non nromees nori et norme des nori.
388 Standard_Real nnor1 = Deriv1u1.Modulus();
389 Standard_Real nnor2 = Deriv1u2.Modulus();
390 Standard_Real nnor3 = Deriv1u3.Modulus();
391 gp_XY Nor1(-Deriv1u1.Y(),Deriv1u1.X());
392 gp_XY Nor2(-Deriv1u2.Y(),Deriv1u2.X());
393 gp_XY Nor3(-Deriv1u3.Y(),Deriv1u3.X());
394 gp_XY nor1,nor2,nor3;
395 if (nnor1 >= gp::Resolution()) { nor1 = Nor1/nnor1; }
396 else { nor1 = gp_XY(0.,0.); }
397 if (nnor2 >= gp::Resolution()) { nor2 = Nor2/nnor2; }
398 else { nor2 = gp_XY(0.,0.); }
399 if (nnor3 >= gp::Resolution()) { nor3 = Nor3/nnor3; }
400 else { nor3 = gp_XY(0.,0.); }
401//derivees des normales.
402 gp_XY NorD21,NorD22,NorD23;
403 NorD21 = gp_XY(-D21.Y(),D21.X());
404 NorD22 = gp_XY(-D22.Y(),D22.X());
405 NorD23 = gp_XY(-D23.Y(),D23.X());
406//determination des signes pour les produits scalaires.
407 Standard_Real signe1 = 1.;
408 Standard_Real signe2 = 1.;
409 Standard_Real signe3 = 1.;
410 gp_XY P = Point1.XY();
411 P += Point2.XY();
412 P += Point3.XY();
413 P /= 3.;
414 gp_Pnt2d Pcenter(P);
415 gp_XY fic1 = Pcenter.XY();
416 fic1 -= Point1.XY();
417 gp_XY fic2 = Pcenter.XY();
418 fic2 -= Point2.XY();
419 gp_XY fic3 = Pcenter.XY();
420 fic3 -= Point3.XY();
421 Standard_Real pscal11 = nor1.Dot(fic1);
422 Standard_Real pscal22 = nor2.Dot(fic2);
423 Standard_Real pscal33 = nor3.Dot(fic3);
424 if (pscal11 <= 0.) { signe1 = -1; }
425 if (pscal22 <= 0.) { signe2 = -1; }
426 if (pscal33 <= 0.) { signe3 = -1; }
427
428// Fonctions Fui.
429// ==============
430 Fval(1) = signe1*nor1.Dot(p1p2)+signe2*nor2.Dot(p1p2);
431 Fval(2) = signe2*nor2.Dot(p2p3)+signe3*nor3.Dot(p2p3);
432 Fval(3) = signe3*nor3.Dot(p3p1)+signe1*nor1.Dot(p3p1);
433// Derivees dFui/uj 1 <= ui <= 3 , 1 <= uj <= 3
434// =============================================
435 Standard_Real partie1,partie2;
436 if (nnor1 <= gp::Resolution()) { partie1 = 0.; }
437 else { partie1 = signe1*(NorD21/nnor1-(Nor1.Dot(NorD21)/(nnor1*nnor1*nnor1))
438 *Nor1).Dot(p1p2); }
439 if (NorP1P2 <= gp::Resolution()) { partie2 = 0.; }
440 else {partie2=((Deriv1u1.Dot(p1p2)/(NorP1P2*NorP1P2))*P1P2-Deriv1u1/NorP1P2)
441 .Dot(signe1*nor1+signe2*nor2); }
442 Deriv(1,1) = partie1 + partie2;
443 if (nnor2 <= gp::Resolution()) { partie1 = 0.; }
444 else { partie1=signe2*(NorD22/(nnor2)-(Nor2.Dot(NorD22)/(nnor2*nnor2*nnor2))
445 *Nor2).Dot(p1p2); }
446 if (NorP1P2 <= gp::Resolution()) { partie2 = 0.; }
447 else{partie2=((-Deriv1u2.Dot(p1p2)/(NorP1P2*NorP1P2))*P1P2+Deriv1u2/NorP1P2)
448 .Dot(signe1*nor1+signe2*nor2); }
449 Deriv(1,2) = partie1 + partie2;
450 Deriv(1,3) = 0.;
451 Deriv(2,1) = 0.;
452 if (nnor2 <= gp::Resolution()) { partie1 = 0.; }
453 else { partie1=signe2*(NorD22/(nnor2)-(Nor2.Dot(NorD22)/(nnor2*nnor2*nnor2))
454 *Nor2).Dot(p2p3); }
455 if (NorP2P3 <= gp::Resolution()) { partie2 = 0.; }
456 else { partie2=((Deriv1u2.Dot(p2p3)/(NorP2P3*NorP2P3))*P2P3-Deriv1u2/NorP2P3)
457 .Dot(signe2*nor2+signe3*nor3); }
458 Deriv(2,2) = partie1 +partie2;
459 if (nnor3 <= gp::Resolution()) { partie1 = 0.; }
460 else { partie1=signe3*(NorD23/(nnor3)-(Nor3.Dot(NorD23)/(nnor3*nnor3*nnor3))
461 *Nor3).Dot(p2p3); }
462 if (NorP2P3 <= gp::Resolution()) { partie2 = 0.; }
463 else {partie2=((-Deriv1u3.Dot(p2p3)/(NorP2P3*NorP2P3))*P2P3+Deriv1u3/NorP2P3)
464 .Dot(signe2*nor2+signe3*nor3); }
465 Deriv(2,3) = partie1 + partie2;
466 if (nnor1 <= gp::Resolution()) { partie1 = 0.; }
467 else { partie1 =signe1*(NorD21/(nnor1)-(Nor1.Dot(NorD21)/(nnor1*nnor1*nnor1))
468 *Nor1).Dot(p3p1); }
469 if (NorP3P1 <= gp::Resolution()) { partie2 = 0.; }
470 else {partie2=((-Deriv1u1.Dot(p3p1)/(NorP3P1*NorP3P1))*P3P1+Deriv1u1/NorP3P1)
471 .Dot(signe1*nor1+signe3*nor3); }
472 Deriv(3,1) = partie1 + partie2;
473 Deriv(3,2) = 0.;
474 if (nnor3 <= gp::Resolution()) { partie1 = 0.; }
475 else { partie1=signe3*(NorD23/(nnor3)-(Nor3.Dot(NorD23)/(nnor3*nnor3*nnor3))
476 *Nor3).Dot(p3p1); }
477 if (NorP3P1 <= gp::Resolution()) { partie2 = 0.; }
478 else {partie2=((Deriv1u3.Dot(p3p1)/(NorP3P1*NorP3P1))*P3P1-Deriv1u3/NorP3P1)
479 .Dot(signe1*nor1+signe3*nor3); }
480 Deriv(3,3) = partie1+partie2;
481#endif
482 return Standard_True;
483}
484
485