0028643: Coding rules - eliminate GCC compiler warnings -Wmisleading-indentation
authorkgv <kgv@opencascade.com>
Sat, 8 Apr 2017 11:50:24 +0000 (14:50 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 14 Apr 2017 10:04:04 +0000 (13:04 +0300)
68 files changed:
src/APIHeaderSection/APIHeaderSection_EditHeader.cxx
src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx
src/AppBlend/AppBlend_AppSurf.gxx
src/BRepGProp/BRepGProp_Gauss.cxx
src/BRepLib/BRepLib.cxx
src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx
src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx
src/BRepPrim/BRepPrim_GWedge.cxx
src/BRepTools/BRepTools_Quilt.cxx
src/ChFi2d/ChFi2d_Builder.cxx
src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx
src/HLRBRep/HLRBRep_Data.cxx
src/IFSelect/IFSelect_Functions.cxx
src/IFSelect/IFSelect_SessionPilot.cxx
src/IFSelect/IFSelect_WorkSession.cxx
src/IGESAppli/IGESAppli_Protocol.cxx
src/IGESBasic/IGESBasic_Protocol.cxx
src/IGESData/IGESData_IGESReaderTool.cxx
src/IGESData/IGESData_IGESWriter.cxx
src/IGESDefs/IGESDefs_Protocol.cxx
src/IGESDefs/IGESDefs_ToolAttributeDef.cxx
src/IGESDimen/IGESDimen_Protocol.cxx
src/IGESDraw/IGESDraw_Protocol.cxx
src/IGESGeom/IGESGeom_Protocol.cxx
src/IGESGraph/IGESGraph_Protocol.cxx
src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx
src/IGESSelect/IGESSelect_Activator.cxx
src/IGESSolid/IGESSolid_Protocol.cxx
src/IntPatch/IntPatch_PrmPrmIntersection.cxx
src/Interface/Interface_Category.cxx
src/Interface/Interface_CheckIterator.cxx
src/Interface/Interface_FileReaderData.cxx
src/Interface/Interface_StaticStandards.cxx
src/ProjLib/ProjLib_CompProjectedCurve.cxx
src/QABugs/QABugs_11.cxx
src/RWStepAP214/RWStepAP214.cxx
src/STEPCAFControl/STEPCAFControl_Writer.cxx
src/SWDRAW/SWDRAW_ShapeAnalysis.cxx
src/SWDRAW/SWDRAW_ShapeCustom.cxx
src/SWDRAW/SWDRAW_ShapeExtend.cxx
src/SWDRAW/SWDRAW_ShapeFix.cxx
src/SWDRAW/SWDRAW_ShapeProcess.cxx
src/SWDRAW/SWDRAW_ShapeTool.cxx
src/SWDRAW/SWDRAW_ShapeUpgrade.cxx
src/ShapeAnalysis/ShapeAnalysis_CheckSmallFace.cxx
src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx
src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx
src/StepAP214/StepAP214_Protocol.cxx
src/StepSelect/StepSelect_Activator.cxx
src/TObjDRAW/TObjDRAW.cxx
src/TPrsStd/TPrsStd_ConstraintTools.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_GTopo.cxx
src/TopOpeBRepDS/TopOpeBRepDS_connex.cxx
src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
src/XDEDRAW/XDEDRAW.cxx
src/XDEDRAW/XDEDRAW_Colors.cxx
src/XDEDRAW/XDEDRAW_Common.cxx
src/XDEDRAW/XDEDRAW_GDTs.cxx
src/XDEDRAW/XDEDRAW_Layers.cxx
src/XDEDRAW/XDEDRAW_Props.cxx
src/XDEDRAW/XDEDRAW_Shapes.cxx
src/XDEDRAW/XDEDRAW_Views.cxx
src/XSControl/XSControl_FuncShape.cxx
src/XSControl/XSControl_Functions.cxx
src/XSControl/XSControl_WorkSession.cxx
src/XSDRAW/XSDRAW.cxx

index 0dd3bfa..92a12f5 100644 (file)
@@ -34,32 +34,46 @@ static Standard_Boolean IsTimeStamp
   char dizmois = val->Value(6);
   char dizjour = val->Value(9);
   char dizheur = val->Value(12);
-  for (Standard_Integer i = 1; i <= 19; i ++) {
+  for (Standard_Integer i = 1; i <= 19; i ++)
+  {
     char uncar = val->Value(i);
     switch (i) {
-    case  1 : if (uncar != '1' && uncar != '2') return Standard_False;  break;
+    case  1 : if (uncar != '1' && uncar != '2') return Standard_False;
+      break;
     case  2 :
     case  3 :
-    case  4 : if (uncar < '0' || uncar > '9') return Standard_False; break;
+    case  4 : if (uncar < '0' || uncar > '9') return Standard_False;
+      break;
     case  5 : if (uncar != '-') return Standard_False;
-    case  6 : if (uncar != '0' && uncar != '1') return Standard_False;  break;
-    case  7 : if (uncar < '0' || uncar > '9') return Standard_False; 
-      if (dizmois == '1' && (uncar < '0' || uncar > '2')) return Standard_False; break;
+    case  6 : if (uncar != '0' && uncar != '1') return Standard_False;
+      break;
+    case  7 : if (uncar < '0' || uncar > '9') return Standard_False;
+      if (dizmois == '1' && (uncar < '0' || uncar > '2')) return Standard_False;
+      break;
     case  8 : if (uncar != '-') return Standard_False;
-    case  9 : if (uncar < '0' || uncar > '3') return Standard_False; break;
+    case  9 : if (uncar < '0' || uncar > '3') return Standard_False;
+      break;
     case 10 : if (uncar < '0' || uncar > '9') return Standard_False;
-      if (dizjour == '3' && (uncar != '0' && uncar != '1')) return Standard_False; break;
+      if (dizjour == '3' && (uncar != '0' && uncar != '1')) return Standard_False;
+      break;
     case 11 : if (uncar != 'T') return Standard_False;
-    case 12 : if (uncar < '0' || uncar > '2') return Standard_False; break;
+    case 12 : if (uncar < '0' || uncar > '2') return Standard_False;
+      break;
     case 13 : if (uncar < '0' || uncar > '9') return Standard_False;
-      if (dizheur == '2' && (uncar < '0' || uncar > '3')) return Standard_False; break;
+      if (dizheur == '2' && (uncar < '0' || uncar > '3')) return Standard_False;
+      break;
     case 14 : if (uncar != ':') return Standard_False;
-    case 15 : if (uncar < '0' || uncar > '5') return Standard_False; break;
-    case 16 : if (uncar < '0' || uncar > '9') return Standard_False; break;
+    case 15 : if (uncar < '0' || uncar > '5') return Standard_False;
+      break;
+    case 16 : if (uncar < '0' || uncar > '9') return Standard_False;
+      break;
     case 17 : if (uncar != ':') return Standard_False;
-    case 18 : if (uncar < '0' || uncar > '5') return Standard_False; break;
-    case 19 : if (uncar < '0' || uncar > '9') return Standard_False; break;
-      default : break;
+    case 18 : if (uncar < '0' || uncar > '5') return Standard_False;
+      break;
+    case 19 : if (uncar < '0' || uncar > '9') return Standard_False;
+      break;
+    default :
+      break;
     }
   }
   return Standard_True;
index 1a633f2..ebf7fa5 100644 (file)
@@ -730,31 +730,31 @@ void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor3d_HSurface)& S)
 
 //=======================================================================
 //function : Load
-//purpose  : 
+//purpose  :
 //=======================================================================
 
-void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor2d_HCurve2d)& C) 
+void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor2d_HCurve2d)& C)
 {
   myCurve = C;
-  if (!mySurface.IsNull()) 
-     {
-       EvalKPart();
-       GeomAbs_SurfaceType  SType ;
-       SType = mySurface->GetType();
-       if( SType == GeomAbs_BSplineSurface)
-        EvalFirstLastSurf();
-       if( SType == GeomAbs_SurfaceOfExtrusion)
-        EvalFirstLastSurf();
-        if( SType == GeomAbs_SurfaceOfRevolution)
-        EvalFirstLastSurf();
-        if( SType == GeomAbs_OffsetSurface) {
-          SType = mySurface->BasisSurface()->GetType();
-         if( SType == GeomAbs_SurfaceOfRevolution ||
-              SType == GeomAbs_SurfaceOfExtrusion ||
-             SType == GeomAbs_BSplineSurface )
-           EvalFirstLastSurf();
-       }
-     }
+  if (mySurface.IsNull())
+  {
+    return;
+  }
+
+  EvalKPart();
+
+  GeomAbs_SurfaceType SType = mySurface->GetType();
+  if (SType == GeomAbs_OffsetSurface)
+  {
+    SType = mySurface->BasisSurface()->GetType();
+  }
+
+  if (SType == GeomAbs_BSplineSurface ||  
+      SType == GeomAbs_SurfaceOfExtrusion ||
+      SType == GeomAbs_SurfaceOfRevolution)
+  {
+    EvalFirstLastSurf();
+  }
 }
 
 //=======================================================================
