0023145: Suspicious else (2)
[occt.git] / src / LocalAnalysis / LocalAnalysis_SurfaceContinuity.cxx
1 // Created on: 1996-09-09
2 // Created by: Herve LOUESSARD
3 // Copyright (c) 1996-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
21
22
23 #include <LocalAnalysis_SurfaceContinuity.ixx>
24 #include <GeomLProp_SLProps.hxx>
25 #include <gp.hxx>
26 #include <gp_Pnt.hxx>
27 #include <gp_Vec.hxx>
28 #include <gp_Dir.hxx>
29 #include <gp_Pnt2d.hxx>
30 #include <Geom_Surface.hxx>
31 #include <Geom2d_Curve.hxx>
32
33
34 /*********************************************************************************/
35 /*********************************************************************************/
36
37 void LocalAnalysis_SurfaceContinuity::SurfC0 (const GeomLProp_SLProps& Surf1, 
38                                                const GeomLProp_SLProps& Surf2
39                                                )  
40 {  myContC0=(Surf1.Value()).Distance(Surf2.Value());
41 }
42
43 /*********************************************************************************/
44
45 void LocalAnalysis_SurfaceContinuity::SurfC1(  GeomLProp_SLProps& Surf1, 
46                                        GeomLProp_SLProps & Surf2) 
47 { gp_Vec V1u, V2u, V1v, V2v;
48   Standard_Real norm1u, norm2u, norm1v, norm2v,angu,angv; 
49   
50   V1u = Surf1.D1U();
51   V2u = Surf2.D1U();
52
53   V1v = Surf1.D1V();
54   V2v = Surf2.D1V();
55
56   norm1u = V1u.Magnitude();
57   norm2u = V2u.Magnitude();
58   norm1v = V1v.Magnitude();
59   norm2v = V2v.Magnitude();
60
61   if ((norm1u>myepsnul )&&(norm2u>myepsnul )&&(norm1v>myepsnul)
62        &&(norm2v>myepsnul))
63     { if (norm1u >= norm2u ) 
64          myLambda1U= norm2u / norm1u;
65       else myLambda1U = norm1u / norm2u;
66       if (norm1v >= norm2v ) 
67          myLambda1V= norm2v / norm1v;
68       else myLambda1V = norm1v / norm2v;
69       angu= V1u.Angle(V2u);
70       if (angu>M_PI/2) myContC1U=M_PI-angu;
71       else myContC1U=angu;
72       angv= V1v.Angle(V2v);
73       if (angv>M_PI/2) myContC1V=M_PI-angv;
74        else myContC1V=angv;   }
75   else {myIsDone = Standard_False;  
76         myErrorStatus=LocalAnalysis_NullFirstDerivative;}
77 }
78
79 /*********************************************************************************/
80
81 void LocalAnalysis_SurfaceContinuity::SurfC2(  GeomLProp_SLProps& Surf1, 
82                                                GeomLProp_SLProps& Surf2)
83
84 { gp_Vec V11u, V12u, V21u, V22u, V11v, V12v, V21v, V22v;
85   Standard_Real norm11u, norm12u, norm21u, norm22u, norm11v, norm12v, norm21v, norm22v;
86   Standard_Real ang;
87   V11u = Surf1.D1U();
88   V12u = Surf2.D1U();
89   V21u = Surf1.D2U();
90   V22u = Surf2.D2U();
91   norm11u = V11u.Magnitude();
92   norm12u = V12u.Magnitude();
93   norm21u = V21u.Magnitude();
94   norm22u = V22u.Magnitude();
95
96   if ((norm11u>myepsnul)&&(norm12u>myepsnul))
97      { if( (norm21u>myepsnul)&&(norm22u>myepsnul))
98           { if (norm11u >= norm12u ) 
99                 {myLambda1U= norm12u / norm11u;
100                  myLambda2U = norm22u /norm21u;}
101             else {myLambda1U = norm11u / norm12u;
102                   myLambda2U = norm21u / norm22u;}
103             ang=V21u.Angle(V22u);
104             if(ang>M_PI/2) myContC2U=M_PI-ang;
105             else myContC2U=ang; }
106        else
107           {  myIsDone=Standard_False;
108             myErrorStatus=LocalAnalysis_NullSecondDerivative;}
109      }
110    
111    else { myIsDone=Standard_False; 
112           myErrorStatus=LocalAnalysis_NullFirstDerivative;}
113
114   V11v = Surf1.D1V();
115   V12v = Surf2.D1V();
116   V21v = Surf1.D2V();
117   V22v = Surf2.D2V();
118   norm11v = V11v.Magnitude();
119   norm12v = V12v.Magnitude();
120   norm21v = V21v.Magnitude();
121   norm22v = V22v.Magnitude();
122
123   if ((norm11v>myepsnul)&&(norm12v>myepsnul))
124      {if ((norm21v>myepsnul)&&(norm22v>myepsnul))
125          {if ( norm11v >= norm12v ) 
126              {myLambda1V= norm12v / norm11v;
127               myLambda2V= norm22v / norm21v;}       
128           else{ myLambda1V = norm11v / norm12v;
129                 myLambda2V = norm21v / norm22v;}
130           ang= V21v.Angle(V22v);
131           if (ang>M_PI/2)  myContC2V=M_PI-ang;
132           else myContC2V=ang;
133          }
134       else{ myIsDone= Standard_False;
135             myErrorStatus=LocalAnalysis_NullSecondDerivative; }
136     }
137    else{ myIsDone=Standard_False;
138          myErrorStatus=LocalAnalysis_NullFirstDerivative;}
139 }
140
141 /*********************************************************************************/
142 void LocalAnalysis_SurfaceContinuity::SurfG1(  GeomLProp_SLProps& Surf1, 
143                                                 GeomLProp_SLProps& Surf2) 
144 { if (Surf1.IsNormalDefined()&&Surf2.IsNormalDefined()) 
145   { gp_Dir D1 = Surf1.Normal();
146     gp_Dir D2 = Surf2.Normal();
147     Standard_Real ang=D1.Angle(D2);
148     if (ang>M_PI/2)  myContG1= M_PI-ang;
149     else  myContG1=ang; 
150   }
151   else{ myIsDone=Standard_False;
152         myErrorStatus=LocalAnalysis_NormalNotDefined;} 
153 }
154
155 /*********************************************************************************/
156
157 void   LocalAnalysis_SurfaceContinuity::SurfG2 ( GeomLProp_SLProps& Surf1, 
158                                           GeomLProp_SLProps & Surf2)
159 { gp_Dir DMIN1, DMIN2, DMAX1, DMAX2;
160   Standard_Real RMIN1,RMIN2,RMAX1,RMAX2;
161   Standard_Real  x1, x2, y1, y2, z1, z2;
162  
163   if ( Surf1.IsCurvatureDefined() && Surf2.IsCurvatureDefined())
164     { 
165       Surf1.CurvatureDirections(DMIN1, DMAX1);
166       Surf2.CurvatureDirections(DMIN2, DMAX2);
167       DMIN1.Coord(x1, y1, z1);
168       DMAX1.Coord(x2, y2, z2);
169       gp_Dir MCD1( (Abs(x1)+Abs(x2))/2, (Abs(y1)+Abs(y2))/2, (Abs(z1)+Abs(z2))/2 );
170       DMIN2.Coord(x1, y1, z1);
171       DMAX2.Coord(x2, y2, z2);
172       gp_Dir MCD2( (Abs(x1)+Abs(x2))/2, (Abs(y1)+Abs(y2))/2, (Abs(z1)+Abs(z2))/2 );
173   
174       myAlpha = MCD1.Angle( MCD2 );
175       RMIN1 = Surf1.MinCurvature();  
176       RMAX1 = Surf1.MaxCurvature();  
177       RMIN2 = Surf2.MinCurvature();  
178       RMAX2 = Surf2.MaxCurvature();
179       myETA1 = (RMIN1+RMAX1)/2;
180       myETA2 = (RMIN2+RMAX2)/2;
181       myETA  = (myETA1+myETA2)/2;
182       myZETA1 = (RMAX1-RMIN1)/2;
183       myZETA2 = (RMAX2-RMIN2)/2;
184       myZETA = (myZETA1+myZETA2)/2;
185       Standard_Real DETA,DZETA; 
186       DETA = ( myETA1- myETA2)/2;
187       DZETA =( myZETA1- myZETA2)/2;
188        myGap= Abs(DETA) + sqrt( DZETA*DZETA*Cos(myAlpha)*Cos(myAlpha)
189                      + myZETA*myZETA*Sin(myAlpha)*Sin(myAlpha));
190        }   
191    else {myIsDone = Standard_False;
192          myErrorStatus=LocalAnalysis_CurvatureNotDefined;}
193           
194 }
195 LocalAnalysis_SurfaceContinuity::LocalAnalysis_SurfaceContinuity(const Standard_Real EpsNul,
196                                                                  const Standard_Real EpsC0,
197                                                                  const Standard_Real EpsC1,
198                                                                  const Standard_Real EpsC2,
199                                                                  const Standard_Real EpsG1,
200                                                                  const Standard_Real Percent,
201                                                                  const Standard_Real Maxlen)
202 { myepsnul=EpsNul;
203   myepsC0= EpsC0;
204   myepsC1= EpsC1;
205   myepsC2= EpsC2;
206   myepsG1= EpsG1;
207   myperce= Percent;
208   mymaxlen= Maxlen;
209   myIsDone = Standard_True;
210 }
211  void LocalAnalysis_SurfaceContinuity::ComputeAnalysis(GeomLProp_SLProps& Surf1,
212                                                        GeomLProp_SLProps& Surf2,
213                                                        const GeomAbs_Shape Order)
214 {  myTypeCont = Order;
215    switch ( Order )
216         { case GeomAbs_C0 : {
217                                 SurfC0(Surf1, Surf2);
218                             }
219                             break;
220           case GeomAbs_C1 : {
221                                SurfC0(Surf1, Surf2);
222                                SurfC1(Surf1, Surf2);}
223                             break;
224           case GeomAbs_C2 : {
225                               SurfC0(Surf1, Surf2);
226                               SurfC1(Surf1, Surf2);
227                               SurfC2(Surf1, Surf2);}
228                             break;
229           case GeomAbs_G1 : {
230                               SurfC0(Surf1, Surf2);
231                               SurfG1(Surf1, Surf2);}
232                             break;
233           case GeomAbs_G2 : {
234                               SurfC0(Surf1, Surf2);
235                               SurfG1(Surf1, Surf2);
236                               SurfG2(Surf1, Surf2);}
237                             break;
238           default         : {}
239         }
240
241 }
242
243 /*********************************************************************************/
244
245 LocalAnalysis_SurfaceContinuity::LocalAnalysis_SurfaceContinuity( const Handle(Geom_Surface)& Surf1, 
246                          const Standard_Real u1, const Standard_Real v1, 
247                          const Handle(Geom_Surface)& Surf2, const Standard_Real u2, 
248                          const Standard_Real v2, const GeomAbs_Shape Ordre, 
249                          const Standard_Real EpsNul,
250                          const Standard_Real EpsC0 ,
251                          const Standard_Real EpsC1 ,
252                          const Standard_Real EpsC2,
253                          const Standard_Real EpsG1,
254                          const Standard_Real Percent,               
255                          const Standard_Real  Maxlen )
256 { myTypeCont = Ordre;
257   myepsnul=EpsNul;
258   myepsC0= EpsC0;
259   myepsC1= EpsC1;
260   myepsC2= EpsC2;
261   myepsG1= EpsG1;
262   myperce= Percent;
263   mymaxlen= Maxlen;
264   myIsDone = Standard_True;
265   switch ( Ordre )
266         { case GeomAbs_C0 : {
267                                GeomLProp_SLProps Surfa1 ( Surf1, u1, v1, 0, myepsnul);
268                                GeomLProp_SLProps Surfa2 ( Surf2, u2, v2, 0, myepsnul);
269                                 SurfC0(Surfa1, Surfa2);
270                             }
271                             break;
272           case GeomAbs_C1 : {
273                                GeomLProp_SLProps Surfa1 ( Surf1, u1, v1, 1, myepsnul); 
274                                GeomLProp_SLProps   Surfa2 ( Surf2, u2, v2, 1, myepsnul);
275                                SurfC0(Surfa1, Surfa2);
276                                SurfC1(Surfa1, Surfa2);}
277                             break;
278           case GeomAbs_C2 : {
279                                GeomLProp_SLProps Surfa1 ( Surf1, u1, v1, 2, myepsnul); 
280                                 GeomLProp_SLProps Surfa2 ( Surf2, u2, v2, 2, myepsnul);
281                               SurfC0(Surfa1, Surfa2);
282                               SurfC1(Surfa1, Surfa2);
283                               SurfC2(Surfa1, Surfa2);}
284                             break;
285           case GeomAbs_G1 : {
286                                GeomLProp_SLProps Surfa1 ( Surf1, u1, v1, 1, myepsnul); 
287                                 GeomLProp_SLProps  Surfa2 ( Surf2, u2, v2, 1, myepsnul);
288                               SurfC0(Surfa1, Surfa2);
289                               SurfG1(Surfa1, Surfa2);}
290                             break;
291           case GeomAbs_G2 : {
292                               GeomLProp_SLProps Surfa1 ( Surf1, u1, v1, 2, myepsnul); 
293                               GeomLProp_SLProps Surfa2 ( Surf2, u2, v2, 2, myepsnul);
294                               SurfC0(Surfa1, Surfa2);
295                               SurfG1(Surfa1, Surfa2);
296                               SurfG2(Surfa1, Surfa2);}
297                             break;
298           default         : {}
299         }
300 }
301
302 /*********************************************************************************/
303
304 LocalAnalysis_SurfaceContinuity::LocalAnalysis_SurfaceContinuity(const Handle(Geom2d_Curve)& curv1, 
305                          const Handle(Geom2d_Curve)& curv2, const Standard_Real U, 
306                          const Handle(Geom_Surface)& Surf1 , 
307                          const Handle(Geom_Surface)& Surf2, 
308                          const GeomAbs_Shape Ordre,
309                          const Standard_Real EpsNul,
310                          const Standard_Real EpsC0 ,
311                          const Standard_Real EpsC1 ,
312                          const Standard_Real EpsC2,
313                          const Standard_Real EpsG1,
314                          const Standard_Real Percent,               
315                          const Standard_Real  Maxlen )
316 { Standard_Real pard1, parf1, pard2, parf2, u1, v1, u2, v2;
317   
318   myTypeCont = Ordre;
319   myepsnul=EpsNul;
320   myepsC0= EpsC0;
321   myepsC1= EpsC1;
322   myepsC2= EpsC2;
323   myepsG1= EpsG1;
324   myperce= Percent;
325   mymaxlen= Maxlen;
326   myIsDone = Standard_True;
327
328   pard1 = curv1->FirstParameter();
329   pard2 = curv2->FirstParameter();
330   parf1 = curv1->LastParameter();
331   parf2 = curv2->LastParameter();
332
333
334   if (!(((U <= parf1) && (U >= pard1)) &&((U <= parf2) && (U >= pard2))) )    myIsDone = Standard_False; 
335     else 
336     { gp_Pnt2d pt1 = curv1->Value(U);
337       gp_Pnt2d pt2 = curv2->Value(U);
338        
339       pt1.Coord(u1, v1);
340       pt2.Coord(u2, v2);
341       switch ( Ordre )
342           { case GeomAbs_C0 : {
343                                  GeomLProp_SLProps Surfa1 ( Surf1, u1, v1, 0, myepsnul);
344                                  GeomLProp_SLProps Surfa2 ( Surf2, u2, v2, 0, myepsnul);
345                                  SurfC0(Surfa1, Surfa2);
346                               }
347                               break;
348             case GeomAbs_C1 : {
349                                  GeomLProp_SLProps Surfa1 ( Surf1, u1, v1, 1, myepsnul);
350                                   GeomLProp_SLProps Surfa2 ( Surf2, u2, v2, 1, myepsnul);
351                                 SurfC0(Surfa1, Surfa2);
352                                 SurfC1(Surfa1, Surfa2);}
353                               break;
354             case GeomAbs_C2 : {
355                                  GeomLProp_SLProps  Surfa1 ( Surf1, u1, v1, 2, myepsnul); 
356                                  GeomLProp_SLProps   Surfa2 ( Surf2, u2, v2, 2, myepsnul);
357                                 SurfC0(Surfa1, Surfa2);
358                                 SurfC1(Surfa1, Surfa2);
359                                 SurfC2(Surfa1, Surfa2);}
360                               break;
361             case GeomAbs_G1 : {
362                                  GeomLProp_SLProps  Surfa1 ( Surf1, u1, v1, 1, myepsnul); 
363                                  GeomLProp_SLProps Surfa2 ( Surf2, u2, v2, 1, myepsnul);
364                                  SurfC0(Surfa1, Surfa2);
365                                  SurfG1(Surfa1, Surfa2);}
366                               break;
367             case GeomAbs_G2 : {
368                                 GeomLProp_SLProps   Surfa1 ( Surf1, u1, v1, 2, myepsnul); 
369                                  GeomLProp_SLProps  Surfa2 ( Surf2, u2, v2, 2, myepsnul);
370                                 SurfC0(Surfa1, Surfa2);
371                                 SurfG1(Surfa1, Surfa2);
372                                 SurfG2(Surfa1, Surfa2);}
373                               break;
374             default         : {}
375           }
376     }
377 }
378
379 /*********************************************************************************/
380
381 Standard_Boolean LocalAnalysis_SurfaceContinuity::IsC0() const 
382 { if (!myIsDone) { StdFail_NotDone::Raise();}
383   if ( myContC0 <= myepsC0 ) 
384      return Standard_True;
385      else return Standard_False;
386 }
387
388 /*********************************************************************************/
389
390 Standard_Boolean LocalAnalysis_SurfaceContinuity::IsC1() const 
391 { if (!myIsDone) { StdFail_NotDone::Raise();}
392   if ( IsC0 () && (myContC1U <= myepsC1) && (myContC1V <= myepsC1))
393    return Standard_True;
394   else return Standard_False;
395 }
396
397 /*********************************************************************************/
398
399 Standard_Boolean LocalAnalysis_SurfaceContinuity::IsC2() const 
400 { Standard_Real eps1u, eps1v, eps2u, eps2v;
401
402   if (!myIsDone) { StdFail_NotDone::Raise();}
403   if ( IsC1())
404      { eps1u = 0.5*myepsC1*myepsC1*myLambda1U;
405        eps1v = 0.5*myepsC1*myepsC1*myLambda1V;
406        eps2u = 0.5*myepsC2*myepsC2*myLambda2U;
407        eps2v = 0.5*myepsC2*myepsC2*myLambda2V;
408        if ((myContC2U < myepsC2) && (myContC2V < myepsC2))
409           { if (Abs(myLambda1U*myLambda1U-myLambda2U) <= (eps1u*eps1u+eps2u))
410                if (Abs(myLambda1V*myLambda1V-myLambda2V) <= (eps1v*eps1v+eps2v))
411                   return Standard_True;
412                else return  Standard_False;
413             else return  Standard_False;
414           }
415           else return  Standard_False;        
416      }
417      else return Standard_False;
418     
419 }
420
421 /*********************************************************************************/
422
423 Standard_Boolean LocalAnalysis_SurfaceContinuity::IsG1() const 
424 {
425   if (!myIsDone) { StdFail_NotDone::Raise();} 
426   if ( IsC0 () &&( myContG1 <= myepsG1))
427        return Standard_True;
428       else return Standard_False;
429 }
430
431 /*********************************************************************************/
432
433 Standard_Boolean LocalAnalysis_SurfaceContinuity::IsG2()const 
434 { Standard_Real EPSNL;
435   Standard_Integer itype;
436  
437   if (!myIsDone) { StdFail_NotDone::Raise();} 
438   itype =0;
439   EPSNL= 8*myepsC0/(mymaxlen*mymaxlen);
440   if ( IsG1())
441      { if ( ( Abs(myETA)< EPSNL) && ( Abs(myZETA)< EPSNL))
442           return Standard_True;
443         if ( ( Abs(myZETA1)< EPSNL) && ( Abs(myZETA2)< EPSNL))
444            itype =1;
445            else if ( ( Abs(myETA1)< EPSNL) && ( Abs(myETA2)< EPSNL))
446                    itype =1;
447                    else if ((Abs(Abs(myZETA)-Abs(myETA))) < EPSNL)
448                            itype =1;
449                            else if ((myETA1<myZETA1)&&(myETA2<myZETA2))
450                                    itype =1; 
451                                    else if ((myETA1>myZETA1)&&(myETA2>myZETA2))
452                                            itype =1; 
453        if (itype == 1)
454           { 
455
456             if (( myETA >= (2*myZETA))&&(myGap<=(myperce*(myETA-myZETA)))) return Standard_True;
457             if (( myZETA>= myETA) && ( myGap<= (myperce*myZETA))) return Standard_True;
458             if (( myZETA<= myETA) && ( myETA <= (2*myZETA)) && (myGap <= (myperce * myETA))) 
459                return Standard_True;
460                else  return Standard_False;
461                     
462           }
463           else  return Standard_False;
464      }
465      else return Standard_False;
466
467 }
468
469   
470 /*********************************************************************************/
471
472 GeomAbs_Shape  LocalAnalysis_SurfaceContinuity::ContinuityStatus() const 
473 {
474  if (!myIsDone) { StdFail_NotDone::Raise();}
475  return (myTypeCont);
476 }
477
478 /*********************************************************************************/
479
480 Standard_Real LocalAnalysis_SurfaceContinuity::C0Value() const 
481
482   if (!myIsDone) { StdFail_NotDone::Raise();}
483   return ( myContC0    );
484 }
485
486 /*********************************************************************************/
487
488 Standard_Real LocalAnalysis_SurfaceContinuity::C1UAngle() const 
489 {
490   if (!myIsDone) { StdFail_NotDone::Raise();}
491   return ( myContC1U    );
492 }
493
494 /*********************************************************************************/
495
496 Standard_Real LocalAnalysis_SurfaceContinuity::C1VAngle() const 
497 {
498   if (!myIsDone) { StdFail_NotDone::Raise();}
499   return ( myContC1V    );
500 }
501
502 /*********************************************************************************/
503
504 Standard_Real LocalAnalysis_SurfaceContinuity::C2UAngle() const 
505 {
506   if (!myIsDone) { StdFail_NotDone::Raise();}
507   return ( myContC2U    );
508 }
509
510 /*********************************************************************************/
511
512 Standard_Real LocalAnalysis_SurfaceContinuity::C2VAngle() const 
513 {
514   if (!myIsDone) { StdFail_NotDone::Raise();}
515   return ( myContC2V    );
516 }
517
518 /*********************************************************************************/
519
520 Standard_Real LocalAnalysis_SurfaceContinuity::G1Angle() const 
521 {
522   if (!myIsDone) { StdFail_NotDone::Raise();}
523   return ( myContG1    );
524 }
525
526 /*********************************************************************************/
527
528 Standard_Real LocalAnalysis_SurfaceContinuity::C1URatio() const 
529 {
530   if (!myIsDone) { StdFail_NotDone::Raise();}
531   return ( myLambda1U    );
532 }
533
534 /*********************************************************************************/
535
536 Standard_Real LocalAnalysis_SurfaceContinuity::C2URatio() const 
537 {
538   if (!myIsDone) { StdFail_NotDone::Raise();}
539   return ( myLambda2U    );
540 }
541
542 /*********************************************************************************/
543
544 Standard_Real LocalAnalysis_SurfaceContinuity::C1VRatio() const 
545 {
546   if (!myIsDone) { StdFail_NotDone::Raise();}
547   return ( myLambda1V    );
548 }
549
550 /*********************************************************************************/
551
552 Standard_Real LocalAnalysis_SurfaceContinuity::C2VRatio() const 
553
554   if (!myIsDone) { StdFail_NotDone::Raise();}
555  return ( myLambda2V    );
556 }
557
558 /*********************************************************************************/
559
560 Standard_Real LocalAnalysis_SurfaceContinuity::G2CurvatureGap() const 
561 {
562   if (!myIsDone) { StdFail_NotDone::Raise();}
563   return ( myGap    );
564 }
565
566 /*********************************************************************************/
567
568 Standard_Boolean LocalAnalysis_SurfaceContinuity::IsDone() const
569 { return ( myIsDone );
570 }
571
572 /*********************************************************************************/
573 LocalAnalysis_StatusErrorType  LocalAnalysis_SurfaceContinuity::StatusError() const
574 {
575 return  myErrorStatus;
576 }