b311480e |
1 | // Created on: 1993-12-02 |
2 | // Created by: Jacques GOUSSARD |
3 | // Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
d5f74e42 |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
7fd59977 |
16 | |
7fd59977 |
17 | |
42cf5bc1 |
18 | #include <Adaptor2d_HCurve2d.hxx> |
19 | #include <Adaptor3d_HCurve.hxx> |
20 | #include <Adaptor3d_HSurface.hxx> |
21 | #include <BlendFunc_RuledInv.hxx> |
22 | #include <math_Matrix.hxx> |
7fd59977 |
23 | #include <Precision.hxx> |
24 | |
25 | BlendFunc_RuledInv::BlendFunc_RuledInv(const Handle(Adaptor3d_HSurface)& S1, |
26 | const Handle(Adaptor3d_HSurface)& S2, |
27 | const Handle(Adaptor3d_HCurve)& C) : |
28 | surf1(S1),surf2(S2),curv(C) |
29 | {} |
30 | |
31 | void BlendFunc_RuledInv::Set(const Standard_Boolean OnFirst, |
32 | const Handle(Adaptor2d_HCurve2d)& C) |
33 | { |
34 | first = OnFirst; |
35 | csurf = C; |
36 | } |
37 | |
38 | Standard_Integer BlendFunc_RuledInv::NbEquations () const |
39 | { |
40 | return 4; |
41 | } |
42 | |
43 | void BlendFunc_RuledInv::GetTolerance(math_Vector& Tolerance, |
44 | const Standard_Real Tol) const |
45 | { |
46 | Tolerance(1) = csurf->Resolution(Tol); |
47 | Tolerance(2) = curv->Resolution(Tol); |
48 | if (first) { |
49 | Tolerance(3) = surf2->UResolution(Tol); |
50 | Tolerance(4) = surf2->VResolution(Tol); |
51 | } |
52 | else { |
53 | Tolerance(3) = surf1->UResolution(Tol); |
54 | Tolerance(4) = surf1->VResolution(Tol); |
55 | } |
56 | } |
57 | |
58 | void BlendFunc_RuledInv::GetBounds(math_Vector& InfBound, |
59 | math_Vector& SupBound) const |
60 | { |
61 | InfBound(1) = csurf->FirstParameter(); |
62 | InfBound(2) = curv->FirstParameter(); |
63 | SupBound(1) = csurf->LastParameter(); |
64 | SupBound(2) = curv->LastParameter(); |
65 | |
66 | if (first) { |
67 | InfBound(3) = surf2->FirstUParameter(); |
68 | InfBound(4) = surf2->FirstVParameter(); |
69 | SupBound(3) = surf2->LastUParameter(); |
70 | SupBound(4) = surf2->LastVParameter(); |
71 | if(!Precision::IsInfinite(InfBound(3)) && |
72 | !Precision::IsInfinite(SupBound(3))) { |
73 | const Standard_Real range = (SupBound(3) - InfBound(3)); |
74 | InfBound(3) -= range; |
75 | SupBound(3) += range; |
76 | } |
77 | if(!Precision::IsInfinite(InfBound(4)) && |
78 | !Precision::IsInfinite(SupBound(4))) { |
79 | const Standard_Real range = (SupBound(4) - InfBound(4)); |
80 | InfBound(4) -= range; |
81 | SupBound(4) += range; |
82 | } |
83 | } |
84 | else { |
85 | InfBound(3) = surf1->FirstUParameter(); |
86 | InfBound(4) = surf1->FirstVParameter(); |
87 | SupBound(3) = surf1->LastUParameter(); |
88 | SupBound(4) = surf1->LastVParameter(); |
89 | if(!Precision::IsInfinite(InfBound(3)) && |
90 | !Precision::IsInfinite(SupBound(3))) { |
91 | const Standard_Real range = (SupBound(3) - InfBound(3)); |
92 | InfBound(3) -= range; |
93 | SupBound(3) += range; |
94 | } |
95 | if(!Precision::IsInfinite(InfBound(4)) && |
96 | !Precision::IsInfinite(SupBound(4))) { |
97 | const Standard_Real range = (SupBound(4) - InfBound(4)); |
98 | InfBound(4) -= range; |
99 | SupBound(4) += range; |
100 | } |
101 | } |
102 | } |
103 | |
104 | Standard_Boolean BlendFunc_RuledInv::IsSolution(const math_Vector& Sol, |
105 | const Standard_Real Tol) |
106 | { |
107 | math_Vector valsol(1,4); |
108 | Value(Sol,valsol); |
109 | if (Abs(valsol(1)) <= Tol && |
110 | Abs(valsol(2)) <= Tol && |
111 | Abs(valsol(3)) <= Tol && |
112 | Abs(valsol(4)) <= Tol) |
113 | return Standard_True; |
114 | |
115 | return Standard_False; |
116 | } |
117 | |
118 | |
119 | Standard_Boolean BlendFunc_RuledInv::Value(const math_Vector& X, |
120 | math_Vector& F) |
121 | { |
122 | gp_Pnt ptcur; |
123 | gp_Vec d1cur; |
124 | curv->D1(X(2),ptcur,d1cur); |
125 | |
126 | const gp_XYZ nplan = d1cur.Normalized().XYZ(); |
127 | const Standard_Real theD = -(nplan.Dot(ptcur.XYZ())); |
128 | const gp_Pnt2d pt2d(csurf->Value(X(1))); |
129 | |
130 | gp_Pnt pts1,pts2; |
131 | gp_Vec d1u1,d1v1,d1u2,d1v2; |
132 | if (first) |
133 | { |
134 | surf1->D1(pt2d.X(),pt2d.Y(),pts1,d1u1,d1v1); |
135 | surf2->D1(X(3),X(4),pts2,d1u2,d1v2); |
136 | } |
137 | else |
138 | { |
139 | surf1->D1(X(3),X(4),pts1,d1u1,d1v1); |
140 | surf2->D1(pt2d.X(),pt2d.Y(),pts2,d1u2,d1v2); |
141 | } |
142 | |
143 | const gp_XYZ temp(pts2.XYZ()-pts1.XYZ()); |
144 | |
145 | gp_XYZ ns1 = d1u1.Crossed(d1v1).XYZ(); |
146 | gp_XYZ ns2 = d1u2.Crossed(d1v2).XYZ(); |
147 | const Standard_Real norm1 = nplan.Crossed(ns1).Modulus(); |
148 | const Standard_Real norm2 = nplan.Crossed(ns2).Modulus(); |
149 | ns1.SetLinearForm(nplan.Dot(ns1)/norm1,nplan, -1./norm1,ns1); |
150 | ns2.SetLinearForm(nplan.Dot(ns2)/norm2,nplan, -1./norm2,ns2); |
151 | |
152 | F(1) = (nplan.Dot(pts1.XYZ())) + theD; |
153 | F(2) = (nplan.Dot(pts2.XYZ())) + theD; |
154 | |
155 | F(3) = temp.Dot(ns1); |
156 | F(4) = temp.Dot(ns2); |
157 | |
158 | return Standard_True; |
159 | } |
160 | |
161 | Standard_Boolean BlendFunc_RuledInv::Derivatives(const math_Vector& X, |
162 | math_Matrix& D) |
163 | { |
164 | gp_Pnt ptcur; |
165 | gp_Vec d1cur,d2cur; |
166 | curv->D2(X(2),ptcur,d1cur,d2cur); |
167 | |
168 | const Standard_Real normtgcur = d1cur.Magnitude(); |
169 | const gp_Vec nplan = d1cur.Normalized(); |
7fd59977 |
170 | |
171 | gp_Vec dnplan; |
172 | dnplan.SetLinearForm(-nplan.Dot(d2cur),nplan,d2cur); |
173 | dnplan /= normtgcur; |
174 | |
175 | gp_Pnt2d p2d; |
176 | gp_Vec2d v2d; |
177 | csurf->D1(X(1),p2d,v2d); |
178 | |
179 | gp_Pnt pts1,pts2; |
180 | gp_Vec d1u1,d1v1,d1u2,d1v2; |
181 | gp_Vec d2u1,d2v1,d2u2,d2v2,d2uv1,d2uv2; |
182 | gp_Vec dpdt, p1p2; |
183 | if (first) |
184 | { |
185 | surf1->D2(p2d.X(),p2d.Y(),pts1,d1u1,d1v1,d2u1,d2v1,d2uv1); |
186 | surf2->D2(X(3),X(4),pts2,d1u2,d1v2,d2u2,d2v2,d2uv2); |
187 | dpdt.SetLinearForm(v2d.X(),d1u1,v2d.Y(),d1v1); |
188 | p1p2 = gp_Vec(pts1,pts2); |
189 | D(1,1) = dpdt.Dot(nplan); |
190 | D(1,2) = dnplan.XYZ().Dot(pts1.XYZ()-ptcur.XYZ()) - normtgcur; |
191 | D(1,3) = 0.; |
192 | D(1,4) = 0.; |
193 | |
194 | D(2,1) = 0.; |
195 | D(2,2) = dnplan.XYZ().Dot(pts2.XYZ()-ptcur.XYZ()) - normtgcur; |
196 | D(2,3) = d1u2.Dot(nplan); |
197 | D(2,4) = d1v2.Dot(nplan); |
198 | } |
199 | else |
200 | { |
201 | surf1->D2(X(3),X(4),pts1,d1u1,d1v1,d2u1,d2v1,d2uv1); |
202 | surf2->D2(p2d.X(),p2d.Y(),pts2,d1u2,d1v2,d2u2,d2v2,d2uv2); |
203 | dpdt.SetLinearForm(v2d.X(),d1u2,v2d.Y(),d1v2); |
204 | p1p2 = gp_Vec(pts1,pts2); |
205 | D(1,1) = 0.; |
206 | D(1,2) = dnplan.XYZ().Dot(pts1.XYZ()-ptcur.XYZ()) - normtgcur; |
207 | D(1,3) = d1u1.Dot(nplan); |
208 | D(1,4) = d1v1.Dot(nplan); |
209 | |
210 | D(2,1) = dpdt.Dot(nplan); |
211 | D(2,2) = dnplan.XYZ().Dot(pts2.XYZ()-ptcur.XYZ()) - normtgcur; |
212 | D(2,3) = 0.; |
213 | D(2,4) = 0.; |
214 | } |
215 | |
216 | const gp_Vec ns1 = d1u1.Crossed(d1v1); |
217 | const gp_Vec ns2 = d1u2.Crossed(d1v2); |
218 | const gp_Vec ncrossns1 = nplan.Crossed(ns1); |
219 | const gp_Vec ncrossns2 = nplan.Crossed(ns2); |
220 | const Standard_Real norm1 = ncrossns1.Magnitude(); |
221 | const Standard_Real norm2 = ncrossns2.Magnitude(); |
222 | |
223 | const Standard_Real ndotns1 = nplan.Dot(ns1); |
224 | const Standard_Real ndotns2 = nplan.Dot(ns2); |
225 | |
226 | gp_Vec nor1,nor2; |
227 | nor1.SetLinearForm(ndotns1/norm1,nplan,-1./norm1,ns1); |
228 | nor2.SetLinearForm(ndotns2/norm2,nplan,-1./norm2,ns2); |
229 | |
230 | if (first) { |
231 | D(3,3) = d1u2.Dot(nor1); |
232 | D(3,4) = d1v2.Dot(nor1); |
233 | |
234 | D(4,1) = -(dpdt.Dot(nor2)); |
235 | } |
236 | else { |
237 | D(3,1) = dpdt.Dot(nor1); |
238 | |
239 | D(4,3) = -(d1u1.Dot(nor2)); |
240 | D(4,4) = -(d1v1.Dot(nor2)); |
241 | } |
242 | |
243 | gp_Vec resul1,resul2,temp; |
244 | Standard_Real grosterme; |
245 | |
246 | // Derivee de nor1 par rapport a u1 |
247 | |
248 | temp = d2u1.Crossed(d1v1).Added(d1u1.Crossed(d2uv1)); |
249 | grosterme = ncrossns1.Dot(nplan.Crossed(temp))/norm1/norm1; |
250 | resul1.SetLinearForm(-(grosterme*ndotns1-nplan.Dot(temp))/norm1,nplan, |
251 | grosterme/norm1,ns1, |
252 | -1./norm1,temp); |
253 | |
254 | // Derivee par rapport a v1 |
255 | |
256 | temp = d2uv1.Crossed(d1v1).Added(d1u1.Crossed(d2v1)); |
257 | grosterme = ncrossns1.Dot(nplan.Crossed(temp))/norm1/norm1; |
258 | resul2.SetLinearForm(-(grosterme*ndotns1-nplan.Dot(temp))/norm1,nplan, |
259 | grosterme/norm1,ns1, |
260 | -1./norm1,temp); |
261 | |
262 | if (first) { |
263 | resul1.SetLinearForm(v2d.X(),resul1,v2d.Y(),resul2); |
264 | D(3,1) = p1p2.Dot(resul1) - (dpdt.Dot(nor1)); |
265 | } |
266 | else { |
267 | D(3,3) = -(d1u1.Dot(nor1)) + p1p2.Dot(resul1); |
268 | D(3,4) = -(d1v1.Dot(nor1)) + p1p2.Dot(resul2); |
269 | } |
270 | |
271 | // Derivee de nor2 par rapport a u2 |
272 | temp = d2u2.Crossed(d1v2).Added(d1u2.Crossed(d2uv2)); |
273 | grosterme = ncrossns2.Dot(nplan.Crossed(temp))/norm2/norm2; |
274 | resul1.SetLinearForm(-(grosterme*ndotns2-nplan.Dot(temp))/norm2,nplan, |
275 | grosterme/norm2,ns2, |
276 | -1./norm2,temp); |
277 | |
278 | // Derivee par rapport a v2 |
279 | temp = d2uv2.Crossed(d1v2).Added(d1u2.Crossed(d2v2)); |
280 | grosterme = ncrossns2.Dot(nplan.Crossed(temp))/norm2/norm2; |
281 | resul2.SetLinearForm(-(grosterme*ndotns2-nplan.Dot(temp))/norm2,nplan, |
282 | grosterme/norm2,ns2, |
283 | -1./norm2,temp); |
284 | |
285 | if (first) { |
286 | D(4,3) = d1u2.Dot(nor2) + p1p2.Dot(resul1); |
287 | D(4,4) = d1v2.Dot(nor2) + p1p2.Dot(resul2); |
288 | } |
289 | else { |
290 | resul1.SetLinearForm(v2d.X(),resul1,v2d.Y(),resul2); |
291 | D(4,1) = p1p2.Dot(resul1) + dpdt.Dot(nor2) ; |
292 | } |
293 | |
294 | |
295 | // derivee par rapport a w (parametre sur ligne guide) |
296 | |
297 | grosterme = ncrossns1.Dot(dnplan.Crossed(ns1))/norm1/norm1; |
298 | resul1.SetLinearForm(-(grosterme*ndotns1-dnplan.Dot(ns1))/norm1,nplan, |
299 | ndotns1/norm1,dnplan, |
300 | grosterme/norm1,ns1); |
301 | |
302 | |
303 | grosterme = ncrossns2.Dot(dnplan.Crossed(ns2))/norm2/norm2; |
304 | resul2.SetLinearForm(-(grosterme*ndotns2-dnplan.Dot(ns2))/norm2,nplan, |
305 | ndotns2/norm2,dnplan, |
306 | grosterme/norm2,ns2); |
307 | |
308 | D(3,2) = p1p2.Dot(resul1); |
309 | D(4,2) = p1p2.Dot(resul2); |
310 | |
311 | return Standard_True; |
312 | } |
313 | |
314 | |
315 | Standard_Boolean BlendFunc_RuledInv::Values(const math_Vector& X, |
316 | math_Vector& F, |
317 | math_Matrix& D) |
318 | { |
319 | gp_Pnt ptcur; |
320 | gp_Vec d1cur,d2cur; |
321 | curv->D2(X(2),ptcur,d1cur,d2cur); |
322 | |
323 | const Standard_Real normtgcur = d1cur.Magnitude(); |
324 | const gp_Vec nplan = d1cur.Normalized(); |
325 | const Standard_Real theD = -(nplan.XYZ().Dot(ptcur.XYZ())); |
326 | |
327 | gp_Vec dnplan; |
328 | dnplan.SetLinearForm(-nplan.Dot(d2cur),nplan,d2cur); |
329 | dnplan /= normtgcur; |
330 | |
331 | gp_Pnt2d p2d; |
332 | gp_Vec2d v2d; |
333 | csurf->D1(X(1),p2d,v2d); |
334 | |
335 | gp_Pnt pts1,pts2; |
336 | gp_Vec d1u1,d1v1,d1u2,d1v2; |
337 | gp_Vec d2u1,d2v1,d2u2,d2v2,d2uv1,d2uv2; |
338 | gp_Vec dpdt,p1p2; |
339 | if (first) |
340 | { |
341 | surf1->D2(p2d.X(),p2d.Y(),pts1,d1u1,d1v1,d2u1,d2v1,d2uv1); |
342 | surf2->D2(X(3),X(4),pts2,d1u2,d1v2,d2u2,d2v2,d2uv2); |
343 | dpdt.SetLinearForm(v2d.X(),d1u1,v2d.Y(),d1v1); |
344 | p1p2 = gp_Vec(pts1,pts2); |
345 | D(1,1) = dpdt.Dot(nplan); |
346 | D(1,2) = dnplan.XYZ().Dot(pts1.XYZ()-ptcur.XYZ()) - normtgcur; |
347 | D(1,3) = 0.; |
348 | D(1,4) = 0.; |
349 | |
350 | D(2,1) = 0.; |
351 | D(2,2) = dnplan.XYZ().Dot(pts2.XYZ()-ptcur.XYZ()) - normtgcur; |
352 | D(2,3) = d1u2.Dot(nplan); |
353 | D(2,4) = d1v2.Dot(nplan); |
354 | } |
355 | else |
356 | { |
357 | surf1->D2(X(3),X(4),pts1,d1u1,d1v1,d2u1,d2v1,d2uv1); |
358 | surf2->D2(p2d.X(),p2d.Y(),pts2,d1u2,d1v2,d2u2,d2v2,d2uv2); |
359 | dpdt.SetLinearForm(v2d.X(),d1u2,v2d.Y(),d1v2); |
360 | p1p2 = gp_Vec(pts1,pts2); |
361 | D(1,1) = 0.; |
362 | D(1,2) = dnplan.XYZ().Dot(pts1.XYZ()-ptcur.XYZ()) - normtgcur; |
363 | D(1,3) = d1u1.Dot(nplan); |
364 | D(1,4) = d1v1.Dot(nplan); |
365 | |
366 | D(2,1) = dpdt.Dot(nplan); |
367 | D(2,2) = dnplan.XYZ().Dot(pts2.XYZ()-ptcur.XYZ()) - normtgcur; |
368 | D(2,3) = 0.; |
369 | D(2,4) = 0.; |
370 | } |
371 | |
372 | const gp_Vec ns1 = d1u1.Crossed(d1v1); |
373 | const gp_Vec ns2 = d1u2.Crossed(d1v2); |
374 | const gp_Vec ncrossns1 = nplan.Crossed(ns1); |
375 | const gp_Vec ncrossns2 = nplan.Crossed(ns2); |
376 | const Standard_Real norm1 = ncrossns1.Magnitude(); |
377 | const Standard_Real norm2 = ncrossns2.Magnitude(); |
378 | |
379 | const Standard_Real ndotns1 = nplan.Dot(ns1); |
380 | const Standard_Real ndotns2 = nplan.Dot(ns2); |
381 | |
382 | gp_Vec nor1,nor2; |
383 | nor1.SetLinearForm(ndotns1/norm1,nplan,-1./norm1,ns1); |
384 | nor2.SetLinearForm(ndotns2/norm2,nplan,-1./norm2,ns2); |
385 | |
386 | F(1) = (nplan.Dot(pts1.XYZ())) + theD; |
387 | F(2) = (nplan.Dot(pts2.XYZ())) + theD; |
388 | |
389 | F(3) = p1p2.Dot(nor1); |
390 | F(4) = p1p2.Dot(nor2); |
391 | |
392 | if (first) { |
393 | D(3,3) = d1u2.Dot(nor1); |
394 | D(3,4) = d1v2.Dot(nor1); |
395 | |
396 | D(4,1) = -(dpdt.Dot(nor2)); |
397 | } |
398 | else { |
399 | D(3,1) = dpdt.Dot(nor1); |
400 | |
401 | D(4,3) = -(d1u1.Dot(nor2)); |
402 | D(4,4) = -(d1v1.Dot(nor2)); |
403 | } |
404 | |
405 | gp_Vec resul1,resul2,temp; |
406 | Standard_Real grosterme; |
407 | |
408 | // Derivee de nor1 par rapport a u1 |
409 | |
410 | temp = d2u1.Crossed(d1v1).Added(d1u1.Crossed(d2uv1)); |
411 | grosterme = ncrossns1.Dot(nplan.Crossed(temp))/norm1/norm1; |
412 | resul1.SetLinearForm(-(grosterme*ndotns1-nplan.Dot(temp))/norm1,nplan, |
413 | grosterme/norm1,ns1, |
414 | -1./norm1,temp); |
415 | |
416 | // Derivee par rapport a v1 |
417 | |
418 | temp = d2uv1.Crossed(d1v1).Added(d1u1.Crossed(d2v1)); |
419 | grosterme = ncrossns1.Dot(nplan.Crossed(temp))/norm1/norm1; |
420 | resul2.SetLinearForm(-(grosterme*ndotns1-nplan.Dot(temp))/norm1,nplan, |
421 | grosterme/norm1,ns1, |
422 | -1./norm1,temp); |
423 | |
424 | if (first) { |
425 | resul1.SetLinearForm(v2d.X(),resul1,v2d.Y(),resul2); |
426 | D(3,1) = p1p2.Dot(resul1) - (dpdt.Dot(nor1)); |
427 | } |
428 | else { |
429 | D(3,3) = -(d1u1.Dot(nor1)) + p1p2.Dot(resul1); |
430 | D(3,4) = -(d1v1.Dot(nor1)) + p1p2.Dot(resul2); |
431 | } |
432 | |
433 | // Derivee de nor2 par rapport a u2 |
434 | temp = d2u2.Crossed(d1v2).Added(d1u2.Crossed(d2uv2)); |
435 | grosterme = ncrossns2.Dot(nplan.Crossed(temp))/norm2/norm2; |
436 | resul1.SetLinearForm(-(grosterme*ndotns2-nplan.Dot(temp))/norm2,nplan, |
437 | grosterme/norm2,ns2, |
438 | -1./norm2,temp); |
439 | |
440 | // Derivee par rapport a v2 |
441 | temp = d2uv2.Crossed(d1v2).Added(d1u2.Crossed(d2v2)); |
442 | grosterme = ncrossns2.Dot(nplan.Crossed(temp))/norm2/norm2; |
443 | resul2.SetLinearForm(-(grosterme*ndotns2-nplan.Dot(temp))/norm2,nplan, |
444 | grosterme/norm2,ns2, |
445 | -1./norm2,temp); |
446 | |
447 | if (first) { |
448 | D(4,3) = d1u2.Dot(nor2) + p1p2.Dot(resul1); |
449 | D(4,4) = d1v2.Dot(nor2) + p1p2.Dot(resul2); |
450 | } |
451 | else { |
452 | resul1.SetLinearForm(v2d.X(),resul1,v2d.Y(),resul2); |
453 | D(4,1) = p1p2.Dot(resul1) + dpdt.Dot(nor2) ; |
454 | } |
455 | |
456 | |
457 | // derivee par rapport a w (parametre sur ligne guide) |
458 | |
459 | grosterme = ncrossns1.Dot(dnplan.Crossed(ns1))/norm1/norm1; |
460 | resul1.SetLinearForm(-(grosterme*ndotns1-dnplan.Dot(ns1))/norm1,nplan, |
461 | ndotns1/norm1,dnplan, |
462 | grosterme/norm1,ns1); |
463 | |
464 | |
465 | grosterme = ncrossns2.Dot(dnplan.Crossed(ns2))/norm2/norm2; |
466 | resul2.SetLinearForm(-(grosterme*ndotns2-dnplan.Dot(ns2))/norm2,nplan, |
467 | ndotns2/norm2,dnplan, |
468 | grosterme/norm2,ns2); |
469 | |
470 | D(3,2) = p1p2.Dot(resul1); |
471 | D(4,2) = p1p2.Dot(resul2); |
472 | |
473 | return Standard_True; |
474 | } |