0030153: Visualization, TKOpenGl - AIS_ColoredShape::SynchronizeAspects() doesn't...
[occt.git] / src / ChFi3d / ChFi3d_Builder_2.cxx
index ff19e6a..c7d003f 100644 (file)
@@ -609,8 +609,8 @@ CallPerformSurf(Handle(ChFiDS_Stripe)&              Stripe,
                const Standard_Boolean              RecOnS1,
                const Standard_Boolean              RecOnS2,
                math_Vector&                        Soldep,
-               Standard_Boolean&                   intf,
-               Standard_Boolean&                   intl,
+               Standard_Integer&                   intf,
+               Standard_Integer&                   intl,
                 Handle(BRepAdaptor_HSurface)&       Surf1,
                Handle(BRepAdaptor_HSurface)&       Surf2) 
 {
@@ -972,7 +972,7 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)&      Stripe,
     }
   }
   Spine->SetErrorStatus(ChFiDS_StartsolFailure);
-  Standard_Failure::Raise("StartSol echec");
+  throw Standard_Failure("StartSol echec");
 }
 
 //=======================================================================
@@ -1008,7 +1008,7 @@ static void  ChFi3d_BuildPlane (TopOpeBRepDS_DataStructure&    DStr,
       return; // everything is good !
     }
   }
-  Standard_Failure::Raise("ChFi3d_BuildPlane : echec .");
+  throw Standard_Failure("ChFi3d_BuildPlane : echec .");
 }
 
 //=======================================================================
@@ -1164,16 +1164,13 @@ ChFi3d_Builder::StartSol(const Handle(ChFiDS_Spine)&    Spine,
     // it is necessary to find the new support face of the fillet : 
     // connected to FRef along the newedge.
     if(newedge.IsNull()) {
-      Standard_Failure::Raise
-       ("StartSol : chain is not possible, new obstacle not found");
+      throw Standard_Failure("StartSol : chain is not possible, new obstacle not found");
     }
     if(IsG1(myEFMap,newedge,Fref,Fv)){
-      Standard_Failure::Raise
-       ("StartSol : chain is not possible, config non processed");
+      throw Standard_Failure("StartSol : chain is not possible, config non processed");
     }
     else if(Fv.IsNull()){
-      Standard_Failure::Raise
-       ("StartSol : chain is not possible, new obstacle not found");
+      throw Standard_Failure("StartSol : chain is not possible, new obstacle not found");
     }
     else{
       HS->ChangeSurface().Initialize(Fv);
@@ -1747,8 +1744,8 @@ static void ChFi3d_Purge (Handle(ChFiDS_Stripe)&    Stripe,
                          const ChFiDS_CommonPoint& VRef,
                          const Standard_Boolean    isfirst,
                          const Standard_Integer    ons,
-                         Standard_Boolean&         intf,
-                         Standard_Boolean&         intl)
+                         Standard_Integer&         intf,
+                         Standard_Integer&         intl)
 {
   if (isfirst) intf = 1; else intl = 1; // End.
   Standard_Integer opp = 3-ons;
@@ -1786,7 +1783,7 @@ static void InsertAfter (Handle(ChFiDS_Stripe)&   Stripe,
                         Handle(ChFiDS_SurfData)& Item)
 {
   if (Ref == Item) 
-    Standard_Failure::Raise("InsertAfter : twice the same surfdata.");
+    throw Standard_Failure("InsertAfter : twice the same surfdata.");
   
   ChFiDS_SequenceOfSurfData& Seq = 
     Stripe->ChangeSetOfSurfData()->ChangeSequence();
@@ -1835,7 +1832,7 @@ static void InsertBefore (Handle(ChFiDS_Stripe)&   Stripe,
                          Handle(ChFiDS_SurfData)& Item)
 {
   if (Ref == Item) 
-    Standard_Failure::Raise("InsertBefore : twice the same surfdata.");
+    throw Standard_Failure("InsertBefore : twice the same surfdata.");
   
   ChFiDS_SequenceOfSurfData& Seq = 
     Stripe->ChangeSetOfSurfData()->ChangeSequence();
@@ -2000,7 +1997,7 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine
   }
   Standard_Real         MaxStep  = (bidl-bidf)*0.05/nbed;
   Standard_Real         Firstsov = 0.;
-  Standard_Boolean      intf = 0, intl = 0;
+  Standard_Integer      intf = 0, intl = 0;
   while(!fini){
     // are these the ends (no extension on periodic).
     Ok1 = 1,Ok2 = 1;
@@ -2054,7 +2051,7 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine
        if(forward) Guide.FirstParameter(wf);
        else Guide.LastParameter(wl);
       }
-      else Standard_Failure::Raise("PerformSetOfSurfOnElSpine : Chaining is impossible.");
+      else throw Standard_Failure("PerformSetOfSurfOnElSpine : Chaining is impossible.");
     }
     
     // Definition of the domain of patch It1, It2
@@ -2188,7 +2185,7 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine
       }
       else { // Otherwise invalidation of the stripe.
         Spine->SetErrorStatus(ChFiDS_WalkingFailure);
-       Standard_Failure::Raise("CallPerformSurf : Path failed!");
+       throw Standard_Failure("CallPerformSurf : Path failed!");
       }
     }
     