index 7ead66a..5238787 100644 (file)
@@ -608,16 +608,23 @@ void AppBlend_AppSurf::Perform(const Handle(TheLine)& Lin,
   for(i = 1; i <= NbPointTot; i++){
     F.Section(Lin->Point(i),tabAppP,tabAppV,tabP2d,tabV2d,tabW,tabDW);
     Standard_Real x,y,z;
-    for(j = 1; j <= NbUPoles; j++){
+    for (j = 1; j <= NbUPoles; j++)
+    {
       tabAppP(j).Coord(x,y,z);
-      if(x < X) X = x; if(x > DX) DX = x;
-      if(y < Y) Y = y; if(y > DY) DY = y;
-      if(z < Z) Z = z; if(z > DZ) DZ = z;
+      if(x < X)  { X  = x; }
+      if(x > DX) { DX = x; }
+      if(y < Y)  { Y  = y; }
+      if(y > DY) { DY = y; }
+      if(z < Z)  { Z  = z; }
+      if(z > DZ) { DZ = z; }
     }
-    for(j = 1; j <= NbPoles2d; j++){
+    for (j = 1; j <= NbPoles2d; j++)
+    {
       tabP2d(j).Coord(x,y);
-      if(x < X2d(j)) X2d(j) = x; if(x > DX2d(j)) DX2d(j) = x;
-      if(y < Y2d(j)) Y2d(j) = y; if(y > DY2d(j)) DY2d(j) = y;
+      if(x < X2d (j)) { X2d (j) = x; }
+      if(x > DX2d(j)) { DX2d(j) = x; }
+      if(y < Y2d (j)) { Y2d (j) = y; }
+      if(y > DY2d(j)) { DY2d(j) = y; }
     }
   }
   // On calcule pour chaque ligne la transformation vers 0 1.
index 039513f..80930da 100644 (file)
@@ -621,7 +621,7 @@ Standard_Real BRepGProp_Gauss::Compute(
   while (isNaturalRestriction || theDomain.More())
   {
     if (isNaturalRestriction)
-    { 
+    {
       NbLGaussP[0] = Min(2 * NbUGaussP[0], math::GaussPointsMax());
     }
     else
@@ -662,7 +662,9 @@ Standard_Real BRepGProp_Gauss::Compute(
       LMaxSubs = BRepGProp_Gauss::MaxSubs(iLSubEnd);
 
       if (LMaxSubs > SM)
+      {
         LMaxSubs = SM;
+      }
 
       BRepGProp_Gauss::InitMass(0.0, 1, LMaxSubs, anInertiaL);
       BRepGProp_Gauss::Init(ErrL,  0.0, 1, LMaxSubs);
@@ -679,7 +681,9 @@ Standard_Real BRepGProp_Gauss::Compute(
           L2->Value(IL) = L1->Value(JL);
         }
         else
+        {
           LRange[0] = IL = JL;
+        }
 
         if (JL == LMaxSubs || Abs(L2->Value(JL) - L1->Value(JL)) < EPS_PARAM)
         {
@@ -697,6 +701,7 @@ Standard_Real BRepGProp_Gauss::Compute(
           }
         }
         else
+        {
           for (kL = 0; kL < kLEnd; kL++)
           {
             iLS = LRange[kL];
@@ -713,7 +718,7 @@ Standard_Real BRepGProp_Gauss::Compute(
               {
                 l = lm + lr * LGaussP[iGL]->Value(iL);
                 if (isNaturalRestriction)
-                { 
+                {
                   v = l;
                   u2 = BU2;
                   Dul = LGaussW[iGL]->Value(iL);
@@ -738,7 +743,7 @@ Standard_Real BRepGProp_Gauss::Compute(
                   if (u2 < BU1)
                     u2 = BU1;
                   else if (u2 > BU2)
-                    u2 = BU2; 
+                    u2 = BU2;
                 }
 
                 ErrUL->Value(iLS) = 0.0;
@@ -919,7 +924,7 @@ Standard_Real BRepGProp_Gauss::Compute(
                   CIxz = add(CIxz, mult(anIU.Ixz, Dul));
                   CIyz = add(CIyz, mult(anIU.Iyz, Dul));
                 }
-              }//for: iL 
+              }//for: iL
             }//for: iGL
 
             BRepGProp_Gauss::Inertia& aLI = anInertiaL->ChangeValue(iLS);
@@ -961,53 +966,56 @@ Standard_Real BRepGProp_Gauss::Compute(
             aLI.Ixz = mult(CIxz, lr);
             aLI.Iyz = mult(CIyz, lr);
           }//for: (kL)iLS
+        }
 
-          // Calculate/correct epsilon of computation by current value of dim
-          // That is need for not spend time for 
-          if (JL == iLSubEnd)
-          {
-            kLEnd = 2;
+        // Calculate/correct epsilon of computation by current value of dim
+        // That is need for not spend time for
+        if (JL == iLSubEnd)
+        {
+          kLEnd = 2;
 
-            Standard_Real DDim = 0.0;
-            for (i = 1; i <= JL; ++i)
-              DDim += anInertiaL->Value(i).Mass;
+          Standard_Real DDim = 0.0;
+          for (i = 1; i <= JL; ++i)
+            DDim += anInertiaL->Value(i).Mass;
 
-            #ifndef IS_MIN_DIM
+          #ifndef IS_MIN_DIM
+          {
+            if (myType == Vinert)
             {
-              if (myType == Vinert)
+              Standard_Real DIxx = 0.0, DIyy = 0.0, DIzz = 0.0;
+              for (i = 1; i <= JL; ++i)
               {
-                Standard_Real DIxx = 0.0, DIyy = 0.0, DIzz = 0.0;
-                for (i = 1; i <= JL; ++i)
-                {
-                  const BRepGProp_Gauss::Inertia& aLocalL =
-                    anInertiaL->Value(i);
+                const BRepGProp_Gauss::Inertia& aLocalL =
+                  anInertiaL->Value(i);
 
-                  DIxx += aLocalL.Ixx;
-                  DIyy += aLocalL.Iyy;
-                  DIzz += aLocalL.Izz;
-                }
-
-                DDim = Abs(DIxx) + Abs(DIyy) + Abs(DIzz);
+                DIxx += aLocalL.Ixx;
+                DIyy += aLocalL.Iyy;
+                DIzz += aLocalL.Izz;
               }
-            }
-            #endif
 
-            DDim = Abs(DDim * anEpsilon);
-
-            if (DDim > Eps)
-            {
-              Eps  = DDim;
-              EpsL = 0.9 * Eps;
+              DDim = Abs(DIxx) + Abs(DIyy) + Abs(DIzz);
             }
           }
-          if (kLEnd == 2)
+          #endif
+
+          DDim = Abs(DDim * anEpsilon);
+
+          if (DDim > Eps)
           {
-            ErrorL = ErrL->Value(ErrL->Max());
+            Eps  = DDim;
+            EpsL = 0.9 * Eps;
           }
+        }
+        if (kLEnd == 2)
+        {
+          ErrorL = ErrL->Value(ErrL->Max());
+        }
       } while ( (ErrorL - EpsL > 0.0 && isVerifyComputation) || kLEnd == 1 );
 
       for ( i = 1; i <= JL; i++ )
+      {
         addAndRestoreInertia(anInertiaL->Value(i), anInertia);
+      }
 
       ErrorLMax = Max(ErrorLMax, ErrorL);
     }
index 8e87f25..a2f2d95 100644 (file)
@@ -916,8 +916,8 @@ static Standard_Real ComputeTol(const Handle(Adaptor3d_HCurve)& c3d,
   Standard_Real first = c3d->FirstParameter();
   Standard_Real last  = c3d->LastParameter();
   Standard_Real dapp = -1.;
-  Standard_Integer i = 0;
-  for(i = 0; i <= nbp; i++){
+  for (Standard_Integer i = 0; i <= nbp; ++i)
+  {
     const Standard_Real t = IntToReal(i)/IntToReal(nbp);
     const Standard_Real u = first*(1.-t) + last*t;
     gp_Pnt Pc3d = c3d->Value(u);
@@ -953,16 +953,14 @@ static Standard_Real ComputeTol(const Handle(Adaptor3d_HCurve)& c3d,
         Precision::IsInfinite(Pcons.Y()) ||
         Precision::IsInfinite(Pcons.Z()))
     {
-        d2=Precision::Infinite();
-        break;
+      d2 = Precision::Infinite();
+      break;
     }
     Standard_Real temp = Pc3d.SquareDistance(Pcons);
 
-
     dist(i+1) = temp;
 
-
-    if(temp > d2) d2 = temp;
+    d2 = Max (d2, temp);
   }
 
   if(Precision::IsInfinite(d2))
@@ -982,25 +980,41 @@ static Standard_Real ComputeTol(const Handle(Adaptor3d_HCurve)& c3d,
   Standard_Integer N2 = 0;
   Standard_Integer N3 = 0;
 
-  for( i = 1; i<= nbp+10; i++)
-    if( dist(i) > 0 ) {
-      if( dist(i) < 1.0 ) N1++;
-      else N2++;
+  for (Standard_Integer i = 1; i<= nbp+10; ++i)
+  {
+    if (dist(i) > 0)
+    {
+      if (dist(i) < 1.0)
+      {
+        ++N1;
+      }
+      else
+      {
+        ++N2;
+      }
     }
+  }
 
-    if( N1 > N2 && N2 != 0 ) N3 = 100*N2/(N1+N2);
-    if( N3 < 10 && N3 != 0 ) {
-      ana = Standard_True;
-      for( i = 1; i<= nbp+10; i++)
-        if( dist(i) > 0 && dist(i) < 1.0 )
-          if( dist(i) > D2 ) D2 = dist(i);
+  if (N1 > N2 && N2 != 0)
+  {
+    N3 = 100*N2/(N1+N2);
+  }
+  if (N3 < 10 && N3 != 0)
+  {
+    ana = Standard_True;
+    for (Standard_Integer i = 1; i <= nbp+10; ++i)
+    {
+      if (dist(i) > 0 && dist(i) < 1.0)
+      {
+        D2 = Max (D2, dist(i));
+      }
     }
+  }
 
-    //d2 = 1.5*sqrt(d2);
-    d2 = (!ana) ? 1.5 * d2 : 1.5*sqrt(D2);
-    if(d2<1.e-7) d2 = 1.e-7;
-
-    return d2;
+  //d2 = 1.5*sqrt(d2);
+  d2 = (!ana) ? 1.5 * d2 : 1.5*sqrt(D2);
+  d2 = Max (d2, 1.e-7);
+  return d2;
 }
 
 void BRepLib::SameParameter(const TopoDS_Edge&  AnEdge,
index 1416ff3..67bf880 100644 (file)
@@ -311,7 +311,7 @@ void BRepOffsetAPI_DraftAngle::Build()
 
 //=======================================================================
 //function : CorrectWires
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 void BRepOffsetAPI_DraftAngle::CorrectWires()
@@ -479,8 +479,11 @@ void BRepOffsetAPI_DraftAngle::CorrectWires()
 
   //Sorting
   for (i = 1; i <= NonSeam.Length(); i++)
+  {
     for (j = 1; j < ParsNonSeam(i).Length(); j++)
+    {
       for (k = j+1; k <= ParsNonSeam(i).Length(); k++)
+      {
         if (ParsNonSeam(i)(k) < ParsNonSeam(i)(j))
         {
           Standard_Real temp = ParsNonSeam(i)(j);
@@ -493,416 +496,435 @@ void BRepOffsetAPI_DraftAngle::CorrectWires()
           ParsSeam(i)(j) = ParsSeam(i)(k);
           ParsSeam(i)(k) = temp;
         }
-        BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal iter( Emap );
-        for (; iter.More(); iter.Next())
+      }
+    }
+  }
+  BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal iter (Emap);
+  for (; iter.More (); iter.Next ())
+  {
+    TColStd_SequenceOfReal Seq = iter.Value ();
+    for (i = 1; i < Seq.Length (); i++)
+    {
+      for (j = i + 1; j <= Seq.Length (); j++)
+      {
+        if (Seq (j) < Seq (i))
         {
-          TColStd_SequenceOfReal Seq;
-          Seq = iter.Value();
-          for (i = 1; i < Seq.Length(); i++)
-            for (j = i+1; j <= Seq.Length(); j++)
-              if (Seq(j) < Seq(i))
-              {
-                Standard_Real temp = Seq(i);
-                Seq(i) = Seq(j);
-                Seq(j) = temp;
-              }
-              Emap( iter.Key() ) = Seq;
+          Standard_Real temp = Seq (i);
+          Seq (i) = Seq (j);
+          Seq (j) = temp;
         }
-        BRepFill_DataMapOfShapeSequenceOfReal EPmap;
-        TopTools_DataMapOfShapeSequenceOfShape EVmap; //Seam
-        TopTools_DataMapOfShapeSequenceOfShape EWmap; //Seam and wires intersecting it
-        iter.Initialize( Emap );
-        for (; iter.More(); iter.Next())
+      }
+    }
+    Emap (iter.Key ()) = Seq;
+  }
+  BRepFill_DataMapOfShapeSequenceOfReal EPmap;
+  TopTools_DataMapOfShapeSequenceOfShape EVmap; //Seam
+  TopTools_DataMapOfShapeSequenceOfShape EWmap; //Seam and wires intersecting it
+  iter.Initialize (Emap);
+  for (; iter.More (); iter.Next ())
+  {
+    TColStd_SequenceOfReal parseq;
+    EPmap.Bind (iter.Key (), parseq);
+    TopTools_SequenceOfShape shapeseq;
+    EVmap.Bind (iter.Key (), shapeseq);
+    TopTools_SequenceOfShape shapeseq2;
+    EWmap.Bind (iter.Key (), shapeseq2);
+  }
+
+  //Reconstruction of non-seam edges
+  BRepTools_Substitution aSub;
+  BRep_Builder BB;
+  for (i = 1; i <= NonSeam.Length (); i++)
+  {
+    TopoDS_Edge anEdge = TopoDS::Edge (NonSeam (i));
+    TopTools_ListOfShape NewEdges;
+    TopoDS_Edge NewE;
+    TopoDS_Vertex Vfirst, Vlast;
+    TopExp::Vertices (anEdge, Vfirst, Vlast);
+    Standard_Real par, FirstPar, LastPar;
+    BRep_Tool::Range (anEdge, FirstPar, LastPar);
+    Standard_Integer firstind = 1;
+    par = ParsNonSeam (i)(1);
+    TopoDS_Edge SeamEdge = TopoDS::Edge (Seam (i)(1));
+    //Find the face
+    for (j = 1; j <= Eseq.Length (); j++)
+      if (SeamEdge.IsSame (Eseq (j)))
+        break;
+    TopoDS_Face theFace = TopoDS::Face (Fseq (j));
+    TopLoc_Location L;
+    Handle (Geom_Surface) theSurf = BRep_Tool::Surface (theFace, L);
+    if (Abs (par - FirstPar) <= Precision::Confusion ())
+    {
+      BB.UpdateVertex (Vfirst, ParsSeam (i)(1), SeamEdge, BRep_Tool::Tolerance (Vfirst));
+      EPmap (SeamEdge).Append (ParsSeam (i)(1));
+      EVmap (SeamEdge).Append (Vfirst);
+      EWmap (SeamEdge).Append (NonSeamWires (i));
+      firstind = 2;
+    }
+    Standard_Real prevpar = FirstPar;
+    TopoDS_Vertex PrevV = Vfirst;
+    for (j = firstind; j <= ParsNonSeam (i).Length (); j++)
+    {
+      TopoDS_Shape aLocalShape = anEdge.EmptyCopied ();
+      NewE = TopoDS::Edge (aLocalShape);
+      //NewE = TopoDS::Edge( anEdge.EmptyCopied() );
+      TopoDS_Vertex NewV;
+      par = ParsNonSeam (i)(j);
+      BB.Range (NewE, prevpar, par);
+      SeamEdge = TopoDS::Edge (Seam (i)(j));
+      if (j == ParsNonSeam (i).Length () && Abs (par - LastPar) <= Precision::Confusion ())
+      {
+        NewV = Vlast;
+        if (firstind == 2 && j == 2)
         {
-          TColStd_SequenceOfReal parseq;
-          EPmap.Bind( iter.Key(), parseq );
-          TopTools_SequenceOfShape shapeseq;
-          EVmap.Bind( iter.Key(), shapeseq );
-          TopTools_SequenceOfShape shapeseq2;
-          EWmap.Bind( iter.Key(), shapeseq2 );
+          BB.UpdateVertex (Vlast, ParsSeam (i)(j), SeamEdge, BRep_Tool::Tolerance (Vlast));
+          EPmap (SeamEdge).Append (ParsSeam (i)(j));
+          EVmap (SeamEdge).Append (Vlast);
+          EWmap (SeamEdge).Append (NonSeamWires (i));
+          break;
         }
+      }
+      else
+      {
+        BRepAdaptor_Curve bcur (NewE);
+        gp_Pnt Point = bcur.Value (par);
+        NewV = BRepLib_MakeVertex (Point);
+        BB.UpdateVertex (NewV, par, NewE, 10.*Precision::Confusion ());
+      }
+      BB.UpdateVertex (NewV, ParsSeam (i)(j), SeamEdge, 10.*Precision::Confusion ());
+      NewE.Orientation (TopAbs_FORWARD);
+      BB.Add (NewE, PrevV.Oriented (TopAbs_FORWARD));
+      BB.Add (NewE, NewV.Oriented (TopAbs_REVERSED));
+
+      NewEdges.Append (NewE);
+      EPmap (SeamEdge).Append (ParsSeam (i)(j));
+      EVmap (SeamEdge).Append (NewV);
+      EWmap (SeamEdge).Append (NonSeamWires (i));
+
+      prevpar = par;
+      PrevV = NewV;
+    }
+    //The last edge
+    TopoDS_Shape aLocalShape = anEdge.EmptyCopied ();
+    NewE = TopoDS::Edge (aLocalShape);
+    //NewE = TopoDS::Edge( anEdge.EmptyCopied() );
+    par = LastPar;
+    if (Abs (prevpar - par) > Precision::Confusion ())
+    {
+      BB.Range (NewE, prevpar, par);
+      NewE.Orientation (TopAbs_FORWARD);
+      BB.Add (NewE, PrevV.Oriented (TopAbs_FORWARD));
+      BB.Add (NewE, Vlast.Oriented (TopAbs_REVERSED));
+      NewEdges.Append (NewE);
+    }
 
-        //Reconstruction of non-seam edges
-        BRepTools_Substitution aSub;
-        BRep_Builder BB;
-        for (i = 1; i <= NonSeam.Length(); i++)
-        {
-          TopoDS_Edge anEdge = TopoDS::Edge( NonSeam(i) );
-          TopTools_ListOfShape NewEdges;
-          TopoDS_Edge NewE;
-          TopoDS_Vertex Vfirst, Vlast;
-          TopExp::Vertices( anEdge, Vfirst, Vlast );
-          Standard_Real par, FirstPar, LastPar;
-          BRep_Tool::Range( anEdge, FirstPar, LastPar );
-          Standard_Integer firstind = 1;
-          par = ParsNonSeam(i)(1);
-          TopoDS_Edge SeamEdge = TopoDS::Edge( Seam(i)(1) );
-          //Find the face
-          for (j = 1; j <= Eseq.Length(); j++)
-            if (SeamEdge.IsSame( Eseq(j) ))
-              break;
-          TopoDS_Face theFace = TopoDS::Face( Fseq(j) );
-          TopLoc_Location L;
-          Handle( Geom_Surface ) theSurf = BRep_Tool::Surface( theFace, L );
-          if (Abs(par-FirstPar) <= Precision::Confusion())
-          {
-            BB.UpdateVertex( Vfirst, ParsSeam(i)(1), SeamEdge, BRep_Tool::Tolerance(Vfirst) );
-            EPmap( SeamEdge ).Append( ParsSeam(i)(1) );
-            EVmap( SeamEdge ).Append( Vfirst );
-            EWmap( SeamEdge ).Append( NonSeamWires(i) );
-            firstind = 2;
-          }
-          Standard_Real prevpar = FirstPar;
-          TopoDS_Vertex PrevV = Vfirst;
-          for (j = firstind; j <= ParsNonSeam(i).Length(); j++)
-          {
-            TopoDS_Shape aLocalShape = anEdge.EmptyCopied();
-            NewE = TopoDS::Edge( aLocalShape );
-            //NewE = TopoDS::Edge( anEdge.EmptyCopied() );
-            TopoDS_Vertex NewV;
-            par = ParsNonSeam(i)(j);
-            BB.Range( NewE, prevpar, par );
-            SeamEdge = TopoDS::Edge( Seam(i)(j) );
-            if (j == ParsNonSeam(i).Length() && Abs(par-LastPar) <= Precision::Confusion())
-            {
-              NewV = Vlast;
-              if (firstind == 2 && j == 2)
-              {
-                BB.UpdateVertex( Vlast, ParsSeam(i)(j), SeamEdge, BRep_Tool::Tolerance(Vlast) );
-                EPmap( SeamEdge ).Append( ParsSeam(i)(j) );
-                EVmap( SeamEdge ).Append( Vlast );
-                EWmap( SeamEdge ).Append( NonSeamWires(i) );
-                break;
-              }
-            }
-            else
-            {
-              BRepAdaptor_Curve bcur( NewE );
-              gp_Pnt Point = bcur.Value( par );
-              NewV = BRepLib_MakeVertex( Point );
-              BB.UpdateVertex( NewV, par, NewE, 10.*Precision::Confusion() );
-            }
-            BB.UpdateVertex( NewV, ParsSeam(i)(j), SeamEdge, 10.*Precision::Confusion() );
-            NewE.Orientation( TopAbs_FORWARD );
-            BB.Add( NewE, PrevV.Oriented(TopAbs_FORWARD) );
-            BB.Add( NewE, NewV.Oriented(TopAbs_REVERSED) );
-
-            NewEdges.Append( NewE );
-            EPmap( SeamEdge ).Append( ParsSeam(i)(j) );
-            EVmap( SeamEdge ).Append( NewV );
-            EWmap( SeamEdge ).Append( NonSeamWires(i) );
-
-            prevpar = par;
-            PrevV = NewV;
-          }
-          //The last edge
-          TopoDS_Shape aLocalShape = anEdge.EmptyCopied();
-          NewE = TopoDS::Edge( aLocalShape );
-          //NewE = TopoDS::Edge( anEdge.EmptyCopied() );
-          par = LastPar;
-          if (Abs(prevpar-par) > Precision::Confusion())
-          {
-            BB.Range( NewE, prevpar, par );
-            NewE.Orientation( TopAbs_FORWARD );
-            BB.Add( NewE, PrevV.Oriented(TopAbs_FORWARD) );
-            BB.Add( NewE, Vlast.Oriented(TopAbs_REVERSED) );
-            NewEdges.Append( NewE );
-          }
+    //Substitute anEdge by NewEdges
+    aSub.Substitute (anEdge, NewEdges);
+  }
 
-          //Substitute anEdge by NewEdges
-          aSub.Substitute( anEdge, NewEdges );
+  //Sorting of EPmap and EVmap and removing repeating points from them
+  iter.Initialize (EPmap);
+  for (; iter.More (); iter.Next ())
+  {
+    TColStd_SequenceOfReal Seq;
+    Seq = iter.Value ();
+    TopTools_SequenceOfShape SeqShape;
+    SeqShape = EVmap (iter.Key ());
+    TopTools_SequenceOfShape SeqShape2;
+    SeqShape2 = EWmap (iter.Key ());
+    for (i = 1; i < Seq.Length (); i++)
+    {
+      for (j = i + 1; j <= Seq.Length (); j++)
+      {
+        if (Seq (j) < Seq (i))
+        {
+          Standard_Real temp = Seq (i);
+          Seq (i) = Seq (j);
+          Seq (j) = temp;
+          TopoDS_Shape tmp = SeqShape (i);
+          SeqShape (i) = SeqShape (j);
+          SeqShape (j) = tmp;
+          tmp = SeqShape2 (i);
+          SeqShape2 (i) = SeqShape2 (j);
+          SeqShape2 (j) = tmp;
         }
+      }
+    }
 
-        //Sorting of EPmap and EVmap and removing repeating points from them
-        iter.Initialize( EPmap );
-        for (; iter.More(); iter.Next())
+    EPmap (iter.Key ()) = Seq;
+    EVmap (iter.Key ()) = SeqShape;
+    EWmap (iter.Key ()) = SeqShape2;
+  }
+  iter.Initialize (EPmap);
+  for (; iter.More (); iter.Next ())
+  {
+    TColStd_SequenceOfReal Seq;
+    Seq = iter.Value ();
+    TopTools_SequenceOfShape SeqShape;
+    SeqShape = EVmap (iter.Key ());
+    TopTools_SequenceOfShape SeqShape2;
+    SeqShape2 = EWmap (iter.Key ());
+    Standard_Boolean remove = Standard_True;
+    while (remove)
+    {
+      remove = Standard_False;
+      for (i = 1; i < Seq.Length (); i++)
+      {
+        if (Abs (Seq (i) - Seq (i + 1)) <= Precision::Confusion ())
         {
-          TColStd_SequenceOfReal Seq;
-          Seq = iter.Value();
-          TopTools_SequenceOfShape SeqShape;
-          SeqShape = EVmap( iter.Key() );
-          TopTools_SequenceOfShape SeqShape2;
-          SeqShape2 = EWmap( iter.Key() );
-          for (i = 1; i < Seq.Length(); i++)
-            for (j = i+1; j <= Seq.Length(); j++)
-              if (Seq(j) < Seq(i))
-              {
-                Standard_Real temp = Seq(i);
-                Seq(i) = Seq(j);
-                Seq(j) = temp;
-                TopoDS_Shape tmp = SeqShape(i);
-                SeqShape(i) = SeqShape(j);
-                SeqShape(j) = tmp;
-                tmp = SeqShape2(i);
-                SeqShape2(i) = SeqShape2(j);
-                SeqShape2(j) = tmp;
-              }
-              EPmap( iter.Key() ) = Seq;
-              EVmap( iter.Key() ) = SeqShape;
-              EWmap( iter.Key() ) = SeqShape2;
+          Seq.Remove (i + 1);
+          SeqShape.Remove (i + 1);
+          SeqShape2.Remove (i + 1);
+          remove = Standard_True;
         }
-        iter.Initialize( EPmap );
-        for (; iter.More(); iter.Next())
+      }
+    }
+    EPmap (iter.Key ()) = Seq;
+    EVmap (iter.Key ()) = SeqShape;
+    EWmap (iter.Key ()) = SeqShape2;
+  }
+
+  //Reconstruction of seam edges
+  TopTools_DataMapOfShapeShape VEmap;
+  iter.Initialize (Emap);
+  for (; iter.More (); iter.Next ())
+  {
+    TopoDS_Edge anEdge = TopoDS::Edge (iter.Key ());
+    Standard_Boolean onepoint = Standard_False;
+    TopTools_ListOfShape NewEdges;
+    TColStd_SequenceOfReal Seq;
+    Seq = iter.Value ();
+    TColStd_SequenceOfReal Seq2;
+    Seq2 = EPmap (anEdge);
+    TopTools_SequenceOfShape SeqVer;
+    SeqVer = EVmap (anEdge);
+    TopTools_SequenceOfShape SeqWire;
+    SeqWire = EWmap (anEdge);
+    TopoDS_Vertex Vfirst, Vlast;
+    TopExp::Vertices (anEdge, Vfirst, Vlast);
+    Standard_Real fpar, lpar, FirstPar, LastPar;
+    BRep_Tool::Range (anEdge, FirstPar, LastPar);
+    fpar = FirstPar;
+    lpar = Seq (1);
+    TopoDS_Edge NewE;
+    Standard_Integer firstind = 1;
+    if (Abs (fpar - lpar) <= Precision::Confusion ())
+    {
+      firstind = 2;
+      fpar = Seq (1);
+      lpar = Seq (2);
+    }
+    else
+    {
+      if (Seq.Length () % 2 != 0)
+      {
+        VEmap.Bind (Vfirst, anEdge);
+        firstind = 2;
+        fpar = Seq (1);
+        if (Seq.Length () > 2)
+          lpar = Seq (2);
+        else
+          onepoint = Standard_True;
+      }
+    }
+    if (!onepoint)
+    {
+      TopoDS_Shape aLocalShape = anEdge.EmptyCopied ();
+      NewE = TopoDS::Edge (aLocalShape);
+      //NewE = TopoDS::Edge( anEdge.EmptyCopied() );
+      BB.Range (NewE, fpar, lpar);
+      NewE.Orientation (TopAbs_FORWARD);
+      if (firstind == 1)
+      {
+        BB.Add (NewE, Vfirst.Oriented (TopAbs_FORWARD));
+        aLocalShape = SeqVer (1).Oriented (TopAbs_REVERSED);
+        BB.Add (NewE, TopoDS::Vertex (aLocalShape));
+        //BB.Add( NewE, TopoDS::Vertex( SeqVer(1).Oriented(TopAbs_REVERSED) ) );
+      }
+      else
+      {
+        aLocalShape = SeqVer (1).Oriented (TopAbs_FORWARD);
+        BB.Add (NewE, TopoDS::Vertex (aLocalShape));
+        aLocalShape = SeqVer (2).Oriented (TopAbs_REVERSED);
+        BB.Add (NewE, TopoDS::Vertex (aLocalShape));
+        //BB.Add( NewE, TopoDS::Vertex( SeqVer(1).Oriented(TopAbs_FORWARD) ) );
+        //BB.Add( NewE, TopoDS::Vertex( SeqVer(2).Oriented(TopAbs_REVERSED) ) );
+      }
+      NewEdges.Append (NewE);
+
+      firstind++;
+      for (i = firstind; i < Seq.Length (); i += 2)
+      {
+        aLocalShape = anEdge.EmptyCopied ();
+        NewE = TopoDS::Edge (aLocalShape);
+        //NewE = TopoDS::Edge( anEdge.EmptyCopied() );
+        fpar = Seq (i);
+        lpar = Seq (i + 1);
+        BB.Range (NewE, fpar, lpar);
+        //Find vertices
+        for (j = 1; j <= Seq2.Length (); j++)
         {
-          TColStd_SequenceOfReal Seq;
-          Seq = iter.Value();
-          TopTools_SequenceOfShape SeqShape;
-          SeqShape = EVmap( iter.Key() );
-          TopTools_SequenceOfShape SeqShape2;
-          SeqShape2 = EWmap( iter.Key() );
-          Standard_Boolean remove = Standard_True;
-          while (remove)
+          if (Abs (fpar - Seq2 (j)) <= Precision::Confusion ())
           {
-            remove = Standard_False;
-            for (i = 1; i < Seq.Length(); i++)
-              if (Abs(Seq(i)-Seq(i+1)) <= Precision::Confusion())
-              {
-                Seq.Remove(i+1);
-                SeqShape.Remove(i+1);
-                SeqShape2.Remove(i+1);
-                remove = Standard_True;
-              }
+            break;
           }
-          EPmap( iter.Key() ) = Seq;
-          EVmap( iter.Key() ) = SeqShape;
-          EWmap( iter.Key() ) = SeqShape2;
         }
+        NewE.Orientation (TopAbs_FORWARD);
+        TopoDS_Shape aLocalShapeCur = SeqVer (j).Oriented (TopAbs_FORWARD);
+        BB.Add (NewE, TopoDS::Vertex (aLocalShapeCur));
+        aLocalShapeCur = SeqVer (j + 1).Oriented (TopAbs_REVERSED);
+        BB.Add (NewE, TopoDS::Vertex (aLocalShapeCur));
+        //BB.Add( NewE, TopoDS::Vertex( SeqVer(j).Oriented(TopAbs_FORWARD) ) );
+        //BB.Add( NewE, TopoDS::Vertex( SeqVer(j+1).Oriented(TopAbs_REVERSED) ) );
+        NewEdges.Append (NewE);
+      }
+    }
 
-        //Reconstruction of seam edges
-        TopTools_DataMapOfShapeShape VEmap;
-        iter.Initialize( Emap );
-        for (; iter.More(); iter.Next())
-        {
-          TopoDS_Edge anEdge = TopoDS::Edge( iter.Key() );
-          Standard_Boolean onepoint = Standard_False;
-          TopTools_ListOfShape NewEdges;
-          TColStd_SequenceOfReal Seq;
-          Seq = iter.Value();
-          TColStd_SequenceOfReal Seq2;
-          Seq2 = EPmap( anEdge );
-          TopTools_SequenceOfShape SeqVer;
-          SeqVer = EVmap( anEdge );
-          TopTools_SequenceOfShape SeqWire;
-          SeqWire = EWmap( anEdge );
-          TopoDS_Vertex Vfirst, Vlast;
-          TopExp::Vertices( anEdge, Vfirst, Vlast );
-          Standard_Real fpar, lpar, FirstPar, LastPar;
-          BRep_Tool::Range( anEdge, FirstPar, LastPar );
-          fpar = FirstPar;
-          lpar = Seq(1);
-          TopoDS_Edge NewE;
-          Standard_Integer firstind = 1;
-          if (Abs(fpar-lpar) <= Precision::Confusion())
-          {
-            firstind = 2;
-            fpar = Seq(1);
-            lpar = Seq(2);
-          }
-          else
-          {
-            if (Seq.Length()%2 != 0)
-            {
-              VEmap.Bind( Vfirst, anEdge );
-              firstind = 2;
-              fpar = Seq(1);
-              if (Seq.Length() > 2)
-                lpar = Seq(2);
-              else
-                onepoint = Standard_True;
-            }
-          }
-          if (!onepoint)
-          {
-            TopoDS_Shape aLocalShape = anEdge.EmptyCopied();
-            NewE = TopoDS::Edge( aLocalShape );
-            //NewE = TopoDS::Edge( anEdge.EmptyCopied() );
-            BB.Range( NewE, fpar, lpar );
-            NewE.Orientation( TopAbs_FORWARD );
-            if (firstind == 1)
-            {
-              BB.Add( NewE, Vfirst.Oriented(TopAbs_FORWARD) );
-              aLocalShape = SeqVer(1).Oriented(TopAbs_REVERSED);
-              BB.Add( NewE, TopoDS::Vertex( aLocalShape ) );
-              //BB.Add( NewE, TopoDS::Vertex( SeqVer(1).Oriented(TopAbs_REVERSED) ) );
-            }
-            else
-            {
-              aLocalShape = SeqVer(1).Oriented(TopAbs_FORWARD);
-              BB.Add( NewE, TopoDS::Vertex( aLocalShape ) );
-              aLocalShape = SeqVer(2).Oriented(TopAbs_REVERSED);
-              BB.Add( NewE, TopoDS::Vertex( aLocalShape ) );
-              //BB.Add( NewE, TopoDS::Vertex( SeqVer(1).Oriented(TopAbs_FORWARD) ) );
-              //BB.Add( NewE, TopoDS::Vertex( SeqVer(2).Oriented(TopAbs_REVERSED) ) );
-            }
-            NewEdges.Append( NewE );
+    i = Seq.Length ();
+    fpar = Seq (i);
+    lpar = LastPar;
+    if (Abs (fpar - lpar) <= Precision::Confusion ())
+      continue;
+    TopoDS_Shape aLocalShape = anEdge.EmptyCopied ();
+    NewE = TopoDS::Edge (aLocalShape);
+    //NewE = TopoDS::Edge( anEdge.EmptyCopied() );
+    BB.Range (NewE, fpar, lpar);
+    NewE.Orientation (TopAbs_FORWARD);
+    aLocalShape = SeqVer (SeqVer.Length ()).Oriented (TopAbs_FORWARD);
+    BB.Add (NewE, TopoDS::Vertex (aLocalShape));
+    //BB.Add( NewE, TopoDS::Vertex( SeqVer(SeqVer.Length()).Oriented(TopAbs_FORWARD) ) );
+    BB.Add (NewE, Vlast.Oriented (TopAbs_REVERSED));
+    NewEdges.Append (NewE);
+
+    //Substitute anEdge by NewEdges
+    aSub.Substitute (anEdge, NewEdges);
+  }
 
-            firstind++;
-            for (i = firstind; i < Seq.Length(); i += 2)
-            {
-              aLocalShape = anEdge.EmptyCopied();
-              NewE = TopoDS::Edge( aLocalShape );
-              //NewE = TopoDS::Edge( anEdge.EmptyCopied() );
-              fpar = Seq(i);
-              lpar = Seq(i+1);
-              BB.Range( NewE, fpar, lpar );
-              //Find vertices
-              for (j = 1; j <= Seq2.Length(); j++)
-                if (Abs(fpar-Seq2(j)) <= Precision::Confusion())
-                  break;
-              NewE.Orientation( TopAbs_FORWARD );
-              TopoDS_Shape aLocalShapeCur = SeqVer(j).Oriented(TopAbs_FORWARD);
-              BB.Add( NewE, TopoDS::Vertex( aLocalShapeCur) );
-              aLocalShapeCur = SeqVer(j+1).Oriented(TopAbs_REVERSED);
-              BB.Add( NewE, TopoDS::Vertex( aLocalShapeCur ) );
-              //BB.Add( NewE, TopoDS::Vertex( SeqVer(j).Oriented(TopAbs_FORWARD) ) );
-              //BB.Add( NewE, TopoDS::Vertex( SeqVer(j+1).Oriented(TopAbs_REVERSED) ) );
-              NewEdges.Append( NewE );
-            }
-          }
+  //Removing edges connected with missing extremities of seam edges
+  TopTools_DataMapIteratorOfDataMapOfShapeShape itve (VEmap);
+  for (; itve.More (); itve.Next ())
+  {
+    TopoDS_Shape V = itve.Key ();
+    TopoDS_Shape E = itve.Value ();
+    TopoDS_Shape W;
+    for (i = 1; i <= Eseq.Length (); i++)
+    {
+      if (E.IsSame (Eseq (i)))
+      {
+        W = Wseq (i);
+        break;
+      }
+    }
+    TopoDS_Shape Etoremove;
+    eit.Initialize (W);
+    for (; eit.More (); eit.Next ())
+    {
+      TopoDS_Edge CurE = TopoDS::Edge (eit.Value ());
+      if (CurE.IsSame (E))
+        continue;
+      TopoDS_Vertex Vfirst, Vlast;
+      TopExp::Vertices (CurE, Vfirst, Vlast);
+      if (Vfirst.IsSame (V) || Vlast.IsSame (V))
+      {
+        Etoremove = CurE;
+        break;
+      }
+    }
+    if (!Etoremove.IsNull ())
+    {
+      W.Free (Standard_True);
+      BB.Remove (W, Etoremove);
+    }
+  }
 
-          i = Seq.Length();
-          fpar = Seq(i);
-          lpar = LastPar;
-          if (Abs(fpar-lpar) <= Precision::Confusion())
-            continue;
-          TopoDS_Shape aLocalShape = anEdge.EmptyCopied();
-          NewE = TopoDS::Edge( aLocalShape );
-          //NewE = TopoDS::Edge( anEdge.EmptyCopied() );
-          BB.Range( NewE, fpar, lpar );
-          NewE.Orientation( TopAbs_FORWARD );
-          aLocalShape = SeqVer(SeqVer.Length()).Oriented(TopAbs_FORWARD);
-          BB.Add( NewE, TopoDS::Vertex( aLocalShape ) );
-          //BB.Add( NewE, TopoDS::Vertex( SeqVer(SeqVer.Length()).Oriented(TopAbs_FORWARD) ) );
-          BB.Add( NewE, Vlast.Oriented(TopAbs_REVERSED) );
-          NewEdges.Append( NewE );
-
-          //Substitute anEdge by NewEdges
-          aSub.Substitute( anEdge, NewEdges );
-        }
+  aSub.Build (myShape);
+  if (aSub.IsCopied (myShape))
+  {
+    const TopTools_ListOfShape& listSh = aSub.Copy (myShape);
+    if (!listSh.IsEmpty ())
+      myShape = listSh.First ();
+  }
 
-        //Removing edges connected with missing extremities of seam edges
-        TopTools_DataMapIteratorOfDataMapOfShapeShape itve( VEmap );
-        for (; itve.More(); itve.Next())
+  //Reconstruction of wires
+  TopTools_ListOfShape theCopy;
+  TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itww (WWmap);
+  for (; itww.More (); itww.Next ())
+  {
+    CurWire = itww.Key ();
+    theCopy = aSub.Copy (CurWire);
+    CurWire = theCopy.First ();
+    CurWire.Free (Standard_True);
+    TopTools_ListIteratorOfListOfShape itl (itww.Value ());
+    for (; itl.More (); itl.Next ())
+    {
+      TopoDS_Shape aWire = itl.Value ();
+      CurFace = WFmap (aWire);
+      theCopy = aSub.Copy (aWire);
+      aWire = theCopy.First ();
+      //Adjusting period
+      TopLoc_Location L;
+      Handle (Geom_Surface) theSurf = BRep_Tool::Surface (TopoDS::Face (CurFace), L);
+      eit.Initialize (aWire);
+      for (; eit.More (); eit.Next ())
+      {
+        TopoDS_Edge anEdge = TopoDS::Edge (eit.Value ());
+        gp_Pnt2d Pfirst, Plast, Pmid;
+        BRep_Tool::UVPoints (anEdge, TopoDS::Face (CurFace), Pfirst, Plast);
+        BRepAdaptor_Curve2d bc2d (anEdge, TopoDS::Face (CurFace));
+        Pmid = bc2d.Value ((bc2d.FirstParameter () + bc2d.LastParameter ()) / 2.);
+        gp_Vec2d offset;
+        Standard_Boolean translate = Standard_False;
+        if (Pfirst.X () - 2.*M_PI > Precision::Confusion () ||
+          Plast.X () - 2.*M_PI > Precision::Confusion () ||
+          Pmid.X () - 2.*M_PI > Precision::Confusion ())
         {
-          TopoDS_Shape V = itve.Key();
-          TopoDS_Shape E = itve.Value();
-          TopoDS_Shape W;
-          for (i = 1; i <= Eseq.Length(); i++)
-            if (E.IsSame( Eseq(i) ))
-            {
-              W = Wseq(i);
-              break;
-            }
-            TopoDS_Shape Etoremove;
-            eit.Initialize( W );
-            for (; eit.More(); eit.Next())
-            {
-              TopoDS_Edge CurE = TopoDS::Edge( eit.Value() );
-              if (CurE.IsSame( E ))
-                continue;
-              TopoDS_Vertex Vfirst, Vlast;
-              TopExp::Vertices( CurE, Vfirst, Vlast );
-              if (Vfirst.IsSame( V ) || Vlast.IsSame( V ))
-              {
-                Etoremove = CurE;
-                break;
-              }
-            }
-            if (! Etoremove.IsNull())
-            {
-              W.Free( Standard_True );
-              BB.Remove( W, Etoremove );
-            }
+          offset.SetCoord (-2.*M_PI, 0);
+          translate = Standard_True;
         }
-
-        aSub.Build( myShape );
-        if (aSub.IsCopied( myShape ))
+        if (Pfirst.X () < -Precision::Confusion () ||
+          Plast.X () < -Precision::Confusion () ||
+          Pmid.X () < -Precision::Confusion ())
         {
-          const TopTools_ListOfShape& listSh = aSub.Copy( myShape );
-          if (! listSh.IsEmpty())
-            myShape = listSh.First();
+          offset.SetCoord (2.*M_PI, 0);
+          translate = Standard_True;
         }
-
-        //Reconstruction of wires
-        TopTools_ListOfShape theCopy;
-        TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itww( WWmap );
-        for (; itww.More(); itww.Next())
+        if (translate)
         {
-          CurWire = itww.Key();
-          theCopy = aSub.Copy( CurWire );
-          CurWire = theCopy.First();
-          CurWire.Free( Standard_True );
-          TopTools_ListIteratorOfListOfShape itl( itww.Value() );
-          for (; itl.More(); itl.Next())
+          const Handle (BRep_TEdge)& TE = *((Handle (BRep_TEdge)*) &anEdge.TShape ());
+          BRep_ListIteratorOfListOfCurveRepresentation itcr (TE->ChangeCurves ());
+          Handle (BRep_GCurve) GC;
+
+          for (; itcr.More (); itcr.Next ())
           {
-            TopoDS_Shape aWire = itl.Value();
-            CurFace = WFmap( aWire );
-            theCopy = aSub.Copy( aWire );
-            aWire = theCopy.First();
-            //Adjusting period
-            TopLoc_Location L;
-            Handle( Geom_Surface ) theSurf = BRep_Tool::Surface( TopoDS::Face(CurFace), L );
-            eit.Initialize( aWire );
-            for (; eit.More(); eit.Next())
+            GC = Handle (BRep_GCurve)::DownCast (itcr.Value ());
+            if (!GC.IsNull () && GC->IsCurveOnSurface (theSurf, L))
             {
-              TopoDS_Edge anEdge = TopoDS::Edge( eit.Value() );
-              gp_Pnt2d Pfirst, Plast, Pmid;
-              BRep_Tool::UVPoints( anEdge, TopoDS::Face(CurFace), Pfirst, Plast );
-              BRepAdaptor_Curve2d bc2d( anEdge, TopoDS::Face(CurFace) );
-              Pmid = bc2d.Value( (bc2d.FirstParameter()+bc2d.LastParameter())/2. );
-              gp_Vec2d offset;
-              Standard_Boolean translate = Standard_False;
-              if (Pfirst.X()-2.*M_PI > Precision::Confusion() ||
-                Plast.X()-2.*M_PI > Precision::Confusion()  ||
-                Pmid.X()-2.*M_PI > Precision::Confusion())
-              {
-                offset.SetCoord( -2.*M_PI, 0 );
-                translate = Standard_True;
-              }
-              if (Pfirst.X() < -Precision::Confusion() ||
-                Plast.X() < -Precision::Confusion()  ||
-                Pmid.X() < -Precision::Confusion())
-              {
-                offset.SetCoord( 2.*M_PI, 0 );
-                translate = Standard_True;
-              }
-              if (translate)
-              {
-                const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &anEdge.TShape());
-                BRep_ListIteratorOfListOfCurveRepresentation itcr( TE->ChangeCurves() );
-                Handle(BRep_GCurve) GC;
-
-                for (; itcr.More(); itcr.Next())
-                {
-                  GC = Handle(BRep_GCurve)::DownCast(itcr.Value());
-                  if (!GC.IsNull() && GC->IsCurveOnSurface( theSurf, L ))
-                  {
-                    Handle(Geom2d_Curve) PC = GC->PCurve();
-                    PC = Handle(Geom2d_Curve)::DownCast( PC->Translated( offset ) );
-                    GC->PCurve( PC );
-                    TE->ChangeCurves().Remove( itcr );
-                    TE->ChangeCurves().Append( GC );
-                    break;
-                  }
-                }
-              }
-            }
-            ///////////////////
-            eit.Initialize( aWire, Standard_False );
-            for (; eit.More(); eit.Next())
-            {
-              TopoDS_Shape anEdge = eit.Value();
-              BB.Add( CurWire, anEdge );
-            }
-            if (aSub.IsCopied( CurFace ))
-            {
-              theCopy = aSub.Copy( CurFace );
-              CurFace = theCopy.First();
+              Handle (Geom2d_Curve) PC = GC->PCurve ();
+              PC = Handle (Geom2d_Curve)::DownCast (PC->Translated (offset));
+              GC->PCurve (PC);
+              TE->ChangeCurves ().Remove (itcr);
+              TE->ChangeCurves ().Append (GC);
+              break;
             }
-            CurFace.Free( Standard_True );
-            BB.Remove( CurFace, aWire );
           }
         }
+      }
+      ///////////////////
+      eit.Initialize (aWire, Standard_False);
+      for (; eit.More (); eit.Next ())
+      {
+        TopoDS_Shape anEdge = eit.Value ();
+        BB.Add (CurWire, anEdge);
+      }
+      if (aSub.IsCopied (CurFace))
+      {
+        theCopy = aSub.Copy (CurFace);
+        CurFace = theCopy.First ();
+      }
+      CurFace.Free (Standard_True);
+      BB.Remove (CurFace, aWire);
+    }
+  }
 }
 //=======================================================================
 //function : CorrectVertexTol
index 9e70cfe..ddacd55 100644 (file)
@@ -357,13 +357,17 @@ void BRepOffsetAPI_ThruSections::Build()
   {
     Standard_Boolean wdeg = Standard_True;
     for (i = 1; i <= myWires.Length(); i++)
+    {
       for (explo.Init(myWires(i), TopAbs_EDGE); explo.More(); explo.Next())
       {
         const TopoDS_Edge& anEdge = TopoDS::Edge(explo.Current());
         wdeg = wdeg && (BRep_Tool::Degenerated(anEdge));
       }
-      if (wdeg)
-        throw Standard_Failure("Wrong usage of punctual sections");
+    }
+    if (wdeg)
+    {
+      throw Standard_Failure("Wrong usage of punctual sections");
+    }
   }
 
   myNbEdgesInSection = 0;
index 391ffac..d653230 100644 (file)
@@ -640,9 +640,9 @@ const TopoDS_Wire& BRepPrim_GWedge::Wire
 
 Standard_Boolean BRepPrim_GWedge::HasEdge (const BRepPrim_Direction d1,
                                   const BRepPrim_Direction d2) const
-{ 
+{
   Standard_Boolean state = !(myInfinite[BRepPrim_Wedge_NumDir1(d1)] ||
-                   myInfinite[BRepPrim_Wedge_NumDir1(d2)]); 
+                   myInfinite[BRepPrim_Wedge_NumDir1(d2)]);
   Standard_Integer i = BRepPrim_Wedge_NumDir2(d1,d2);
   if      ( i == 6 || i == 7 ) state = state && ( X2Max != X2Min );
   else if ( i == 1 || i == 3 ) state = state && ( Z2Max != Z2Min );
@@ -668,118 +668,125 @@ gp_Lin BRepPrim_GWedge::Line
   gp_Vec VX = myAxes.XDirection();
   gp_Vec VY = myAxes.YDirection();
   gp_Vec VZ = myAxes.Direction();
-  
+
   switch (i/4) {
-    
+
   case 0 :
     D = myAxes.Direction();
     break;
-    
+
   case 1 :
     D = myAxes.XDirection();
     break;
-    
+
   case 2 :
     D = myAxes.YDirection();
     break;
-    
+
   };
-  
+
   switch (i) {
-    
+
   case 0 :
     // XMin YMin
     X = XMin;
     Y = YMin;
     Z = ZMin;
     break;
-      
+
   case 1 :
     // XMin YMax
     X = X2Min;
     Y = YMax;
     Z = Z2Min;
     break;
-      
+
   case 2 :
     // XMax YMin
     X = XMax;
     Y = YMin;
     Z = ZMin;
     break;
-    
+
   case 3 :
     // XMax YMax
     X = X2Max;
     Y = YMax;
     Z = Z2Min;
     break;
-    
+
   case 4 :
     // YMin ZMin
     X = XMin;
     Y = YMin;
     Z = ZMin;
     break;
-    
+
   case 5 :
     // YMin ZMax
     X = XMin;
     Y = YMin;
     Z = ZMax;
     break;
-      
+
   case 6 :
     // YMax ZMin
     X = X2Min;
     Y = YMax;
     Z = Z2Min;
     break;
-      
+
   case 7 :
     // YMax ZMax
     X = X2Min;
     Y = YMax;
     Z = Z2Max;
     break;
-      
+
   case 8 :
     // ZMin XMin
     X = XMin;
     Y = YMin;
     Z = ZMin;
-    if ( (XMin != X2Min) || (ZMin != Z2Min) ) 
+    if ( (XMin != X2Min) || (ZMin != Z2Min) )
+    {
       D = gp_Vec( (X2Min-XMin)*VX + (YMax-YMin)*VY + (Z2Min-ZMin)*VZ);
+    }
     break;
-    
+
   case 9 :
     // ZMax XMin
     X = XMin;
     Y = YMin;
     Z = ZMax;
-    if ( (XMin != X2Min) || (ZMax != Z2Max) ) 
+    if ( (XMin != X2Min) || (ZMax != Z2Max) )
+    {
       D = gp_Vec( (X2Min-XMin)*VX + (YMax-YMin)*VY + (Z2Max-ZMax)*VZ);
+    }
     break;
-    
+
   case 10 :
     // ZMin XMax
     X = XMax;
     Y = YMin;
     Z = ZMin;
-    if ( (XMax != X2Max) || (ZMin != Z2Min) ) 
+    if ( (XMax != X2Max) || (ZMin != Z2Min) )
+    {
       D = gp_Vec( (X2Max-XMax)*VX + (YMax-YMin)*VY + (Z2Min-ZMin)*VZ);
+    }
     break;
-    
+
   case 11 :
     // ZMax XMax
     X = XMax;
     Y = YMin;
     Z = ZMax;
-    if ( (XMax != X2Max) || (ZMax != Z2Max) ) 
-      D = gp_Vec(gp_Pnt(XMax,YMin,ZMax),gp_Pnt(X2Max,YMax,Z2Max));
+    if ( (XMax != X2Max) || (ZMax != Z2Max) )
+    {
       D = gp_Vec( (X2Max-XMax)*VX + (YMax-YMin)*VY + (Z2Max-ZMax)*VZ);
+    }
     break;
-      
+
   }
 
   gp_Pnt P = myAxes.Location();
@@ -787,7 +794,7 @@ gp_Lin BRepPrim_GWedge::Line
   P.Translate(Y*gp_Vec(myAxes.YDirection()));
   P.Translate(Z*gp_Vec(myAxes.Direction ()));
   return gp_Lin(gp_Ax1(P,D));
-    
+
 }
 
 //=======================================================================
index 4f3385f..bf7aa77 100644 (file)
@@ -111,17 +111,27 @@ void BRepTools_Quilt::Add(const TopoDS_Shape& S)
   // Binds all the faces of S
   //  - to the face itself if it is not copied
   //  - to the copy if it is copied
-  if(myBounds.Contains(S)) return;
+  if(myBounds.Contains(S))
+  {
+    return;
+  }
+
   BRep_Builder B;
-  for (TopExp_Explorer wex(S,TopAbs_WIRE,TopAbs_FACE); wex.More(); wex.Next()) 
-     myBounds.Add(wex.Current(),wex.Current());
-  
+  for (TopExp_Explorer wex(S,TopAbs_WIRE,TopAbs_FACE); wex.More(); wex.Next())
+  {
+    myBounds.Add(wex.Current(),wex.Current());
+  }
+
   for (TopExp_Explorer eex(S,TopAbs_EDGE,TopAbs_WIRE); eex.More(); eex.Next())
+  {
     myBounds.Add(eex.Current(),eex.Current());
-  
+  }
+
   for (TopExp_Explorer vex(S,TopAbs_VERTEX,TopAbs_EDGE); vex.More(); vex.Next())
+  {
     myBounds.Add(vex.Current(),vex.Current());
-  
+  }
+
     // explore the faces
     for (TopExp_Explorer fex(S,TopAbs_FACE); fex.More(); fex.Next()) {
       
index 868ecce..ec0f1eb 100644 (file)
@@ -639,18 +639,31 @@ void ChFi2d_Builder::UpDateHistory(const TopoDS_Edge& E1,
                                 const Standard_Integer Id)
 {
   if (Id == 1) // the new edge is a fillet
+  {
     fillets.Append(NewEdge);
+  }
   else // the new edge is a chamfer
+  {
     chamfers.Append(NewEdge);
-    if (history.IsBound(E1)) history.UnBind(E1);
-  if ( status != ChFi2d_FirstEdgeDegenerated
-       && status != ChFi2d_BothEdgesDegenerated) {
-    if (!E1.IsSame(TrimE1)) history.Bind(E1, TrimE1);
   }
-    if (history.IsBound(E2)) history.UnBind(E2);
-  if ( status != ChFi2d_LastEdgeDegenerated
-       && status != ChFi2d_BothEdgesDegenerated) {
-    if (!E2.IsSame(TrimE2)) history.Bind(E2, TrimE2);
+
+  history.UnBind(E1);
+  if (status != ChFi2d_FirstEdgeDegenerated
+   && status != ChFi2d_BothEdgesDegenerated)
+  {
+    if (!E1.IsSame(TrimE1))
+    {
+      history.Bind(E1, TrimE1);
+    }
+  }
+  history.UnBind(E2);
+  if (status != ChFi2d_LastEdgeDegenerated
+   && status != ChFi2d_BothEdgesDegenerated)
+  {
+    if (!E2.IsSame(TrimE2))
+    {
+      history.Bind(E2, TrimE2);
+    }
   }
 } // UpDateHistory
 
index e5cb4d1..7106656 100644 (file)
@@ -936,8 +936,10 @@ static Standard_Integer movepole (Draw_Interpretor& , Standard_Integer n, const
   if (GBz.IsNull()) {
     GBs = DrawTrSurf::GetBSplineSurface(a[1]);
     if (GBs.IsNull())
+    {
       return 1;
-      BSpline = Standard_True;
+    }
+    BSpline = Standard_True;
   }
 
   Standard_Real dx = Draw::Atof(a[n-3]);
@@ -1227,8 +1229,10 @@ static Standard_Integer sfindp (Draw_Interpretor& , Standard_Integer n, const ch
   if (GBz.IsNull()) {
     GBs = DrawTrSurf::GetBSplineSurface(a[1]);
     if (GBs.IsNull())
+    {
       return 1;
-      BSpline = Standard_True;
+    }
+    BSpline = Standard_True;
   }
 
   Standard_Integer UIndex = 0;
index 47e9a53..e8c9230 100644 (file)
@@ -2084,22 +2084,23 @@ HLRBRep_Data::RejectedPoint (const IntRes2d_IntersectionPoint& PInter,
 
   switch (Tr1->TransitionType()) {                 // compute the transition
   case IntRes2d_In :
-    if (myFEOri == TopAbs_REVERSED)   Orie = TopAbs_REVERSED;
-    else                              Orie = TopAbs_FORWARD ; break;
+    Orie = (myFEOri == TopAbs_REVERSED ? TopAbs_REVERSED : TopAbs_FORWARD);
+    break;
   case IntRes2d_Out :
-    if (myFEOri == TopAbs_REVERSED)   Orie = TopAbs_FORWARD ;
-    else                              Orie = TopAbs_REVERSED; break;
+    Orie = (myFEOri == TopAbs_REVERSED ? TopAbs_FORWARD : TopAbs_REVERSED);
+    break;
   case IntRes2d_Touch :
     switch (Tr1->Situation()) {
     case IntRes2d_Inside :
-      if (myFEOri == TopAbs_REVERSED) Orie = TopAbs_EXTERNAL;
-      else                            Orie = TopAbs_INTERNAL; break;
+      Orie = (myFEOri == TopAbs_REVERSED ? TopAbs_EXTERNAL : TopAbs_INTERNAL);
+      break;
     case IntRes2d_Outside :
-      if (myFEOri == TopAbs_REVERSED) Orie = TopAbs_INTERNAL;
-      else                            Orie = TopAbs_EXTERNAL; break;
+      Orie = (myFEOri == TopAbs_REVERSED ? TopAbs_INTERNAL : TopAbs_EXTERNAL);
+      break;
     case IntRes2d_Unknown :
       return Standard_True;
-    }                                                         break;
+    }
+    break;
   case IntRes2d_Undecided :
     return Standard_True;
   }
index 73591b8..01a2a4b 100644 (file)
@@ -2438,12 +2438,16 @@ Handle(IFSelect_Dispatch)  IFSelect_Functions::GiveDispatch
 //  ####    INITIALISATIONS              ####
 //  #########################################
 
-static int initactor = 0;
+static int THE_IFSelect_Functions_initactor = 0;
 
-
-    void  IFSelect_Functions::Init ()
+void IFSelect_Functions::Init()
 {
-  if (initactor) return;  initactor = 1;
+  if (THE_IFSelect_Functions_initactor)
+  {
+    return;
+  }
+
+  THE_IFSelect_Functions_initactor = 1;
   IFSelect_Act::SetGroup("DE: General");
   IFSelect_Act::AddFunc("xstatus","Lists XSTEP Status : Version, System Name ...",funstatus);
   IFSelect_Act::AddFunc("handler","Toggle status catch Handler Error of the session",fun1);
index f0bbb20..987c474 100644 (file)
@@ -36,19 +36,30 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SessionPilot,IFSelect_Activator)
 #define MAXWORDS 200
 #define MAXCARS 1000
 
-static int initactor = 0;
+static int THE_IFSelect_SessionPilot_initactor = 0;
 static TCollection_AsciiString nulword;
 
 //#define DEBUG_TRACE
 
 // Nb Maxi de words : cf thewords et method SetCommandLine
 
-    IFSelect_SessionPilot::IFSelect_SessionPilot (const Standard_CString prompt)
-    : theprompt (prompt) , thewords (0,MAXWORDS-1) , thewordeb (0,MAXWORDS-1)
+IFSelect_SessionPilot::IFSelect_SessionPilot (const Standard_CString prompt)
+: theprompt (prompt),
+  thewords  (0, MAXWORDS - 1),
+  thewordeb (0, MAXWORDS - 1)
 {
-  if (theprompt.Length() == 0) theprompt.AssignCat ("Test-XSTEP>");
-  therecord = Standard_False;  thenbwords = 0;
-  if (initactor) return;  initactor = 1;
+  if (theprompt.Length() == 0)
+  {
+    theprompt.AssignCat ("Test-XSTEP>");
+  }
+  therecord = Standard_False;
+  thenbwords = 0;
+  if (THE_IFSelect_SessionPilot_initactor)
+  {
+    return;
+  }
+
+  THE_IFSelect_SessionPilot_initactor = 1;
   Add (1,"x");
   Add (1,"exit");
   Add (2,"?");
index 75152a2..6ebb790 100644 (file)
@@ -3055,7 +3055,14 @@ Handle(IFSelect_Selection) IFSelect_WorkSession::GiveSelection
   }
 
   Handle(IFSelect_Selection) sel;
-  if (np >= 0) nomsel[np] = 0;  if (nf >= 0) nomsel[nf] = '\0';
+  if (np >= 0)
+  {
+    nomsel[np] = 0;
+  }
+  if (nf >= 0)
+  {
+    nomsel[nf] = '\0';
+  }
   Handle(Standard_Transient) item = NamedItem(nomsel);
 
 //  Parentheses ? essayer Signature (plus tard : Selection parametree)
@@ -3171,7 +3178,8 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::GiveListFromList
       if (selname[i] == ' ') continue;
       if (selname[i] == ',' || selname[i] == ')') {
        entid[j] = '\0';
-       if (j == 0) continue;  j = 0;
+       if (j == 0) continue;
+       j = 0;
        num = NumberFromLabel (entid);
        if (num <= 0 || !numap.Add (num)) continue;
        Handle(Standard_Transient) anent = StartingEntity(num);
index 3c6c895..243db1e 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_Protocol,IGESData_Protocol)
 
-static int deja = 0;
+static int THE_IGESAppli_Protocol_deja = 0;
+
 static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
   atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
   atype16,atype17,atype18,atype19;
 
-    IGESAppli_Protocol::IGESAppli_Protocol ()
+IGESAppli_Protocol::IGESAppli_Protocol()
 {
-  if (deja) return;  deja = 1;
+  if (THE_IGESAppli_Protocol_deja)
+  {
+    return;
+  }
+
+  THE_IGESAppli_Protocol_deja = 1;
   atype01 = STANDARD_TYPE(IGESAppli_DrilledHole);
   atype02 = STANDARD_TYPE(IGESAppli_ElementResults);
   atype03 = STANDARD_TYPE(IGESAppli_FiniteElement);
index 2bc1031..5a26492 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(IGESBasic_Protocol,IGESData_Protocol)
 
-static int deja = 0;
+static int THE_IGESBasic_Protocol_deja = 0;
+
 static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
   atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,atype16;
 
-    IGESBasic_Protocol::IGESBasic_Protocol ()
+IGESBasic_Protocol::IGESBasic_Protocol()
 {
-  if (deja) return;  deja = 1;
+  if (THE_IGESBasic_Protocol_deja)
+  {
+    return;
+  }
+
+  THE_IGESBasic_Protocol_deja = 1;
   atype01 = STANDARD_TYPE(IGESBasic_AssocGroupType);
   atype02 = STANDARD_TYPE(IGESBasic_ExternalRefFile);
   atype03 = STANDARD_TYPE(IGESBasic_ExternalRefFileIndex);
index 1c67f28..23d9115 100644 (file)
@@ -394,7 +394,12 @@ IGESData_IGESReaderTool::IGESData_IGESReaderTool
     PR.SendFail(Msg221);
     return;
   }
-  if (nbprops == 0) return;  ncur ++;
+  if (nbprops == 0)
+  {
+    return;
+  }
+
+  ++ncur;
   Interface_EntityList props;
   if (PR.ReadEntList
       (IR,PR.CurrentList(nbprops),Msg38, props,Standard_False) )
index 2b78a4b..36c12c5 100644 (file)
@@ -57,7 +57,7 @@
 IGESData_IGESWriter::IGESData_IGESWriter
   (const Handle(IGESData_IGESModel)& amodel)
     : thedirs(0,amodel->NbEntities()) , thepnum(1,amodel->NbEntities()+1),
-      thecurr (MaxcarsG+1) , themodew (0) , thefloatw (9) 
+      thecurr (MaxcarsG+1) , themodew (0) , thefloatw (9)
 {
   themodel = amodel;
   thehead  = new TColStd_HSequenceOfHAsciiString();
@@ -90,7 +90,7 @@ IGESData_IGESWriter::IGESData_IGESWriter
 
 //=======================================================================
 //function : SendStartLine
-//purpose  : 
+//purpose  :
 //=======================================================================
 void IGESData_IGESWriter::SendStartLine (const Standard_CString startline)
 {
@@ -506,7 +506,7 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
       writefnes (S,"                                                                        S0000001");
     }
     else S<<"                                                                        S0000001";
-//      123456789 123456789 123456789 123456789 123456789 123456789 123456789 12 
+//      123456789 123456789 123456789 123456789 123456789 123456789 123456789 12
     S << endl;
   } else {
     nbs = thestar->Length();
@@ -520,7 +520,8 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
 //    for (Standard_Integer k = line->Length()+1; k <= MaxcarsG; k ++)  S<<' ';
       S << &blancs[line->Length()];
       if (fnes) writefnes (S,finlin);
-      else S << finlin;  S << endl;
+      else S << finlin;
+      S << endl;
     }
   }
 #ifdef PATIENCELOG
@@ -539,7 +540,8 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
 //    for (Standard_Integer k = line->Length()+1; k <= MaxcarsG; k ++)  S<<' ';
     S << &blancs[line->Length()];
     if (fnes) writefnes (S,finlin);
-    else S << finlin;  S << endl;
+    else S << finlin;
+    S << endl;
     isGood = S.good();
   }
   if(!isGood)
@@ -564,11 +566,13 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
            v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],
            v[8],v[9],v[10],v[11] ,2*i-1);
     if (fnes) writefnes (S,ligne);
-    else S << ligne;  S<< "\n";
+    else S << ligne;
+    S<< "\n";
     sprintf(ligne,"%8d%8d%8d%8d%8d%8s%8s%8s%8sD%7.7d",
            v[0],v[13],v[14],v[15],v[16],res1,res2,lab,num,2*i);
     if (fnes) writefnes (S,ligne);
-    else S << ligne;  S<< "\n";
+    else S << ligne;
+    S<< "\n";
 //    cout << "Ent.no "<<i<<" No en P "<<thepnum.Value(i)<<
 //      " Lignes P:"<<thepnum.Value(i+1)-thepnum.Value(i)<<endl;
 //    for (j = 0; j < 17; j ++) S<<v[j]<<" ";
@@ -582,7 +586,7 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
   cout<<" Parameter Section : "<<thepnum.Value(nbd)-1
       <<" lines (* = 1000 lines) "<<flush;
 #endif
-  
+
   blancs[MaxcarsP] = '\0';
   for (i = 1; i <= nbd && isGood; i ++) {
     for (Standard_Integer j = thepnum.Value(i); j < thepnum.Value(i+1); j ++) {
@@ -596,7 +600,8 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
 //      for (Standard_Integer k = line->Length()+1; k <= MaxcarsP; k ++)S<<' ';
       S << &blancs[line->Length()];
       if (fnes) writefnes (S,finlin);
-      else S << finlin;  S << endl;
+      else S << finlin;
+      S << endl;
       isGood = S.good();
 #ifdef PATIENCELOG
       lignespatience --;
@@ -612,7 +617,8 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
           nbs,nbg,nbd*2,thepnum.Value(thepnum.Length())-1);
 //   12345678- 16- 24- 32  56789 123456789 123456789 123456789 12
   if (fnes) writefnes (S,ligne);
-  else S << ligne;  S<< "\n";
+  else S << ligne;
+  S<< "\n";
   S.flush();
   isGood = S.good();
 #ifdef PATIENCELOG
index a38f957..c96590a 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(IGESDefs_Protocol,IGESData_Protocol)
 
-static int deja = 0;
+static int THE_IGESDefs_Protocol_deja = 0;
+
 static Handle(Standard_Type) atype1,atype2,atype3,atype4,atype5,atype6,atype7;
 
-    IGESDefs_Protocol::IGESDefs_Protocol ()
+IGESDefs_Protocol::IGESDefs_Protocol()
 {
-  if (deja) return;  deja = 1;
+  if (THE_IGESDefs_Protocol_deja)
+  {
+    return;
+  }
+
+  THE_IGESDefs_Protocol_deja = 1;
   atype1 = STANDARD_TYPE(IGESDefs_AssociativityDef);
   atype2 = STANDARD_TYPE(IGESDefs_AttributeDef);
   atype3 = STANDARD_TYPE(IGESDefs_AttributeTable);
@@ -54,7 +60,7 @@ static Handle(Standard_Type) atype1,atype2,atype3,atype4,atype5,atype6,atype7;
 
     Standard_Integer IGESDefs_Protocol::TypeNumber
   (const Handle(Standard_Type)& atype) const
-{   
+{
   if      (atype == atype1) return 1;
   else if (atype == atype2) return 2;
   else if (atype == atype3) return 3;
index 6464087..1aba523 100644 (file)
@@ -399,23 +399,40 @@ void IGESDefs_ToolAttributeDef::OwnCheck
     }
     else if (fn == 0) continue;
     mess[0] = '\0';
-    switch (aty) {
-      case 1 : if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfInteger)))
-       sprintf(mess,"Attribute List n0.%d (Integers) badly defined", aty);
-       break;
-      case 2 : if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfReal)))
-       sprintf(mess,"Attribute List n0.%d (Reals) badly defined", aty);
-       break;
-      case 3 : if (!list->IsKind(STANDARD_TYPE(Interface_HArray1OfHAsciiString)))
-       sprintf(mess,"Attribute List n0.%d (Strings) badly defined", aty);
-       break;
-      case 4 : if (!list->IsKind(STANDARD_TYPE(IGESData_HArray1OfIGESEntity)))
-       sprintf(mess,"Attribute List n0.%d (IGES Pointers) badly defined", aty);
-       break;
-      case 6 : if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfInteger)))
-       sprintf(mess,"Attribute List n0.%d (Logicals i.e. Integers) badly defined", aty);
-       break;
-      default : break;
+    switch (aty)
+    {
+      case 1:
+        if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfInteger)))
+        {
+          sprintf(mess,"Attribute List n0.%d (Integers) badly defined", aty);
+        }
+        break;
+      case 2:
+        if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfReal)))
+        {
+          sprintf(mess,"Attribute List n0.%d (Reals) badly defined", aty);
+        }
+        break;
+      case 3:
+        if (!list->IsKind(STANDARD_TYPE(Interface_HArray1OfHAsciiString)))
+        {
+          sprintf(mess,"Attribute List n0.%d (Strings) badly defined", aty);
+        }
+        break;
+      case 4:
+        if (!list->IsKind(STANDARD_TYPE(IGESData_HArray1OfIGESEntity)))
+        {
+          sprintf(mess,"Attribute List n0.%d (IGES Pointers) badly defined", aty);
+        }
+        break;
+      case 6:
+        if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfInteger)))
+        {
+          sprintf(mess,"Attribute List n0.%d (Logicals i.e. Integers) badly defined", aty);
+        }
+        break;
+      default:
+        break;
     }
     if (mess[0] != '\0') ach->AddFail(mess);
   }