@@ -2322,7 +2319,7 @@ void ChFi3d_Builder::PerformSetOfKPart(Handle(ChFiDS_Stripe)& Stripe,
   Standard_Real WFirst,WLast = 0.;
   gp_Vec TFirst,TLast,TEndPeriodic;
   gp_Pnt PFirst,PLast,PEndPeriodic;
-  Standard_Boolean intf = 0, intl = 0;
+  Standard_Boolean intf = Standard_False, intl = Standard_False;
   
   Handle(ChFiDS_HElSpine) CurrentHE = new ChFiDS_HElSpine();
   Spine->D1(Spine->FirstParameter(),PFirst,TFirst);
@@ -2581,7 +2578,7 @@ void ChFi3d_Builder::PerformSetOfKGen(Handle(ChFiDS_Stripe)& Stripe,
       Standard_Boolean possibleon2 = (don2 < 2*(ddeb + dfin));
       if((tw1 && !possibleon1) || (tw2 && !possibleon2)) {
         Spine->SetErrorStatus(ChFiDS_TwistedSurface);
-       Standard_Failure::Raise("adjustment by reprocessing the non-written points");
+       throw Standard_Failure("adjustment by reprocessing the non-written points");
       }
       
       // It is checked if there are presentable neighbors
@@ -2616,8 +2613,7 @@ void ChFi3d_Builder::PerformSetOfKGen(Handle(ChFiDS_Stripe)& Stripe,
       if(tw1){
        if(!yaprevon1 || !yanexton1){
           Spine->SetErrorStatus(ChFiDS_TwistedSurface);
-         Standard_Failure::Raise
-           ("adjustment by reprocessing the non-written points: no neighbor");
+         throw Standard_Failure("adjustment by reprocessing the non-written points: no neighbor");
        }
        ChFiDS_FaceInterference& previntf1 = prevsd->ChangeInterferenceOnS1();
        ChFiDS_FaceInterference& nextintf1 = nextsd->ChangeInterferenceOnS1();
@@ -2675,8 +2671,7 @@ void ChFi3d_Builder::PerformSetOfKGen(Handle(ChFiDS_Stripe)& Stripe,
       }
       if(tw2){
        if(!yaprevon2 || !yanexton2){
-         Standard_Failure::Raise
-           ("adjustment by reprocessing the non-written points: no neighbor");
+         throw Standard_Failure("adjustment by reprocessing the non-written points: no neighbor");
        }
        ChFiDS_FaceInterference& previntf2 = prevsd->ChangeInterferenceOnS2();
        ChFiDS_FaceInterference& nextintf2 = nextsd->ChangeInterferenceOnS2();