index 87330aa..f00ec90 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(IGESDimen_Protocol,IGESData_Protocol)
 
-static int deja = 0;
+static int THE_IGESDimen_Protocol_deja = 0;
+
 static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
   atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
   atype16,atype17,atype18,atype19,atype20,atype21,atype22,atype23;
 
-    IGESDimen_Protocol::IGESDimen_Protocol ()
+IGESDimen_Protocol::IGESDimen_Protocol()
 {
-  if (deja) return;  deja = 1;
+  if (THE_IGESDimen_Protocol_deja)
+  {
+    return;
+  }
+
+  THE_IGESDimen_Protocol_deja = 1;
   atype01 = STANDARD_TYPE(IGESDimen_AngularDimension);
   atype02 = STANDARD_TYPE(IGESDimen_BasicDimension);
   atype03 = STANDARD_TYPE(IGESDimen_CenterLine);
index 95621fd..e835ea2 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_Protocol,IGESData_Protocol)
 
-static int deja = 0;
+static int THE_IGESDraw_Protocol_deja = 0;
 static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
   atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14;
 
-    IGESDraw_Protocol::IGESDraw_Protocol ()
+IGESDraw_Protocol::IGESDraw_Protocol()
 {
-  if (deja) return;  deja = 1;
+  if (THE_IGESDraw_Protocol_deja)
+  {
+    return;
+  }
+
+  THE_IGESDraw_Protocol_deja = 1;
   atype01 = STANDARD_TYPE(IGESDraw_CircArraySubfigure);
   atype02 = STANDARD_TYPE(IGESDraw_ConnectPoint);
   atype03 = STANDARD_TYPE(IGESDraw_Drawing);
index 01117dc..4453ef5 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_Protocol,IGESData_Protocol)
 
-static int deja = 0;
+static int THE_IGESGeom_Protocol_deja = 0;
 static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
   atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
   atype16,atype17,atype18,atype19,atype20,atype21,atype22,atype23;
 
-    IGESGeom_Protocol::IGESGeom_Protocol ()
+IGESGeom_Protocol::IGESGeom_Protocol()
 {
-  if (deja) return;  deja = 1;
+  if (THE_IGESGeom_Protocol_deja)
+  {
+    return;
+  }
+  THE_IGESGeom_Protocol_deja = 1;
   atype01 = STANDARD_TYPE(IGESGeom_BSplineCurve);
   atype02 = STANDARD_TYPE(IGESGeom_BSplineSurface);
   atype03 = STANDARD_TYPE(IGESGeom_Boundary);
index eb611fa..3343c29 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(IGESGraph_Protocol,IGESData_Protocol)
 
-static int deja = 0;
+static int THE_IGESGraph_Protocol_deja = 0;
 static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
   atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14;
 
-    IGESGraph_Protocol::IGESGraph_Protocol ()
+IGESGraph_Protocol::IGESGraph_Protocol()
 {
-  if (deja) return;  deja = 1;
+  if (THE_IGESGraph_Protocol_deja)
+  {
+    return;
+  }
+  THE_IGESGraph_Protocol_deja = 1;
   atype01 = STANDARD_TYPE(IGESGraph_Color);
   atype02 = STANDARD_TYPE(IGESGraph_DefinitionLevel);
   atype03 = STANDARD_TYPE(IGESGraph_DrawingSize);
index d8cff42..2cde323 100644 (file)
@@ -100,28 +100,70 @@ Standard_Boolean  IGESGraph_ToolDrawingUnits::OwnCorrect
   Standard_CString unm = "";
   if (!ent->Unit().IsNull()) unm  = ent->Unit()->ToCString();
   switch (unf) {
-    case  1 : if ((strcmp(unm,"IN") == 0) || (strcmp(unm,"INCH") == 0))
-      name = new TCollection_HAsciiString ("IN");  break;
-    case  2 : if (strcmp(unm,"MM") == 0)
-      name = new TCollection_HAsciiString ("MM");  break;
-    case  3 : break;  // nom libre
-    case  4 : if (strcmp(unm,"FT") == 0)
-      name = new TCollection_HAsciiString ("FT");  break;
-    case  5 : if (strcmp(unm,"MI") == 0)
-      name = new TCollection_HAsciiString ("MI");  break;
-    case  6 : if (strcmp(unm,"M") == 0)
-      name = new TCollection_HAsciiString ("M");   break;
-    case  7 : if (strcmp(unm,"KM") == 0)
-      name = new TCollection_HAsciiString ("KM");  break;
-    case  8 : if (strcmp(unm,"MIL") == 0)
-      name = new TCollection_HAsciiString ("MIL"); break;
-    case  9 : if (strcmp(unm,"UM") == 0)
-      name = new TCollection_HAsciiString ("UM");  break;
-    case 10 : if (strcmp(unm,"CM") == 0)
-      name = new TCollection_HAsciiString ("CM");  break;
-    case 11 : if (strcmp(unm,"UIN") == 0)
-      name = new TCollection_HAsciiString ("UIN"); break;
-    default : break;    // on ne peut rien faire ... ?
+    case  1:
+      if ((strcmp(unm,"IN") == 0) || (strcmp(unm,"INCH") == 0))
+      {
+        name = new TCollection_HAsciiString ("IN");
+      }
+      break;
+    case  2:
+      if (strcmp(unm,"MM") == 0)
+      {
+        name = new TCollection_HAsciiString ("MM");
+      }
+      break;
+    case  3:
+      break;  // nom libre
+    case  4:
+      if (strcmp(unm,"FT") == 0)
+      {
+        name = new TCollection_HAsciiString ("FT");
+      }
+      break;
+    case  5:
+      if (strcmp(unm,"MI") == 0)
+      {
+        name = new TCollection_HAsciiString ("MI");
+      }
+      break;
+    case  6:
+      if (strcmp(unm,"M") == 0)
+      {
+        name = new TCollection_HAsciiString ("M");
+      }
+      break;
+    case  7:
+      if (strcmp(unm,"KM") == 0)
+      {
+        name = new TCollection_HAsciiString ("KM");
+      }
+      break;
+    case  8:
+      if (strcmp(unm,"MIL") == 0)
+      {
+        name = new TCollection_HAsciiString ("MIL");
+      }
+      break;
+    case  9:
+      if (strcmp(unm,"UM") == 0)
+      {
+        name = new TCollection_HAsciiString ("UM");
+      }
+      break;
+    case 10:
+      if (strcmp(unm,"CM") == 0)
+      {
+        name = new TCollection_HAsciiString ("CM");
+      }
+      break;
+    case 11:
+      if (strcmp(unm,"UIN") == 0)
+      {
+        name = new TCollection_HAsciiString ("UIN");
+      }
+      break;
+    default:
+      break;    // on ne peut rien faire ... ?
   }
 
   res |= (!name.IsNull());
index dcd66b4..33ab49d 100644 (file)
 #include <stdio.h>
 IMPLEMENT_STANDARD_RTTIEXT(IGESSelect_Activator,IFSelect_Activator)
 
-static int initActivator = 0;
+static int THE_IGESSelect_Activator_initActivator = 0;
 
-    IGESSelect_Activator::IGESSelect_Activator ()
+IGESSelect_Activator::IGESSelect_Activator()
 {
-  if (initActivator) return;  initActivator = 1;
+  if (THE_IGESSelect_Activator_initActivator)
+  {
+    return;
+  }
+  THE_IGESSelect_Activator_initActivator = 1;
 //  Add ( 0,"load");
 //  Add ( 0,"loadiges");    // homonyme
   SetForGroup ("XSTEP-IGES");
index c278ff1..1db40fb 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_Protocol,IGESData_Protocol)
 
-static int deja = 0;
+static int THE_IGESSolid_Protocol_deja = 0;
 static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
   atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
   atype16,atype17,atype18,atype19,atype20,atype21,atype22,atype23,atype24;
 
-    IGESSolid_Protocol::IGESSolid_Protocol ()
+IGESSolid_Protocol::IGESSolid_Protocol()
 {
-  if (deja) return;  deja = 1;
+  if (THE_IGESSolid_Protocol_deja)
+  {
+    return;
+  }
+  THE_IGESSolid_Protocol_deja = 1;
   atype01 = STANDARD_TYPE(IGESSolid_Block);
   atype02 = STANDARD_TYPE(IGESSolid_BooleanTree);
   atype03 = STANDARD_TYPE(IGESSolid_ConeFrustum);
index e588b43..e346878 100644 (file)
@@ -2098,6 +2098,7 @@ IntSurf_PntOn2S MakeNewPoint(const IntSurf_PntOn2S& replacePnt,
 
   Standard_Integer i;
   for (i = 0; i < 4; i++)
+  {
     if (Periods[i] != 0.)
     {
       if (Abs(NewParams[i] - OldParams[i]) >= 0.5*Periods[i])
@@ -2108,9 +2109,10 @@ IntSurf_PntOn2S MakeNewPoint(const IntSurf_PntOn2S& replacePnt,
           NewParams[i] -= Periods[i];
       }
     }
+  }
 
-    NewPoint.SetValue(NewParams[0], NewParams[1], NewParams[2], NewParams[3]);
-    return NewPoint;
+  NewPoint.SetValue(NewParams[0], NewParams[1], NewParams[2], NewParams[3]);
+  return NewPoint;
 }
 
 //==================================================================================
index e7e8fe7..01abd92 100644 (file)
@@ -23,7 +23,7 @@
 #include <TColStd_SequenceOfAsciiString.hxx>
 #include <NCollection_Vector.hxx>
 
-static int init = 0;
+static int THE_Interface_Category_init = 0;
 static Standard_CString unspec = "unspecified";
 
 static Standard_Mutex gMapTypesMutex;
@@ -111,16 +111,21 @@ void Interface_Category::Init ()
     gMapTypesMutex.Lock();
     if ( !gMapTypesInit )
     {
-      if (init) return;  init = 1;
-      init = Interface_Category::AddCategory ("Shape");
-      init = Interface_Category::AddCategory ("Drawing");
-      init = Interface_Category::AddCategory ("Structure");
-      init = Interface_Category::AddCategory ("Description");
-      init = Interface_Category::AddCategory ("Auxiliary");
-      init = Interface_Category::AddCategory ("Professional");
-      init = Interface_Category::AddCategory ("FEA");
-      init = Interface_Category::AddCategory ("Kinematics");
-      init = Interface_Category::AddCategory ("Piping");
+      if (THE_Interface_Category_init)
+      {
+        return;
+      }
+
+      THE_Interface_Category_init = 1;
+      Interface_Category::AddCategory ("Shape");
+      Interface_Category::AddCategory ("Drawing");
+      Interface_Category::AddCategory ("Structure");
+      Interface_Category::AddCategory ("Description");
+      Interface_Category::AddCategory ("Auxiliary");
+      Interface_Category::AddCategory ("Professional");
+      Interface_Category::AddCategory ("FEA");
+      Interface_Category::AddCategory ("Kinematics");
+      Interface_Category::AddCategory ("Piping");
 
       gMapTypesInit = Standard_True;
     }
index 4a7e6b6..ca13da9 100644 (file)
@@ -272,27 +272,70 @@ Interface_CheckStatus Interface_CheckIterator::Status () const
 
 //=======================================================================
 //function : Complies
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 Standard_Boolean Interface_CheckIterator::Complies
   (const Interface_CheckStatus stat) const
 {
-  Standard_Boolean res = Standard_False;
-  if (stat == Interface_CheckNoFail) res = Standard_True;
-  Standard_Integer i, nb = thelist->Length();
-  for (i = 1; i <= nb; i ++) {
+  Standard_Boolean res = (stat == Interface_CheckNoFail);
+  Standard_Integer nb = thelist->Length();
+  for (Standard_Integer i = 1; i <= nb; ++i)
+  {
     const Handle(Interface_Check) ach = thelist->Value(i);
     Standard_Integer nbf = ach->NbFails(), nbw = ach->NbWarnings();
-    switch (stat) {
-    case Interface_CheckOK      : if (nbf + nbw > 0) return Standard_False; break;
-    case Interface_CheckWarning : if (nbf > 0) return Standard_False;
-                                 if (nbw > 0) res  = Standard_True;  break;
-    case Interface_CheckFail    : if (nbf > 0) return Standard_True;  break;
-    case Interface_CheckAny     : return Standard_True;
-    case Interface_CheckMessage : if (nbf + nbw > 0) return Standard_True;  break;
-    case Interface_CheckNoFail  : if (nbf > 0) return Standard_False;  break;
-    default : break;
+    switch (stat)
+    {
+      case Interface_CheckOK:
+      {
+        if (nbf + nbw > 0)
+        {
+          return Standard_False;
+        }
+        break;
+      }
+      case Interface_CheckWarning:
+      {
+        if (nbf > 0)
+        {
+          return Standard_False;
+        }
+        if (nbw > 0)
+        {
+          res  = Standard_True;
+        }
+        break;
+      }
+      case Interface_CheckFail:
+      {
+        if (nbf > 0)
+        {
+          return Standard_True;
+        }
+        break;
+      }
+      case Interface_CheckAny:
+      {
+        return Standard_True;
+      }
+      case Interface_CheckMessage:
+      {
+        if (nbf + nbw > 0)
+        {
+          return Standard_True;
+        }
+        break;
+      }
+      case Interface_CheckNoFail:
+      {
+        if (nbf > 0)
+        {
+          return Standard_False;
+        }
+        break;
+      }
+      default:
+        break;
     }
   }
   return res;
index 8ce57f7..9d9ee4c 100644 (file)
@@ -41,9 +41,9 @@ static Standard_Integer thenm0 = -1;
 static Standard_Integer thenp0 = -1;
 
 
-Interface_FileReaderData::Interface_FileReaderData (const Standard_Integer nbr, 
+Interface_FileReaderData::Interface_FileReaderData (const Standard_Integer nbr,
                                                    const Standard_Integer npar)
-     : therrload (0), thenumpar (0,nbr), theents (0,nbr) 
+     : therrload (0), thenumpar (0,nbr), theents (0,nbr)
 {
   theparams = new Interface_ParamSet (npar);
   thenumpar.Init(0);
@@ -189,7 +189,7 @@ Interface_FileReaderData::Interface_FileReaderData (const Standard_Integer nbr,
 const Handle(Standard_Transient)& Interface_FileReaderData::BoundEntity
        (const Standard_Integer num) const
        //      {  return theents(num);  }
-{ 
+{
   if (num >= theents.Lower() && num <= theents.Upper()) {
     return theents(num);
   }
@@ -205,14 +205,14 @@ const Handle(Standard_Transient)& Interface_FileReaderData::BoundEntity
       OCC_CATCH_SIGNALS
       Handle(Standard_Transient) temp = theents.Value(num);
     }
-  ////sln 21.01.2002 OCC133: Exception handling 
+  ////sln 21.01.2002 OCC133: Exception handling
  // catch (Standard_OutOfRange) {
  //   cout<<" Catch of sln"<<endl;
-    
+
  //   return dummy;
  // }
     catch (Standard_Failure) {
-      
+
     // some work-around, the best would be to modify CDL to
     // return "Handle(Standard_Transient)" not "const Handle(Standard_Transient)&"
       static Handle(Standard_Transient) dummy;
@@ -222,7 +222,7 @@ const Handle(Standard_Transient)& Interface_FileReaderData::BoundEntity
   }
    //cout<<" Normal"<<endl;
   if (theents.Value(num).IsImmutable()) cout << "IMMUTABLE:"<<num<<endl;
-  return theents(num); 
+  return theents(num);
 }
 */
 
@@ -357,34 +357,64 @@ static const Standard_Real vtab[] =
   prem = MAXCHIF + 1;  point = -1;  //   ligne[MAXCHIF+1] = '\0';  fin forcee
 
 /*  Analyse de la ligne (reputee representer un Flottant)  */
-  for (i = 0; ; i ++) {    // critere d arret : cf '\0'
+  for (i = 0; ; i ++) // critere d arret : cf '\0'
+  {
     const char& car = ligne[i];
 /* critere d arret : ne pas l oublier, mais eviter de freiner le traitement
    DONC, une fois en fin, plus une fois pour 1er passage
     if (car == '\0')
       {  if (point < 0) {  point = i; jx = point - prem; };  break;  }   */
 
-    if (prem > MAXCHIF) {
+    if (prem > MAXCHIF)
+    {
       if (car == '0') continue;
       if (car == '.') {  point = i;  continue;  }
       if (car == '+') continue;
       if (car == '-') {  moins = 1;  continue;  }
       if (car == '\0')
-       {  if (point < 0) {  point = i; jx = point - prem; };  break;  }
-      if (car < 33) continue;
+      {
+        if (point < 0)
+        {
+          point = i;
+          jx = point - prem;
+        }
+        break;
+      }
+      if (car < 33)
+      {
+        continue;
+      }
       prem = i;
-      if (point >= 0) jx = point - prem + 1;
+      if (point >= 0)
+      {
+        jx = point - prem + 1;
+      }
     }
     if (car > 48 && car <= 57)
-      {  chiffre[j] = car - 48;  jj = ++j;  continue;  }    // j++ puis jj = j
+    {
+      chiffre[j] = car - 48;
+      jj = ++j; // j++ puis jj = j
+      continue;
+    }
     if (car == '0') {  chiffre[j] = 0;  j ++;  continue;  }
     if (car == '.') {  point = i;  jx = point - prem;  continue;  }
     if ((car & 94) == 68) { // prend  : e E d D
       je = i;     exp = atoi(&ligne[i+1]);     jx += exp;
-      if (exp < -100 || exp > 100) grexp = 1;  break;
+      if (exp < -100 || exp > 100)
+      {
+        grexp = 1;
+      }
+      break;
     }
     if (car == '\0')
-      {  if (point < 0) {  point = i; jx = point - prem; };  break;  }
+    {
+      if (point < 0)
+      {
+        point = i;
+        jx = point - prem;
+      }
+      break;
+    }
   }
 
 /*  Interpretation  : on decale le Point Decimal selon l Exposant
index 9909c58..0561f9b 100644 (file)
 
 #include "../XSMessage/XSMessage_XSTEP_us.pxx"
 
-static int deja = 0;
+static int THE_Interface_Static_deja = 0;
 
 void  Interface_Static::Standards ()
 {
-  if (deja) return;  deja = 1;
+  if (THE_Interface_Static_deja)
+  {
+    return;
+  }
+
+  THE_Interface_Static_deja = 1;
 
 //   read precision
   //#74 rln 10.03.99 S4135: new values and default value
index f657d00..c228e12 100644 (file)
@@ -414,53 +414,57 @@ static Standard_Boolean ExactBound(gp_Pnt& Sol,
   Seq.Append(gp_Pnt(LastV, RV2, 3));
   Standard_Integer i, j;
   for(i = 1; i <= 3; i++)
+  {
     for(j = 1; j <= 4-i; j++)
-      if(Seq(j).Y() < Seq(j+1).Y()) 
+    {
+      if(Seq(j).Y() < Seq(j+1).Y())
       {
         gp_Pnt swp;
         swp = Seq.Value(j+1);
         Seq.ChangeValue(j+1) = Seq.Value(j);
         Seq.ChangeValue(j) = swp;
       }
+    }
+  }
 
-      t = Sol.X();
-      t1 = Min(Sol.X(), NotSol);
-      t2 = Max(Sol.X(), NotSol);
+  t = Sol.X ();
+  t1 = Min (Sol.X (), NotSol);
+  t2 = Max (Sol.X (), NotSol);
 
-      Standard_Boolean isDone = Standard_False;
-      while (!Seq.IsEmpty()) 
-      {
-        gp_Pnt P;
-        P = Seq.Last();
-        Seq.Remove(Seq.Length());
-        ProjLib_PrjResolve aPrjPS(Curve->Curve(), 
-          Surface->Surface(), 
-          Standard_Integer(P.Z()));
-        if(Standard_Integer(P.Z()) == 2) 
-        {
-          aPrjPS.Perform(t, P.X(), V0, gp_Pnt2d(Tol, TolV), 
-            gp_Pnt2d(t1, Surface->FirstVParameter()), 
-            gp_Pnt2d(t2, Surface->LastVParameter()), FuncTol);
-          if(!aPrjPS.IsDone()) continue;
-          POnS = aPrjPS.Solution();
-          Sol = gp_Pnt(POnS.X(), P.X(), POnS.Y());
-          isDone = Standard_True;
-          break;
-        }
-        else 
-        {
-          aPrjPS.Perform(t, U0, P.X(), gp_Pnt2d(Tol, TolU), 
-            gp_Pnt2d(t1, Surface->FirstUParameter()), 
-            gp_Pnt2d(t2, Surface->LastUParameter()), FuncTol);
-          if(!aPrjPS.IsDone()) continue;
-          POnS = aPrjPS.Solution();
-          Sol = gp_Pnt(POnS.X(), POnS.Y(), P.X());
-          isDone = Standard_True;
-          break;
-        }
-      }
+  Standard_Boolean isDone = Standard_False;
+  while (!Seq.IsEmpty ())
+  {
+    gp_Pnt P;
+    P = Seq.Last ();
+    Seq.Remove (Seq.Length ());
+    ProjLib_PrjResolve aPrjPS (Curve->Curve (),
+      Surface->Surface (),
+      Standard_Integer (P.Z ()));
+    if (Standard_Integer (P.Z ()) == 2)
+    {
+      aPrjPS.Perform (t, P.X (), V0, gp_Pnt2d (Tol, TolV),
+        gp_Pnt2d (t1, Surface->FirstVParameter ()),
+        gp_Pnt2d (t2, Surface->LastVParameter ()), FuncTol);
+      if (!aPrjPS.IsDone ()) continue;
+      POnS = aPrjPS.Solution ();
+      Sol = gp_Pnt (POnS.X (), P.X (), POnS.Y ());
+      isDone = Standard_True;
+      break;
+    }
+    else
+    {
+      aPrjPS.Perform (t, U0, P.X (), gp_Pnt2d (Tol, TolU),
+        gp_Pnt2d (t1, Surface->FirstUParameter ()),
+        gp_Pnt2d (t2, Surface->LastUParameter ()), FuncTol);
+      if (!aPrjPS.IsDone ()) continue;
+      POnS = aPrjPS.Solution ();
+      Sol = gp_Pnt (POnS.X (), POnS.Y (), P.X ());
+      isDone = Standard_True;
+      break;
+    }
+  }
 
-      return isDone;
+  return isDone;
 }
 
 //=======================================================================
@@ -1009,9 +1013,11 @@ void ProjLib_CompProjectedCurve::Init()
   // 2. Removing common parts of bounds
   for(i = 1; i < myNbCurves; i++) 
   {
-    if(mySequence->Value(i)->Value(mySequence->Value(i)->Length()).X() >= 
+    if(mySequence->Value(i)->Value(mySequence->Value(i)->Length()).X() >=
       mySequence->Value(i+1)->Value(1).X())
+    {
       mySequence->ChangeValue(i+1)->ChangeValue(1).SetX(mySequence->Value(i)->Value(mySequence->Value(i)->Length()).X() + 1.e-12);
+    }
   }
 
   // 3. Computation of the maximum distance from each part of curve to surface
@@ -1019,7 +1025,8 @@ void ProjLib_CompProjectedCurve::Init()
   myMaxDistance = new TColStd_HArray1OfReal(1, myNbCurves);
   myMaxDistance->Init(0);
   for(i = 1; i <= myNbCurves; i++)
-    for(j = 1; j <= mySequence->Value(i)->Length(); j++) 
+  {
+    for(j = 1; j <= mySequence->Value(i)->Length(); j++)
     {
       gp_Pnt POnC, POnS, aTriple;
       Standard_Real Distance;
@@ -1028,91 +1035,93 @@ void ProjLib_CompProjectedCurve::Init()
       mySurface->D0(aTriple.Y(), aTriple.Z(), POnS);
       Distance = POnC.Distance(POnS);
       if (myMaxDistance->Value(i) < Distance)
+      {
         myMaxDistance->ChangeValue(i) = Distance;
-    } 
-
+      }
+    }
+  }
 
-    // 4. Check the projection to be a single point
+  // 4. Check the projection to be a single point
 
-    gp_Pnt2d Pmoy, Pcurr, P;
-    Standard_Real AveU, AveV;
-    mySnglPnts = new TColStd_HArray1OfBoolean(1, myNbCurves);
-    for(i = 1; i <= myNbCurves; i++) mySnglPnts->SetValue(i, Standard_True);
+  gp_Pnt2d Pmoy, Pcurr, P;
+  Standard_Real AveU, AveV;
+  mySnglPnts = new TColStd_HArray1OfBoolean(1, myNbCurves);
+  mySnglPnts->Init (Standard_True);
 
-    for(i = 1; i <= myNbCurves; i++)
-    {    
-      //compute an average U and V
+  for(i = 1; i <= myNbCurves; i++)
+  {
+    //compute an average U and V
 
-      for(j = 1, AveU = 0., AveV = 0.; j <= mySequence->Value(i)->Length(); j++)
-      {
-        AveU += mySequence->Value(i)->Value(j).Y();
-        AveV += mySequence->Value(i)->Value(j).Z();
-      }
-      AveU /= mySequence->Value(i)->Length();
-      AveV /= mySequence->Value(i)->Length();
+    for(j = 1, AveU = 0., AveV = 0.; j <= mySequence->Value(i)->Length(); j++)
+    {
+      AveU += mySequence->Value(i)->Value(j).Y();
+      AveV += mySequence->Value(i)->Value(j).Z();
+    }
+    AveU /= mySequence->Value(i)->Length();
+    AveV /= mySequence->Value(i)->Length();
 
-      Pmoy.SetCoord(AveU,AveV);
-      for(j = 1; j <= mySequence->Value(i)->Length(); j++)
+    Pmoy.SetCoord(AveU,AveV);
+    for(j = 1; j <= mySequence->Value(i)->Length(); j++)
+    {
+      Pcurr =
+        gp_Pnt2d(mySequence->Value(i)->Value(j).Y(), mySequence->Value(i)->Value(j).Z());
+      if (Pcurr.Distance(Pmoy) > ((myTolU < myTolV) ? myTolV : myTolU))
       {
-        Pcurr = 
-          gp_Pnt2d(mySequence->Value(i)->Value(j).Y(), mySequence->Value(i)->Value(j).Z());
-        if (Pcurr.Distance(Pmoy) > ((myTolU < myTolV) ? myTolV : myTolU))
-        {
-          mySnglPnts->SetValue(i, Standard_False);
-          break;
-        }
+        mySnglPnts->SetValue(i, Standard_False);
+        break;
       }
     }
+  }
 
-    // 5. Check the projection to be an isoparametric curve of the surface
+  // 5. Check the projection to be an isoparametric curve of the surface
 
-    myUIso = new TColStd_HArray1OfBoolean(1, myNbCurves);
-    for(i = 1; i <= myNbCurves; i++) myUIso->SetValue(i, Standard_True);
+  myUIso = new TColStd_HArray1OfBoolean(1, myNbCurves);
+  myUIso->Init (Standard_True);
 
-    myVIso = new TColStd_HArray1OfBoolean(1, myNbCurves);
-    for(i = 1; i <= myNbCurves; i++) myVIso->SetValue(i, Standard_True);
+  myVIso = new TColStd_HArray1OfBoolean(1, myNbCurves);
+  myVIso->Init (Standard_True);
 
-    for(i = 1; i <= myNbCurves; i++) {
-      if (IsSinglePnt(i, P)|| mySequence->Value(i)->Length() <=2) {
-        myUIso->SetValue(i, Standard_False);
-        myVIso->SetValue(i, Standard_False);
-        continue;
-      }
+  for(i = 1; i <= myNbCurves; i++) {
+    if (IsSinglePnt(i, P)|| mySequence->Value(i)->Length() <=2) {
+      myUIso->SetValue(i, Standard_False);
+      myVIso->SetValue(i, Standard_False);
+      continue;
+    }
 
-      // new test for isoparametrics
+    // new test for isoparametrics
 
-      if ( mySequence->Value(i)->Length() > 2) {
-        //compute an average U and V
+    if ( mySequence->Value(i)->Length() > 2) {
+      //compute an average U and V
 
-        for(j = 1, AveU = 0., AveV = 0.; j <= mySequence->Value(i)->Length(); j++) {
-          AveU += mySequence->Value(i)->Value(j).Y();
-          AveV += mySequence->Value(i)->Value(j).Z();
-        }
-        AveU /= mySequence->Value(i)->Length();
-        AveV /= mySequence->Value(i)->Length();
+      for(j = 1, AveU = 0., AveV = 0.; j <= mySequence->Value(i)->Length(); j++) {
+        AveU += mySequence->Value(i)->Value(j).Y();
+        AveV += mySequence->Value(i)->Value(j).Z();
+      }
+      AveU /= mySequence->Value(i)->Length();
+      AveV /= mySequence->Value(i)->Length();
 
-        // is i-part U-isoparametric ?
-        for(j = 1; j <= mySequence->Value(i)->Length(); j++) 
+      // is i-part U-isoparametric ?
+      for(j = 1; j <= mySequence->Value(i)->Length(); j++)
+      {
+        if(Abs(mySequence->Value(i)->Value(j).Y() - AveU) > myTolU)
         {
-          if(Abs(mySequence->Value(i)->Value(j).Y() - AveU) > myTolU) 
-          {
-            myUIso->SetValue(i, Standard_False);
-            break;
-          }
+          myUIso->SetValue(i, Standard_False);
+          break;
         }
+      }
 
-        // is i-part V-isoparametric ?
-        for(j = 1; j <= mySequence->Value(i)->Length(); j++) 
+      // is i-part V-isoparametric ?
+      for(j = 1; j <= mySequence->Value(i)->Length(); j++)
+      {
+        if(Abs(mySequence->Value(i)->Value(j).Z() - AveV) > myTolV)
         {
-          if(Abs(mySequence->Value(i)->Value(j).Z() - AveV) > myTolV) 
-          {
-            myVIso->SetValue(i, Standard_False);
-            break;
-          }
+          myVIso->SetValue(i, Standard_False);
+          break;
         }
-        //
       }
+      //
     }
+  }
 }
 //=======================================================================
 //function : Load
@@ -1522,13 +1531,17 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const
   // proccessing projection bounds
   BArr = new TColStd_HArray1OfReal(1, 2*myNbCurves);
   for(i = 1; i <= myNbCurves; i++)
+  {
     Bounds(i, BArr->ChangeValue(2*i - 1), BArr->ChangeValue(2*i));
+  }
 
   // proccessing curve discontinuities
   if(NbIntCur > 1) {
     CArr = new TColStd_HArray1OfReal(1, NbIntCur - 1);
     for(i = 1; i <= CArr->Length(); i++)
+    {
       CArr->ChangeValue(i) = CutPntsT(i + 1);
+    }
   }
 
   // proccessing U-surface discontinuities  
@@ -1537,7 +1550,9 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const
   for(k = 2; k <= NbIntSurU; k++) {
     //    cout<<"CutPntsU("<<k<<") = "<<CutPntsU(k)<<endl;
     for(i = 1; i <= myNbCurves; i++)
-      for(j = 1; j < mySequence->Value(i)->Length(); j++) {
+    {
+      for(j = 1; j < mySequence->Value(i)->Length(); j++)
+      {
         Ul = mySequence->Value(i)->Value(j).Y();
         Ur = mySequence->Value(i)->Value(j + 1).Y();
 
@@ -1576,22 +1591,30 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const
           }
         }
       }
+    }
   }
   for(i = 2; i <= TUdisc.Length(); i++)
+  {
     if(TUdisc(i) - TUdisc(i-1) < Precision::PConfusion())
+    {
       TUdisc.Remove(i--);
+    }
+  }
 
-  if(TUdisc.Length()) 
+  if(TUdisc.Length())
   {
     UArr = new TColStd_HArray1OfReal(1, TUdisc.Length());
     for(i = 1; i <= UArr->Length(); i++)
+    {
       UArr->ChangeValue(i) = TUdisc(i);
+    }
   }
   // proccessing V-surface discontinuities
   TColStd_SequenceOfReal TVdisc;
 
   for(k = 2; k <= NbIntSurV; k++)
-    for(i = 1; i <= myNbCurves; i++) 
+  {
+    for(i = 1; i <= myNbCurves; i++)
     {
       //      cout<<"CutPntsV("<<k<<") = "<<CutPntsV(k)<<endl;
       for(j = 1; j < mySequence->Value(i)->Length(); j++) {
@@ -1635,55 +1658,70 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const
         }
       }
     }
-    for(i = 2; i <= TVdisc.Length(); i++)
-      if(TVdisc(i) - TVdisc(i-1) < Precision::PConfusion())
-        TVdisc.Remove(i--);
+  }
 
-    if(TVdisc.Length()) 
+  for(i = 2; i <= TVdisc.Length(); i++)
+  {
+    if(TVdisc(i) - TVdisc(i-1) < Precision::PConfusion())
     {
-      VArr = new TColStd_HArray1OfReal(1, TVdisc.Length());
-      for(i = 1; i <= VArr->Length(); i++)
-        VArr->ChangeValue(i) = TVdisc(i);
+      TVdisc.Remove(i--);
     }
+  }
 
-    // fusion
-    TColStd_SequenceOfReal Fusion;
-    if(!CArr.IsNull()) 
+  if(TVdisc.Length())
+  {
+    VArr = new TColStd_HArray1OfReal(1, TVdisc.Length());
+    for(i = 1; i <= VArr->Length(); i++)
     {
-      GeomLib::FuseIntervals(BArr->ChangeArray1(), 
-        CArr->ChangeArray1(), 
-        Fusion, Precision::PConfusion());
-      BArr = new TColStd_HArray1OfReal(1, Fusion.Length());
-      for(i = 1; i <= BArr->Length(); i++)
-        BArr->ChangeValue(i) = Fusion(i);
-      Fusion.Clear();
+      VArr->ChangeValue(i) = TVdisc(i);
     }
+  }
 
-    if(!UArr.IsNull()) 
+  // fusion
+  TColStd_SequenceOfReal Fusion;
+  if(!CArr.IsNull())
+  {
+    GeomLib::FuseIntervals(BArr->ChangeArray1(),
+      CArr->ChangeArray1(),
+      Fusion, Precision::PConfusion());
+    BArr = new TColStd_HArray1OfReal(1, Fusion.Length());
+    for(i = 1; i <= BArr->Length(); i++)
     {
-      GeomLib::FuseIntervals(BArr->ChangeArray1(), 
-        UArr->ChangeArray1(), 
-        Fusion, Precision::PConfusion());
-      BArr = new TColStd_HArray1OfReal(1, Fusion.Length());
-      for(i = 1; i <= BArr->Length(); i++)
-        BArr->ChangeValue(i) = Fusion(i);
-      Fusion.Clear();
+      BArr->ChangeValue(i) = Fusion(i);
     }
+    Fusion.Clear();
+  }
 
-    if(!VArr.IsNull()) 
+  if(!UArr.IsNull())
+  {
+    GeomLib::FuseIntervals(BArr->ChangeArray1(),
+      UArr->ChangeArray1(),
+      Fusion, Precision::PConfusion());
+    BArr = new TColStd_HArray1OfReal(1, Fusion.Length());
+    for(i = 1; i <= BArr->Length(); i++)
     {
-      GeomLib::FuseIntervals(BArr->ChangeArray1(), 
-        VArr->ChangeArray1(), 
-        Fusion, Precision::PConfusion());
-      BArr = new TColStd_HArray1OfReal(1, Fusion.Length());
-      for(i = 1; i <= BArr->Length(); i++)
-        BArr->ChangeValue(i) = Fusion(i);
+      BArr->ChangeValue(i) = Fusion(i);
     }
+    Fusion.Clear();
+  }
 
-    const_cast<ProjLib_CompProjectedCurve*>(this)->myTabInt = new TColStd_HArray1OfReal(1, BArr->Length());
+  if(!VArr.IsNull())
+  {
+    GeomLib::FuseIntervals(BArr->ChangeArray1(),
+      VArr->ChangeArray1(),
+      Fusion, Precision::PConfusion());
+    BArr = new TColStd_HArray1OfReal(1, Fusion.Length());
     for(i = 1; i <= BArr->Length(); i++)
-      myTabInt->ChangeValue(i) = BArr->Value(i);
+    {
+      BArr->ChangeValue(i) = Fusion(i);
+    }
+  }
 
+  const_cast<ProjLib_CompProjectedCurve*>(this)->myTabInt = new TColStd_HArray1OfReal(1, BArr->Length());
+  for(i = 1; i <= BArr->Length(); i++)
+  {
+    myTabInt->ChangeValue(i) = BArr->Value(i);
+  }
 }
 
 //=======================================================================
index 4cbb084..ef0c381 100644 (file)
@@ -2535,17 +2535,14 @@ static TopoDS_Compound AddTestStructure(int nCount_)
 
 static Standard_Integer OCC7141 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
 {
-  int nCount = 10;
-
-  if (argc > 3)
-    {
-      di << "Usage : " << argv[0] << " [nCount] path\n";
-      return 1;
-    }
+  if (argc != 2 && argc != 3)
+  {
+    std::cout << "Usage : " << argv[0] << " [nCount] path\n";
+    return 1;
+  }
 
-  if (argc > 2)
-    nCount = Draw::Atoi(argv[1]);
-    TCollection_AsciiString aFilePath = argv[2];
+  int nCount = (argc > 2 ? Draw::Atoi(argv[1]) : 10);
+  TCollection_AsciiString aFilePath (argv[argc > 2 ? 2 : 1]);
   STEPCAFControl_Writer writer;
   Handle(TDocStd_Document) document;
   document = new TDocStd_Document("Pace Test-StepExporter-");
index af29097..6693363 100644 (file)
 #include <StepAP214_Protocol.hxx>
 #include <StepData_WriterLib.hxx>
 
-static int init = 0;
+static int THE_RWStepAP214_init = 0;
 
 void RWStepAP214::Init()
-       {
-         if (init) return;    init = 1;
-         RWHeaderSection::Init();
-         Handle(StepAP214_Protocol) proto = StepAP214::Protocol();
-         Interface_GeneralLib::SetGlobal (new RWStepAP214_GeneralModule,proto);
-         Interface_ReaderLib::SetGlobal  (new RWStepAP214_ReadWriteModule,proto);
-         StepData_WriterLib::SetGlobal   (new RWStepAP214_ReadWriteModule,proto);
-       }
+{
+  if (THE_RWStepAP214_init)
+  {
+    return;
+  }
+  THE_RWStepAP214_init = 1;
+  RWHeaderSection::Init();
+  Handle(StepAP214_Protocol) proto = StepAP214::Protocol();
+  Interface_GeneralLib::SetGlobal (new RWStepAP214_GeneralModule,proto);
+  Interface_ReaderLib::SetGlobal  (new RWStepAP214_ReadWriteModule,proto);
+  StepData_WriterLib::SetGlobal   (new RWStepAP214_ReadWriteModule,proto);
+}
index 5cf87cc..7fe5326 100644 (file)
@@ -3831,8 +3831,10 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W
         TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(aSecondShapeL.Value(shIt));
         Handle(StepRepr_ShapeAspect) aSA = WriteShapeAspect(WS, aDimensionL, aShape, dummyRC, dummyGISU);
         if (aCSA.IsNull() && !aSA.IsNull())
+        {
           aCSA = new StepRepr_CompositeShapeAspect();
-          aCSA->Init(aSA->Name(), aSA->Description(), aSA->OfShape(), aSA->ProductDefinitional());
+        }
+        aCSA->Init(aSA->Name(), aSA->Description(), aSA->OfShape(), aSA->ProductDefinitional());
         if (!aSA.IsNull()) {
           Handle(StepRepr_ShapeAspectRelationship) aSAR = new StepRepr_ShapeAspectRelationship();
           aSAR->Init(new TCollection_HAsciiString(), Standard_False, new TCollection_HAsciiString(), aCSA, aSA);
index 7128290..0a21b1a 100644 (file)
@@ -295,20 +295,29 @@ static Standard_Integer anaface
 //      On va tacher de calculer les positions et les comparer
       gp_Pnt2d fuv,luv;
       if (Edge.Orientation() == TopAbs_FORWARD)
-       { TopExp::Vertices (Edge,fv,lv);
-         if (ia2d) BRep_Tool::UVPoints (Edge,Face,fuv,luv); }
+      {
+        TopExp::Vertices (Edge, fv, lv);
+        if (ia2d) BRep_Tool::UVPoints (Edge, Face, fuv, luv);
+      }
       else
-       { TopExp::Vertices (Edge,lv,fv);
-         if (ia2d) BRep_Tool::UVPoints (Edge,Face,luv,fuv); }
+      {
+        TopExp::Vertices (Edge, lv, fv);
+        if (ia2d) BRep_Tool::UVPoints (Edge, Face, luv, fuv);
+      }
       gp_Pnt fp = BRep_Tool::Pnt (fv);
       gp_Pnt lp = BRep_Tool::Pnt (lv);
       gp_Pnt fxyz, lxyz;
-      if (ia2d) {
+      if (ia2d)
+      {
        surface->D0 (fuv.X(),fuv.Y(),fxyz);
        surface->D0 (luv.X(),luv.Y(),lxyz);
        df3d = fp.Distance    (fxyz); maxp3d = Max (maxp3d,df3d);
        dl3d = lp.Distance    (lxyz); maxp3d = Max (maxp3d,dl3d);
-       if (nbe > 1) duv  = finuv.Distance (fuv);  maxuv  = Max (maxuv, duv);
+        if (nbe > 1)
+        {
+          duv = finuv.Distance (fuv);
+          maxuv = Max (maxuv, duv);
+        }
 // et les min-max
        u1 = Min (fuv.X(),luv.X());  u2 = Max (fuv.X(),luv.X());
        v1 = Min (fuv.Y(),luv.Y());  v2 = Max (fuv.Y(),luv.Y());
@@ -975,8 +984,12 @@ static Standard_Integer checkedge(Draw_Interpretor& di, Standard_Integer argc, c
  void SWDRAW_ShapeAnalysis::InitCommands(Draw_Interpretor& theCommands) 
 {
   static Standard_Integer initactor = 0;
-  if (initactor) return;  initactor = 1;
-  
+  if (initactor)
+  {
+    return;
+  }
+  initactor = 1;
+
   Standard_CString g = SWDRAW::GroupName();
 
   theCommands.Add ("tolerance","shape [tolmin tolmax:real]", __FILE__,tolerance,g);
index b5375b3..70a1199 100644 (file)
@@ -470,7 +470,11 @@ static Standard_Integer convtorevol(Draw_Interpretor& di, Standard_Integer argc,
 void SWDRAW_ShapeCustom::InitCommands(Draw_Interpretor& theCommands) 
 {
   static Standard_Integer initactor = 0;
-  if (initactor) return;  initactor = 1;
+  if (initactor)
+  {
+    return;
+  }
+  initactor = 1;
 
   Standard_CString g = SWDRAW::GroupName();
 
index 3940bc9..4d84a36 100644 (file)
@@ -69,8 +69,8 @@ static Standard_Integer sortcompound (Draw_Interpretor& di, Standard_Integer arg
     case 'e' : tse = TopAbs_EDGE;   break;
     case 'w' : tse = TopAbs_WIRE;   break;
     case 'f' : tse = TopAbs_FACE;   break;
-    case 's' : tse = TopAbs_SHELL;
-      if (argv[3][1] == 'o')  tse = TopAbs_SOLID; break;
+    case 's' : tse = (argv[3][1] == 'o' ? TopAbs_SOLID : TopAbs_SHELL);
+      break;
     default : break;
   }
   Standard_Boolean modexp = Standard_False;
@@ -98,8 +98,12 @@ static Standard_Integer sortcompound (Draw_Interpretor& di, Standard_Integer arg
  void SWDRAW_ShapeExtend::InitCommands(Draw_Interpretor& theCommands) 
 {
   static Standard_Integer initactor = 0;
-  if (initactor) return;  initactor = 1;
-  
+  if (initactor)
+  {
+    return;
+  }
+  initactor = 1;
+
   Standard_CString g = SWDRAW::GroupName();
   theCommands.Add ("sortcompound","shape_entree shape_result type=v-e-w-f-s-so [mode=n-e-c-x]",
                   __FILE__,sortcompound,g);
index e37b7c0..69e545a 100644 (file)
@@ -795,7 +795,11 @@ static Standard_Integer connectedges(Draw_Interpretor& di, Standard_Integer n, c
  void SWDRAW_ShapeFix::InitCommands(Draw_Interpretor& theCommands) 
 {
   static Standard_Integer initactor = 0;
-  if (initactor) return;  initactor = 1;
+  if (initactor)
+  {
+    return;
+  }
+  initactor = 1;
   
   Standard_CString g = SWDRAW::GroupName();
   
index bdce11f..3218fcc 100644 (file)
@@ -64,7 +64,11 @@ static Standard_Integer ApplySequence(Draw_Interpretor& di,
 void SWDRAW_ShapeProcess::InitCommands(Draw_Interpretor& theCommands) 
 {
   static Standard_Boolean initactor = 0;
-  if (initactor) return;  initactor = 1;
+  if (initactor)
+  {
+    return;
+  }
+  initactor = 1;
   
   ShapeProcess_OperLibrary::Init();
   
index 099f58b..c6e6d16 100644 (file)
@@ -221,11 +221,14 @@ static Standard_Integer samerange (Draw_Interpretor& di,  Standard_Integer argc,
 //  ##            DECLARATIONS            ##
 //  ########################################
 
-static int initactor = 0;
-
 void  SWDRAW_ShapeTool::InitCommands (Draw_Interpretor& theCommands)
 {
-  if (initactor) return;  initactor = 1;
+  static int initactor = 0;
+  if (initactor)
+  {
+    return;
+  }
+  initactor = 1;
 
   const char* g;
   g = "DE: old";
index aa50f2c..7beedd6 100644 (file)
@@ -1564,7 +1564,11 @@ Standard_Integer reshape(Draw_Interpretor& di,
  void SWDRAW_ShapeUpgrade::InitCommands(Draw_Interpretor& theCommands) 
 {
   static Standard_Integer initactor = 0;
-  if (initactor) return;  initactor = 1;
+  if (initactor)
+  {
+    return;
+  }
+  initactor = 1;
   
   Standard_CString g = SWDRAW::GroupName(); // "Tests of DivideTool";
  
index 57fbe4c..9379b89 100644 (file)
@@ -84,10 +84,14 @@ static void MinMaxPnt
   Standard_Real x,y,z;
   p.Coord (x,y,z);
   if (nb < 1)  {  minx = maxx = x; miny = maxy = y; minz = maxz = z;  }
-  else  {
-    if (minx > x) minx = x;  if (maxx < x) maxx = x;
-    if (miny > y) miny = y;  if (maxy < y) maxy = y;
-    if (minz > z) minz = z;  if (maxz < z) maxz = z;
+  else
+  {
+    if (minx > x) minx = x;
+    if (maxx < x) maxx = x;
+    if (miny > y) miny = y;
+    if (maxy < y) maxy = y;
+    if (minz > z) minz = z;
+    if (maxz < z) maxz = z;
   }
   nb ++;
 }
index 332f4eb..765f3e6 100644 (file)
@@ -703,24 +703,30 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformAdvanced (Handle(G
    for( ; i < 4; i +=3)
    {
      Standard_Integer j;
-     for ( j=0; j < myNbCashe; j++ ) 
+     for (j = 0; j < myNbCashe; ++j)
+     {
        if ( myCashe3d[j].SquareDistance (aP[i] ) < aTol2)
        {
-         aP2d[i] = mySurf->NextValueOfUV (myCashe2d[j], aP[i], theTol, 
-           theTol);
+         aP2d[i] = mySurf->NextValueOfUV (myCashe2d[j], aP[i], theTol, theTol);
          aSavedPointNum = i;
          aSavedPoint = myCashe2d[j];
          if (i == 0)
            isFromCashe = Standard_True;
          break;
        }
-       if ( j >= myNbCashe )
-         aP2d[i] = mySurf->ValueOfUV(aP[i], theTol);
+     }
 
-       Standard_Real aDist = mySurf->Gap();
-       Standard_Real aCurDist = aDist * aDist;
-       if( aTol2 < aDist * aDist)
-         aTol2 = aCurDist;
+     if (j >= myNbCashe)
+     {
+       aP2d[i] = mySurf->ValueOfUV(aP[i], theTol);
+     }
+
+     Standard_Real aDist = mySurf->Gap();
+     Standard_Real aCurDist = aDist * aDist;
+     if (aTol2 < aDist * aDist)
+     {
+       aTol2 = aCurDist;
+     }
    }
 
    if ( isPeriodicU || isPeriodicV )
@@ -729,7 +735,8 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformAdvanced (Handle(G
      for(i = 1; i < 3; i++)
      {
        Standard_Integer j;
-       for ( j=0; j < myNbCashe; j++ ) 
+       for (j = 0; j < myNbCashe; ++j)
+       {
          if ( myCashe3d[j].SquareDistance (aP[i] ) < aTol2)
          {
            aP2d[i] = mySurf->NextValueOfUV (myCashe2d[j], aP[i], theTol, theTol);
@@ -737,13 +744,19 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformAdvanced (Handle(G
            aSavedPoint = myCashe2d[j];
            break;
          }
-         if ( j >= myNbCashe )
-           aP2d[i] = mySurf->ValueOfUV(aP[i], theTol);
+       }
+
+       if (j >= myNbCashe)
+       {
+         aP2d[i] = mySurf->ValueOfUV(aP[i], theTol);
+       }
 
-         Standard_Real aDist = mySurf->Gap();
-         Standard_Real aCurDist = aDist * aDist;
-         if( aTol2 < aDist * aDist)
-           aTol2 = aCurDist;
+       Standard_Real aDist = mySurf->Gap();
+       Standard_Real aCurDist = aDist * aDist;
+       if (aTol2 < aDist * aDist)
+       {
+         aTol2 = aCurDist;
+       }
      }
 
      if (isPeriodicU)
@@ -1049,18 +1062,23 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformAdvanced (Handle(G
           {
             //:q9 abv 23 Mar 99: use cashe as 1st approach
             Standard_Integer j; // svv #1
-            for ( j=0; j < myNbCashe; j++ ) 
+            for (j = 0; j < myNbCashe; ++j)
+            {
               if ( myCashe3d[j].SquareDistance ( p3d ) < myPreci*myPreci )
               {
-                p2d = mySurf->NextValueOfUV (myCashe2d[j], p3d, myPreci, 
-                  Precision::Confusion()+gap);
-                if (i == 1) {
+                p2d = mySurf->NextValueOfUV (myCashe2d[j], p3d, myPreci, Precision::Confusion()+gap);
+                if (i == 1)
+                {
                   isFromCashe = Standard_True;
                   aSavedPoint = myCashe2d[j];
                 }
                 break;
               }
-              if ( j >= myNbCashe ) p2d = mySurf->ValueOfUV(p3d, myPreci);
+            }
+            if (j >= myNbCashe)
+            {
+              p2d = mySurf->ValueOfUV(p3d, myPreci);
+            }
           }
         }
         else {
index 518f0e9..9987a8f 100644 (file)
@@ -685,38 +685,50 @@ void ShapeUpgrade_WireDivide::Perform ()
        else if ( ! myFace.IsNull() ) {
          B.UpdateEdge ( newEdge, theNewPCurve1, myFace, 0. );
        }
-         
+
         if(!theNewCurve3d.IsNull())
          sbe.SetRange3d(newEdge,f3d,l3d);
        if(!theNewPCurve1.IsNull())
+       {
          B.Range ( newEdge, myFace, f2d, l2d);
+       }
        if((!wasSR || !srNew)&&!BRep_Tool::Degenerated(newEdge) )
+       {
          B.SameRange(newEdge, Standard_False);
+       }
 
-         //addition NM vertices to new edges
-         Standard_Real afpar = (myEdgeDivide->HasCurve3d() ? f3d : f2d);
-                               
-         Standard_Real alpar = (myEdgeDivide->HasCurve3d() ? l3d: l2d);
-         Standard_Integer n =1;
-         for( ; n <= aSeqParNM.Length(); n++) {
-           Standard_Real apar = aSeqParNM.Value(n);
-           TopoDS_Vertex aVold = TopoDS::Vertex(aSeqNMVertices.Value(n));
-           TopoDS_Vertex aNMVer =ShapeAnalysis_TransferParametersProj::CopyNMVertex(aVold,newEdge,E);
-           Context()->Replace(aVold,aNMVer);
-           if(fabs(apar - afpar) <= Precision::PConfusion()) 
-             Context()->Replace(aNMVer,V1);
-           else if(fabs(apar - alpar) <= Precision::PConfusion()) 
-             Context()->Replace(aNMVer,V);
-           else if( apar > afpar && apar <alpar) 
-             B.Add (newEdge,aNMVer);
-           else continue;  
-           aSeqNMVertices.Remove(n);
-           aSeqParNM.Remove(n);
-           n--;
-         }
-         
-         
-//     if (ShapeUpgrade::Debug()) cout <<"... New Edge " 
+        //addition NM vertices to new edges
+        Standard_Real afpar = (myEdgeDivide->HasCurve3d () ? f3d : f2d);
+        Standard_Real alpar = (myEdgeDivide->HasCurve3d () ? l3d : l2d);
+        for (Standard_Integer n = 1; n <= aSeqParNM.Length (); ++n)
+        {
+          Standard_Real apar = aSeqParNM.Value (n);
+          TopoDS_Vertex aVold = TopoDS::Vertex (aSeqNMVertices.Value (n));
+          TopoDS_Vertex aNMVer = ShapeAnalysis_TransferParametersProj::CopyNMVertex (aVold, newEdge, E);
+          Context ()->Replace (aVold, aNMVer);
+          if (fabs (apar - afpar) <= Precision::PConfusion ())
+          {
+            Context ()->Replace (aNMVer, V1);
+          }
+          else if (fabs (apar - alpar) <= Precision::PConfusion ())
+          {
+            Context ()->Replace (aNMVer, V);
+          }
+          else if (apar > afpar && apar < alpar)
+          {
+            B.Add (newEdge, aNMVer);
+          }
+          else
+          {
+            continue;
+          }
+
+          aSeqNMVertices.Remove (n);
+          aSeqParNM.Remove (n);
+          n--;
+        }
+
+//     if (ShapeUpgrade::Debug()) cout <<"... New Edge "
 //       <<(void*) &(*newEdge.TShape())<<" on vertices "
 //         <<(void*) &(*V1.TShape())<<", " <<(void*) &(*V.TShape())
 //           <<" with Tolerance "<<TolEdge <<endl;
index 05a997b..9d67f7c 100644 (file)
@@ -750,10 +750,9 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI
 #include <StepVisual_CameraModelD3MultiClippingUnion.hxx>
 #include <StepVisual_AnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem.hxx>
 
-static int init = 0;
+static int THE_StepAP214_Protocol_init = 0;
 static Interface_DataMapOfTransientInteger types(800);
 
-
 //=======================================================================
 //function : StepAP214_Protocol
 //purpose  : 
@@ -761,7 +760,11 @@ static Interface_DataMapOfTransientInteger types(800);
 
 StepAP214_Protocol::StepAP214_Protocol ()
 {
-  if (init) return;  init = 1;
+  if (THE_StepAP214_Protocol_init)
+  {
+    return;
+  }
+  THE_StepAP214_Protocol_init = 1;
 
   types.Bind (STANDARD_TYPE(StepBasic_Address), 1);
   types.Bind (STANDARD_TYPE(StepShape_AdvancedBrepShapeRepresentation), 2);
index a3087a3..c97bfbe 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(StepSelect_Activator,IFSelect_Activator)
 
-static int initActivator = 0;
-
+static int THE_StepSelect_Activator_initActivator = 0;
 
 StepSelect_Activator::StepSelect_Activator ()
 {
-  if (initActivator) return;  initActivator = 1;
+  if (THE_StepSelect_Activator_initActivator)
+  {
+    return;
+  }
+
+  THE_StepSelect_Activator_initActivator = 1;
 //  Add ( 0,"load");
 //  Add ( 0,"loadstep");    // homonyme
 //  Add ( 1,"entity");
index 873eabe..e1e9e66 100644 (file)
@@ -458,9 +458,12 @@ static Standard_Integer getChild (Draw_Interpretor& di, Standard_Integer argc, c
 
 void TObjDRAW::Init(Draw_Interpretor& di)
 {
-
   static Standard_Boolean initactor = Standard_False;
-  if (initactor) return;  initactor = Standard_True;
+  if (initactor)
+  {
+    return;
+  }
+  initactor = Standard_True;
 
   //=====================================
   // General commands
index b5f4e59..17e58e0 100644 (file)
@@ -1827,8 +1827,11 @@ void TPrsStd_ConstraintTools::ComputeOffset (const Handle(TDataXtd_Constraint)&
       }
 
       if (is_planar)
+      {
         ais->SetCustomPlane (aplane->Pln());
-        anAIS = ais;
+      }
+
+      anAIS = ais;
       return;
     }
     else
index 72f1f24..239b136 100644 (file)
@@ -948,16 +948,21 @@ void TopOpeBRepBuild_Builder1::GFillEdgeSameDomWES(const TopoDS_Shape& EOR,
        if(mySDFaceToFill.Orientation() == TopAbs_REVERSED)
            aN1.Reverse();
        scalarPr = aBiN*aN1;
-       
-       if(fabs(scalarPr) <= 1e-10) {//try to step inside
-         TopOpeBRepBuild_Tools::GetNormalInNearestPoint(TopoDS::Face(mySDFaceToFill), aSplitP, aN1);
-           if(mySDFaceToFill.Orientation() == TopAbs_REVERSED)
-             aN1.Reverse();
-             scalarPr = aBiN*aN1;
-           if(fabs(scalarPr) <= 1e-10) // this can not be
-             keep = (TB == TopAbs_IN); //just to do something
-         }         
-       
+
+        if (fabs (scalarPr) <= 1e-10) //try to step inside
+        {
+          TopOpeBRepBuild_Tools::GetNormalInNearestPoint (TopoDS::Face (mySDFaceToFill), aSplitP, aN1);
+          if (mySDFaceToFill.Orientation () == TopAbs_REVERSED)
+          {
+            aN1.Reverse ();
+          }
+          scalarPr = aBiN*aN1;
+          if (fabs (scalarPr) <= 1e-10) // this can not be
+          {
+            keep = (TB == TopAbs_IN); //just to do something
+          }
+        }
+
        TopAbs_State aPartState = (scalarPr > 0) ? TopAbs_IN : TopAbs_OUT;
        
        keep = (aPartState == TB) ? Standard_True : Standard_False;
index 957133b..f7e9348 100644 (file)
@@ -288,11 +288,11 @@ void TopOpeBRepBuild_GTopo::DumpSSB(Standard_OStream& OS,
 
 //=======================================================================
 //function : Dump
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 void TopOpeBRepBuild_GTopo::Dump(Standard_OStream& OS,
-                                const Standard_Address a) const 
+                                const Standard_Address a) const
 {
   char* s = (char*)a;
 
@@ -303,22 +303,26 @@ void TopOpeBRepBuild_GTopo::Dump(Standard_OStream& OS,
 
   if (myReverseForce) OS<<"reverse value : "<<myReverseValue<<endl;
 
-  if(s) OS<<s; OS<<"\\ I N O"; 
+  if(s) OS<<s;
+  OS<<"\\ I N O";
   OS<<endl;
 
-  if(s) OS<<s; OS<<"I ";
-  DumpVal(OS,TopAbs_IN,TopAbs_IN); OS<<" "; 
-  DumpVal(OS,TopAbs_IN,TopAbs_ON); OS<<" "; 
+  if(s) OS<<s;
+  OS<<"I ";
+  DumpVal(OS,TopAbs_IN,TopAbs_IN); OS<<" ";
+  DumpVal(OS,TopAbs_IN,TopAbs_ON); OS<<" ";
   DumpVal(OS,TopAbs_IN,TopAbs_OUT); OS<<endl;
 
-  if(s) OS<<s; OS<<"N ";
-  DumpVal(OS,TopAbs_ON,TopAbs_IN); OS<<" "; 
-  DumpVal(OS,TopAbs_ON,TopAbs_ON); OS<<" "; 
+  if(s) OS<<s;
+  OS<<"N ";
+  DumpVal(OS,TopAbs_ON,TopAbs_IN); OS<<" ";
+  DumpVal(OS,TopAbs_ON,TopAbs_ON); OS<<" ";
   DumpVal(OS,TopAbs_ON,TopAbs_OUT); OS<<endl;
 
-  if(s) OS<<s; OS<<"O ";
-  DumpVal(OS,TopAbs_OUT,TopAbs_IN); OS<<" "; 
-  DumpVal(OS,TopAbs_OUT,TopAbs_ON); OS<<" "; 
+  if(s) OS<<s;
+  OS<<"O ";
+  DumpVal(OS,TopAbs_OUT,TopAbs_IN); OS<<" ";
+  DumpVal(OS,TopAbs_OUT,TopAbs_ON); OS<<" ";
   DumpVal(OS,TopAbs_OUT,TopAbs_OUT); OS<<endl;
 }
 
index 7237ba8..67cf3f9 100644 (file)
@@ -28,7 +28,7 @@ static Standard_Boolean GLOBAL_FDSCNX_prepared = Standard_False;
 //modified by NIZNHY-PKV Sun Dec 15 17:41:43 2002 f
 //=======================================================================
 //function : FDSCNX_Close
-//purpose  : 
+//purpose  :
 //=======================================================================
 void FDSCNX_Close()
 {
@@ -56,7 +56,7 @@ void FDSCNX_Close()
 }
 //modified by NIZNHY-PKV Sun Dec 15 17:41:40 2002 t
 
-Standard_EXPORT const TopTools_ListOfShape& FDSCNX_EdgeConnexityShapeIndex(const TopoDS_Shape& E,const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Integer SI) 
+Standard_EXPORT const TopTools_ListOfShape& FDSCNX_EdgeConnexityShapeIndex(const TopoDS_Shape& E,const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Integer SI)
 {
   if (HDS.IsNull()) return *GLOBAL_los;
   if (!GLOBAL_FDSCNX_prepared) return *GLOBAL_los;
@@ -73,7 +73,7 @@ Standard_EXPORT const TopTools_ListOfShape& FDSCNX_EdgeConnexityShapeIndex(const
 
 // S = edge --> liste de faces connexes par S
 // S = face --> liste d'edges E de S qui ont au moins une autre face connexe
-Standard_EXPORT const TopTools_ListOfShape& FDSCNX_EdgeConnexitySameShape(const TopoDS_Shape& S,const Handle(TopOpeBRepDS_HDataStructure)& HDS) 
+Standard_EXPORT const TopTools_ListOfShape& FDSCNX_EdgeConnexitySameShape(const TopoDS_Shape& S,const Handle(TopOpeBRepDS_HDataStructure)& HDS)
 {
   TopAbs_ShapeEnum t = S.ShapeType();
   if      (t == TopAbs_EDGE) {
@@ -115,7 +115,7 @@ Standard_EXPORT void FDSCNX_Prepare(const TopoDS_Shape& /*S1*/,
     Standard_Integer rf = BDS.AncestorRank(f); if (rf == 0) continue;
 //    BDS.Shape(f);
     TopTools_DataMapOfShapeListOfShape& fle = *GLOBAL_fle;
-    TopTools_DataMapOfShapeListOfShape& elf = (rf == 1) ? *GLOBAL_elf1 : *GLOBAL_elf2; 
+    TopTools_DataMapOfShapeListOfShape& elf = (rf == 1) ? *GLOBAL_elf1 : *GLOBAL_elf2;
     TopExp_Explorer exe;
     for (exe.Init(f,TopAbs_EDGE);exe.More();exe.Next()) {
 //    for (TopExp_Explorer exe(f,TopAbs_EDGE);exe.More();exe.Next()) {
@@ -123,50 +123,92 @@ Standard_EXPORT void FDSCNX_Prepare(const TopoDS_Shape& /*S1*/,
 //               BDS.Shape(e);
 //      Standard_Boolean se = BDS.IsSectionEdge(TopoDS::Edge(e)); if (!se) continue;
       Standard_Boolean hs = BDS.HasShape(TopoDS::Edge(e)); if (!hs) continue;
-      TopTools_ListOfShape thelist, thelist1;
-      if (!fle.IsBound(f)) fle.Bind(f, thelist); fle.ChangeFind(f).Append(e);
-      if (!elf.IsBound(e)) elf.Bind(e, thelist1); elf.ChangeFind(e).Append(f);
+
+      TopTools_ListOfShape* aListFle = fle.ChangeSeek (f);
+      if (aListFle == NULL)
+      {
+        aListFle = fle.Bound (f, TopTools_ListOfShape());
+      }
+      aListFle->Append(e);
+
+      TopTools_ListOfShape* aListElf = elf.ChangeSeek (e);
+      if (aListElf == NULL)
+      {
+        aListElf = elf.Bound (e, TopTools_ListOfShape());
+      }
+      aListElf->Append(f);
     }
   }
   GLOBAL_FDSCNX_prepared = Standard_True;
 }
 
-Standard_EXPORT Standard_Boolean FDSCNX_HasConnexFace(const TopoDS_Shape& S,const Handle(TopOpeBRepDS_HDataStructure)& HDS) 
+Standard_EXPORT Standard_Boolean FDSCNX_HasConnexFace(const TopoDS_Shape& S,const Handle(TopOpeBRepDS_HDataStructure)& HDS)
 {
-  if (HDS.IsNull()) return Standard_False; const TopOpeBRepDS_DataStructure& BDS = HDS->DS();
-  const TopAbs_ShapeEnum t = S.ShapeType(); if (t != TopAbs_FACE && t != TopAbs_EDGE) return Standard_False;
-  const Standard_Integer rs = BDS.AncestorRank(S); if (rs == 0) return Standard_False;
-  TopTools_DataMapOfShapeListOfShape* pelf = (rs == 1) ? GLOBAL_elf1 : GLOBAL_elf2; if (pelf == NULL) return Standard_False;
-  TopTools_DataMapOfShapeListOfShape& fle = *GLOBAL_fle; 
-  TopTools_DataMapOfShapeListOfShape& elf = *pelf;
-  Standard_Boolean has = Standard_False;
-  if      (t == TopAbs_EDGE) has = elf.IsBound(S);
-  else if (t == TopAbs_FACE) has = fle.IsBound(S);
+  if (HDS.IsNull())
+  {
+    return Standard_False;
+  }
+
+  const TopOpeBRepDS_DataStructure& BDS = HDS->DS();
+  const TopAbs_ShapeEnum t = S.ShapeType();
+  if (t != TopAbs_FACE
+   && t != TopAbs_EDGE)
+  {
+    return Standard_False;
+  }
+  const Standard_Integer rs = BDS.AncestorRank(S);
+  if (rs == 0)
+  {
+    return Standard_False;
+  }
+
+  TopTools_DataMapOfShapeListOfShape* pelf = (rs == 1) ? GLOBAL_elf1 : GLOBAL_elf2;
+  if (pelf == NULL)
+  {
+    return Standard_False;
+  }
+
+  Standard_Boolean has = (t == TopAbs_EDGE ? pelf : GLOBAL_fle)->IsBound(S);
   return has;
 }
 
-Standard_EXPORT void FDSCNX_FaceEdgeConnexFaces(const TopoDS_Shape& F,const TopoDS_Shape& E,const Handle(TopOpeBRepDS_HDataStructure)& HDS,TopTools_ListOfShape& LF) 
+Standard_EXPORT void FDSCNX_FaceEdgeConnexFaces(const TopoDS_Shape& F,const TopoDS_Shape& E,const Handle(TopOpeBRepDS_HDataStructure)& HDS,TopTools_ListOfShape& LF)
 {
   LF.Clear();
   // verifier que E est une arete de connexite de F
   Standard_Boolean EofF = Standard_False;
-  const TopTools_ListOfShape& loe = FDSCNX_EdgeConnexitySameShape(F,HDS); if (loe.IsEmpty()) return;
-  for (TopTools_ListIteratorOfListOfShape i(loe);i.More();i.Next()) {
+  const TopTools_ListOfShape& loe = FDSCNX_EdgeConnexitySameShape(F,HDS);
+  if (loe.IsEmpty())
+  {
+    return;
+  }
+  for (TopTools_ListIteratorOfListOfShape i(loe);i.More();i.Next())
+  {
     const TopoDS_Shape& e = i.Value();
 //             HDS->Shape(e);
     Standard_Boolean b = e.IsSame(E);
-    if (b) {
+    if (b)
+    {
       EofF=Standard_True;
       break;
     }
   }
-  if (!EofF) return;
-  
-  const TopTools_ListOfShape& lof = FDSCNX_EdgeConnexitySameShape(E,HDS); if (lof.IsEmpty()) return;
-  for (TopTools_ListIteratorOfListOfShape it(lof);it.More();it.Next()) {
+  if (!EofF)
+  {
+    return;
+  }
+
+  const TopTools_ListOfShape& lof = FDSCNX_EdgeConnexitySameShape(E,HDS);
+  if (lof.IsEmpty())
+  {
+    return;
+  }
+  for (TopTools_ListIteratorOfListOfShape it(lof);it.More();it.Next())
+  {
     const TopoDS_Shape& f = it.Value();
     Standard_Boolean b = f.IsSame(F);
-    if (!b) {
+    if (!b)
+    {
       LF.Append(f);
     }
   }
@@ -174,50 +216,114 @@ Standard_EXPORT void FDSCNX_FaceEdgeConnexFaces(const TopoDS_Shape& F,const Topo
 
 Standard_EXPORT void FDSCNX_DumpIndex(const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Integer I)
 {
-  if (HDS.IsNull()) return; const TopOpeBRepDS_DataStructure& BDS = HDS->DS();
+  if (HDS.IsNull())
+  {
+    return;
+  }
+
+  const TopOpeBRepDS_DataStructure& BDS = HDS->DS();
   Standard_Integer ns=BDS.NbShapes();
-  if (I<1 || I>ns) return;
+  if (I<1 || I>ns)
+  {
+    return;
+  }
+
   Standard_Integer i=I;
   const TopoDS_Shape& s=BDS.Shape(i);
   TopAbs_ShapeEnum ts=s.ShapeType();
   const TopTools_ListOfShape& ls=FDSCNX_EdgeConnexitySameShape(s,HDS);
-  if      (ts == TopAbs_EDGE) {
-    TopTools_ListIteratorOfListOfShape ils(ls);if(!ils.More())return;
-    for(;ils.More();ils.Next())cout<<BDS.Shape(ils.Value())<<" ";
+  if (ts == TopAbs_EDGE)
+  {
+    TopTools_ListIteratorOfListOfShape ils(ls);
+    if (!ils.More())
+    {
+      return;
+    }
+
+    for (; ils.More(); ils.Next())
+    {
+      cout<<BDS.Shape(ils.Value())<<" ";
+    }
   }
-  else if (ts == TopAbs_FACE) {
-    TopTools_ListIteratorOfListOfShape ils(ls);if(!ils.More())return;
-    for(;ils.More();ils.Next()) {
+  else if (ts == TopAbs_FACE)
+  {
+    TopTools_ListIteratorOfListOfShape ils(ls);
+    if (!ils.More())
+    {
+      return;
+    }
+
+    for (; ils.More(); ils.Next())
+    {
       const TopoDS_Shape& e=ils.Value();
       TopTools_ListOfShape lf;FDSCNX_FaceEdgeConnexFaces(s,e,HDS,lf);
-      TopTools_ListIteratorOfListOfShape ilf(lf);if(!ilf.More())continue;
-      for(;ilf.More();ilf.Next())cout<<BDS.Shape(ilf.Value())<<" ";
+      TopTools_ListIteratorOfListOfShape ilf(lf);
+      if (!ilf.More())
+      {
+        continue;
+      }
+      for (; ilf.More(); ilf.Next())
+      {
+        cout<<BDS.Shape(ilf.Value())<<" ";
+      }
     }
   }
 }
 
 Standard_EXPORT void FDSCNX_Dump(const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Integer I)
 {
-  if (HDS.IsNull()) return; const TopOpeBRepDS_DataStructure& BDS = HDS->DS();
+  if (HDS.IsNull())
+  {
+    return;
+  }
+
+  const TopOpeBRepDS_DataStructure& BDS = HDS->DS();
   Standard_Integer ns=BDS.NbShapes();
-  if (I<1 || I>ns) return;
+  if (I<1 || I>ns)
+  {
+    return;
+  }
+
   Standard_Integer i=I;
   const TopoDS_Shape& s=BDS.Shape(i);Standard_Integer is=BDS.Shape(s);TopAbs_ShapeEnum ts=s.ShapeType();
   const TopTools_ListOfShape& ls=FDSCNX_EdgeConnexitySameShape(s,HDS);
-  if      (ts == TopAbs_EDGE) {
-    TopTools_ListIteratorOfListOfShape ils(ls);if(!ils.More())return;
+  if      (ts == TopAbs_EDGE)
+  {
+    TopTools_ListIteratorOfListOfShape ils(ls);
+    if(!ils.More())
+    {
+      return;
+    }
+
     cout<<"clear;";
-    for(;ils.More();ils.Next())cout<<"tsee f "<<BDS.Shape(ils.Value())<<";";
+    for (; ils.More(); ils.Next())
+    {
+      cout<<"tsee f "<<BDS.Shape(ils.Value())<<";";
+    }
     cout<<"tsee e "<<is<<";### edge "<<is<<" connexity"<<endl;
   }
-  else if (ts == TopAbs_FACE) {
-    TopTools_ListIteratorOfListOfShape ils(ls);if(!ils.More())return;
-    for(;ils.More();ils.Next()) {
+  else if (ts == TopAbs_FACE)
+  {
+    TopTools_ListIteratorOfListOfShape ils(ls);
+    if (!ils.More())
+    {
+      return;
+    }
+    for(;ils.More();ils.Next())
+    {
       const TopoDS_Shape& e=ils.Value();Standard_Integer ie=BDS.Shape(e);
       TopTools_ListOfShape lf;FDSCNX_FaceEdgeConnexFaces(s,e,HDS,lf);
-      TopTools_ListIteratorOfListOfShape ilf(lf);if(!ilf.More())continue;
+      TopTools_ListIteratorOfListOfShape ilf(lf);
+      if (!ilf.More())
+      {
+        continue;
+      }
+
       cout<<"clear;";cout<<"tsee f "<<is<<";";
-      for(;ilf.More();ilf.Next())cout<<"tsee f "<<BDS.Shape(ilf.Value())<<";";
+      for (;ilf.More(); ilf.Next())
+      {
+        cout<<"tsee f "<<BDS.Shape(ilf.Value())<<";";
+      }
       cout<<"tsee e "<<ie<<";### face "<<is<<" connexity"<<endl;
     }
   }
@@ -225,7 +331,15 @@ Standard_EXPORT void FDSCNX_Dump(const Handle(TopOpeBRepDS_HDataStructure)& HDS,
 
 Standard_EXPORT void FDSCNX_Dump(const Handle(TopOpeBRepDS_HDataStructure)& HDS)
 {
-  if (HDS.IsNull()) return; const TopOpeBRepDS_DataStructure& BDS = HDS->DS();
-  Standard_Integer i=1,ns=BDS.NbShapes();
-  for (i=1;i<=ns;i++) FDSCNX_Dump(HDS,i);
+  if (HDS.IsNull())
+  {
+    return;
+  }
+
+  const TopOpeBRepDS_DataStructure& BDS = HDS->DS();
+  Standard_Integer ns=BDS.NbShapes();
+  for (Standard_Integer i = 1;i<=ns;i++)
+  {
+    FDSCNX_Dump(HDS,i);
+  }
 }
index df01f3c..e306426 100644 (file)
@@ -1468,10 +1468,14 @@ void TopOpeBRepTool_TOOL::stuvF(const gp_Pnt2d& uv,const TopoDS_Face& f,  Standa
   Standard_Real uf=bs.FirstUParameter(),ul=bs.LastUParameter(),vf=bs.FirstVParameter(),vl=bs.LastVParameter();
   Standard_Boolean onuf = (Abs(uf-u)<tolu), onul = (Abs(ul-u)<tolu);
   Standard_Boolean onvf = (Abs(vf-v)<tolv), onvl = (Abs(vl-v)<tolv);
-  if (onuf) onU = ONFIRST; if (onul) onU = ONLAST;
-  if (onvf) onV = ONFIRST; if (onvl) onV = ONLAST;
-  if (u < (uf-tolu)) onU = INFFIRST; if (u > (ul+tolu)) onU = SUPLAST;
-  if (v < (vf-tolv)) onV = INFFIRST; if (v > (vl+tolv)) onV = SUPLAST;
+  if (onuf) onU = ONFIRST;
+  if (onul) onU = ONLAST;
+  if (onvf) onV = ONFIRST;
+  if (onvl) onV = ONLAST;
+  if (u < (uf-tolu)) onU = INFFIRST;
+  if (u > (ul+tolu)) onU = SUPLAST;
+  if (v < (vf-tolv)) onV = INFFIRST;
+  if (v > (vl+tolv)) onV = SUPLAST;
 }
 
 //=======================================================================
index 797d630..c8c0b14 100644 (file)
@@ -351,10 +351,11 @@ public:
           (ViewerTest_myContexts, TCollection_AsciiString (myDriverName + "/Viewer"));
       }
       else
+      {
         myViewerName = ViewerTest_myContexts.Find2 (ViewerTest::GetAISContext());
+      }
 
-        myViewName = CreateName <Handle(V3d_View)>
-          (ViewerTest_myViews, TCollection_AsciiString(myViewerName + "/View"));
+      myViewName = CreateName <Handle(V3d_View)> (ViewerTest_myViews, TCollection_AsciiString(myViewerName + "/View"));
     }
     else
     {
@@ -1082,14 +1083,16 @@ void ViewerTest::RemoveView (const TCollection_AsciiString& theViewName, const S
     if (ViewerTest_myViews.Extent() > 1)
     {
       TCollection_AsciiString aNewViewName;
-      for (NCollection_DoubleMap <TCollection_AsciiString, Handle(V3d_View)> :: Iterator
-           anIter(ViewerTest_myViews); anIter.More(); anIter.Next())
+      for (NCollection_DoubleMap <TCollection_AsciiString, Handle(V3d_View)>::Iterator anIter (ViewerTest_myViews);
+           anIter.More(); anIter.Next())
+      {
         if (anIter.Key1() != theViewName)
         {
           aNewViewName = anIter.Key1();
           break;
         }
-        ActivateView (aNewViewName);
+      }
+      ActivateView (aNewViewName);
     }
     else
     {
@@ -1305,47 +1308,49 @@ static int VViewList (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const
     (( theArgsNb==1 ) || ( strcasecmp( theArgVec[1], "long" ) != 0 ));
 
   if (isTreeView)
+  {
     theDi << theArgVec[0] <<":\n";
+  }
 
-    for (NCollection_DoubleMap <TCollection_AsciiString, Handle(Graphic3d_GraphicDriver)>::Iterator
-      aDriverIter(ViewerTest_myDrivers); aDriverIter.More(); aDriverIter.Next())
-    {
-      if (isTreeView)
-        theDi << aDriverIter.Key1() << ":\n";
+  for (NCollection_DoubleMap <TCollection_AsciiString, Handle(Graphic3d_GraphicDriver)>::Iterator aDriverIter (ViewerTest_myDrivers);
+       aDriverIter.More(); aDriverIter.Next())
+  {
+    if (isTreeView)
+      theDi << aDriverIter.Key1() << ":\n";
 
-      for (NCollection_DoubleMap <TCollection_AsciiString, Handle(AIS_InteractiveContext)>::Iterator
-        aContextIter(ViewerTest_myContexts); aContextIter.More(); aContextIter.Next())
+    for (NCollection_DoubleMap <TCollection_AsciiString, Handle(AIS_InteractiveContext)>::Iterator
+      aContextIter(ViewerTest_myContexts); aContextIter.More(); aContextIter.Next())
+    {
+      if (aContextIter.Key1().Search(aDriverIter.Key1()) != -1)
       {
-        if (aContextIter.Key1().Search(aDriverIter.Key1()) != -1)
+        if (isTreeView)
         {
-          if (isTreeView)
-          {
-            TCollection_AsciiString aContextName(aContextIter.Key1());
-            theDi << " " << aContextName.Split(aDriverIter.Key1().Length() + 1) << ":\n";
-          }
+          TCollection_AsciiString aContextName(aContextIter.Key1());
+          theDi << " " << aContextName.Split(aDriverIter.Key1().Length() + 1) << ":\n";
+        }
 
-          for (NCollection_DoubleMap <TCollection_AsciiString, Handle(V3d_View)>::Iterator
-            aViewIter(ViewerTest_myViews); aViewIter.More(); aViewIter.Next())
+        for (NCollection_DoubleMap <TCollection_AsciiString, Handle(V3d_View)>::Iterator aViewIter (ViewerTest_myViews);
+             aViewIter.More(); aViewIter.Next())
+        {
+          if (aViewIter.Key1().Search(aContextIter.Key1()) != -1)
           {
-            if (aViewIter.Key1().Search(aContextIter.Key1()) != -1)
+            TCollection_AsciiString aViewName(aViewIter.Key1());
+            if (isTreeView)
             {
-              TCollection_AsciiString aViewName(aViewIter.Key1());
-              if (isTreeView)
-              {
-                if (aViewIter.Value() == ViewerTest::CurrentView())
-                  theDi << "  " << aViewName.Split(aContextIter.Key1().Length() + 1) << "(*)\n";
-                else
-                  theDi << "  " << aViewName.Split(aContextIter.Key1().Length() + 1) << "\n";
-              }
+              if (aViewIter.Value() == ViewerTest::CurrentView())
+                theDi << "  " << aViewName.Split(aContextIter.Key1().Length() + 1) << "(*)\n";
               else
-              {
-                theDi << aViewName << " ";
-              }
+                theDi << "  " << aViewName.Split(aContextIter.Key1().Length() + 1) << "\n";
+            }
+            else
+            {
+              theDi << aViewName << " ";
             }
           }
         }
       }
     }
+  }
   return 0;
 }
 
index 0a8ece6..f95eaad 100644 (file)
@@ -1097,9 +1097,12 @@ static Standard_Integer testDoc (Draw_Interpretor&,
 
 void XDEDRAW::Init(Draw_Interpretor& di)
 {
-
   static Standard_Boolean initactor = Standard_False;
-  if (initactor) return;  initactor = Standard_True;
+  if (initactor)
+  {
+    return;
+  }
+  initactor = Standard_True;
 
   // Load static variables for STEPCAF (ssv; 16.08.2012)
   STEPCAFControl_Controller::Init();
index 985bfdb..8aa1b50 100644 (file)
@@ -403,9 +403,12 @@ static Standard_Integer setStyledcolor (Draw_Interpretor& di, Standard_Integer a
 
 void XDEDRAW_Colors::InitCommands(Draw_Interpretor& di) 
 {
-
   static Standard_Boolean initactor = Standard_False;
-  if (initactor) return;  initactor = Standard_True;
+  if (initactor)
+  {
+    return;
+  }
+  initactor = Standard_True;
 
   //=====================================
   // Work with colors
index 9b347cc..2902446 100644 (file)
@@ -513,10 +513,14 @@ static Standard_Integer Expand (Draw_Interpretor& di, Standard_Integer argc, con
   return 0;
 }
 
-void XDEDRAW_Common::InitCommands(Draw_Interpretor& di) {
-
+void XDEDRAW_Common::InitCommands(Draw_Interpretor& di)
+{
   static Standard_Boolean initactor = Standard_False;
-  if (initactor) return;  initactor = Standard_True;
+  if (initactor)
+  {
+    return;
+  }
+  initactor = Standard_True;
 
   Standard_CString g = "XDE translation commands";
 
index 0b66031..68626d9 100644 (file)
@@ -2513,10 +2513,12 @@ static Standard_Integer getGDTPresentation (Draw_Interpretor& di, Standard_Integ
 
 void XDEDRAW_GDTs::InitCommands(Draw_Interpretor& di) 
 {
-
   static Standard_Boolean initactor = Standard_False;
-  if (initactor) return;  initactor = Standard_True;
-
+  if (initactor)
+  {
+    return;
+  }
+  initactor = Standard_True;
   
   Standard_CString g = "XDE G&DTs commands";
 
index e28b2c6..858c072 100644 (file)
@@ -401,9 +401,12 @@ static Standard_Integer isVisible (Draw_Interpretor& di, Standard_Integer argc,
 
 void XDEDRAW_Layers::InitCommands(Draw_Interpretor& di) 
 {
-
   static Standard_Boolean initactor = Standard_False;
-  if (initactor) return;  initactor = Standard_True;
+  if (initactor)
+  {
+    return;
+  }
+  initactor = Standard_True;
 
   //=====================================
   // Work with layers
index c1fc093..f304352 100644 (file)
@@ -906,9 +906,12 @@ static Standard_Integer SetMaterial (Draw_Interpretor& di, Standard_Integer argc
 
 void XDEDRAW_Props::InitCommands(Draw_Interpretor& di) 
 {
-
   static Standard_Boolean initactor = Standard_False;
-  if (initactor) return;  initactor = Standard_True;
+  if (initactor)
+  {
+    return;
+  }
+  initactor = Standard_True;
 
   Standard_CString g = "XDE property's commands";
   
index 51e5355..82f6dfb 100644 (file)
@@ -847,9 +847,12 @@ static Standard_Integer updateAssemblies(Draw_Interpretor& di, Standard_Integer
 
 void XDEDRAW_Shapes::InitCommands(Draw_Interpretor& di) 
 {
-
   static Standard_Boolean initactor = Standard_False;
-  if (initactor) return;  initactor = Standard_True;
+  if (initactor)
+  {
+    return;
+  }
+  initactor = Standard_True;
 
   //=====================================
   // Work with shapes
index 7587743..f33af92 100644 (file)
@@ -1307,10 +1307,12 @@ static Standard_Integer getClippingPlaneCapping(Draw_Interpretor& di, Standard_I
 
 void XDEDRAW_Views::InitCommands(Draw_Interpretor& di) 
 {
-
   static Standard_Boolean initactor = Standard_False;
-  if (initactor) return;  initactor = Standard_True;
-
+  if (initactor)
+  {
+    return;
+  }
+  initactor = Standard_True;
   
   Standard_CString g = "XDE Views commands";
 
index 9b1b913..69f7f85 100644 (file)
@@ -702,17 +702,21 @@ static IFSelect_ReturnStatus XSControl_twrite
 //  ####                                                              ####
 //  ######################################################################
 
-static int initactor = 0;
-
+static int THE_XSControl_FuncShape_initactor = 0;
 
 //=======================================================================
 //function : Init
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 void  XSControl_FuncShape::Init ()
 {
-  if (initactor) return;  initactor = 1;
+  if (THE_XSControl_FuncShape_initactor)
+  {
+    return;
+  }
+
+  THE_XSControl_FuncShape_initactor = 1;
 
   IFSelect_Act::SetGroup("DE: General");
 
@@ -781,7 +785,11 @@ Standard_Integer  XSControl_FuncShape::MoreShapes
   //  liste
   if (n1 <= n2 && n1 > 0) {
     char nom[50], nomsh[60];  Standard_Integer nbsh = 0;
-    for (i = 0; i < paro; i ++) nom[i]=name[i];   nom[paro] = '\0';
+    for (i = 0; i < paro; i ++)
+    {
+      nom[i]=name[i];
+    }
+    nom[paro] = '\0';
     sout<<"Shapes DRAW named : "<<nom<<n1<<" to "<<nom<<n2;
     for (i = n1; i <= n2 ; i ++) {
       const char* nomshh = &nomsh[0];
index 7de4276..4b57748 100644 (file)
@@ -335,10 +335,10 @@ static IFSelect_ReturnStatus XSControl_trbegin(const Handle(IFSelect_SessionPilo
   if (init) {
     XSControl::Session(pilot)->InitTransferReader (0);
     TR = XSControl::Session(pilot)->TransferReader();
-    if (TR.IsNull()) { 
+    if (TR.IsNull()) {
       Handle(Message_Messenger) sout = Message::DefaultMessenger();
-      sout<<" init not done or failed"<<endl; 
-      return IFSelect_RetError; 
+      sout<<" init not done or failed"<<endl;
+      return IFSelect_RetError;
     }
   }
   TR->BeginTransfer();
@@ -462,16 +462,21 @@ static IFSelect_ReturnStatus XSControl_settransfert(const Handle(IFSelect_Sessio
 
 
 
-static int initactor = 0;
+static int THE_XSControl_Functions_initactor = 0;
 
 //=======================================================================
 //function : Init
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 void XSControl_Functions::Init ()
 {
-  if (initactor) return;  initactor = 1;
+  if (THE_XSControl_Functions_initactor)
+  {
+    return;
+  }
+
+  THE_XSControl_Functions_initactor = 1;
   IFSelect_Act::SetGroup("DE: General");
 
   IFSelect_Act::AddFunc ("xinit","[norm:string to change norme] reinitialises according to the norm",XSControl_xinit);
index 32e91c8..1f8caed 100644 (file)
@@ -205,7 +205,11 @@ Standard_Boolean  XSControl_WorkSession::PrintTransferStatus(const Standard_Inte
     }
 
     S<<"Transfer Write item n0."<<ne<<" of "<<max;
-    if (nr > 0) S<<"  ** Transfer Root n0."<<ne;  S<<endl;
+    if (nr > 0)
+    {
+      S<<"  ** Transfer Root n0."<<ne;
+    }
+    S<<endl;
     ent = FP->FindTransient(finder);
     S<<" -> Type "<<finder->DynamicType()->Name()<<endl;
     FP->StartTrace (binder,finder,0,0);  // pb sout/S
@@ -240,7 +244,11 @@ Standard_Boolean  XSControl_WorkSession::PrintTransferStatus(const Standard_Inte
     }
 
     S<<"Transfer Read item n0."<<ne<<" of "<<max;
-    if (nr > 0) S<<"  ** Transfer Root n0."<<ne;  S<<endl;
+    if (nr > 0)
+    {
+      S<<"  ** Transfer Root n0."<<ne;
+    }
+    S<<endl;
     if (!model.IsNull())  {  S<<" In Model, Entity ";  model->Print(ent,S); }
     binder = TP->MapItem (ne);
     S<<endl;
index 60c8341..8c8ef6b 100644 (file)
@@ -97,7 +97,11 @@ static Standard_Integer XSTEPDRAWRUN (Draw_Interpretor& , Standard_Integer argc,
 
 void XSDRAW::LoadDraw (Draw_Interpretor& theCommands)
 {
-  if (dejald) return;  dejald = 1;
+  if (dejald)
+  {
+    return;
+  }
+  dejald = 1;
 //  Pour tout faire d un coup : BRepTest & cie:
   LoadSession();