0024171: Eliminate CLang compiler warning -Wreorder
authoromy <omy@opencascade.com>
Thu, 12 Sep 2013 07:30:34 +0000 (11:30 +0400)
committerabv <abv@opencascade.com>
Wed, 18 Sep 2013 05:36:12 +0000 (09:36 +0400)
Got rid of -Wreorder warning (wrong fields' initialization order); some warnings -Wdangling-else are also fixed

63 files changed:
src/AIS/AIS_InteractiveContext_1.cxx
src/AIS/AIS_LocalContext.cxx
src/AIS/AIS_Selection.cxx
src/Adaptor3d/Adaptor3d_TopolTool.cxx
src/Aspect/Aspect_ColorScale.cxx
src/BOPDS/BOPDS_DS.cxx
src/BOPTools/BOPTools_ConnexityBlock.hxx
src/BRepExtrema/BRepExtrema_DistShapeShape.cxx
src/BRepFill/BRepFill_PipeShell.cxx
src/BRepFill/BRepFill_Sweep.cxx
src/BRepMesh/BRepMesh_Triangle.hxx
src/BRepTools/BRepTools_NurbsConvertModification.cxx
src/BinTools/BinTools_ShapeSet.cxx
src/BlendFunc/BlendFunc_CSCircular.cxx
src/ChFi3d/ChFi3d_Builder_6.cxx
src/GeomPlate/GeomPlate_BuildPlateSurface.cxx
src/Hermit/Hermit.cxx
src/IGESControl/IGESControl_IGESBoundary.cxx
src/IGESDefs/IGESDefs_ToolAttributeTable.cxx
src/IGESToBRep/IGESToBRep_IGESBoundary.cxx
src/IntPatch/IntPatch_RstInt.cxx
src/IntPolyh/IntPolyh_MaillageAffinage.cxx
src/IntSurf/IntSurf_Quadric.cdl
src/MeshVS/MeshVS_Mesh.cxx
src/MeshVS/MeshVS_MeshPrsBuilder.cxx
src/NCollection/NCollection_BaseSequence.cxx
src/NIS/NIS_InteractiveObject.cxx
src/OpenGl/OpenGl_Context.cxx
src/OpenGl/OpenGl_PrinterContext.cxx
src/OpenGl/OpenGl_View.cxx
src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx
src/QANewBRepNaming/QANewBRepNaming_Gluing.cxx
src/QANewModTopOpe/QANewModTopOpe_Glue.cxx
src/QANewModTopOpe/QANewModTopOpe_Limitation.cxx
src/Resource/Resource_Manager.cxx
src/STEPControl/STEPControl_ActorWrite.cxx
src/SWDRAW/SWDRAW_ShapeFix.cxx
src/SWDRAW/SWDRAW_ShapeUpgrade.cxx
src/SelectMgr/SelectMgr_EntityOwner.cxx
src/SelectMgr/SelectMgr_SelectableObject.cxx
src/ShapeAnalysis/ShapeAnalysis_BoxBndTree.hxx
src/ShapeAnalysis/ShapeAnalysis_CheckSmallFace.cxx
src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx
src/ShapeCustom/ShapeCustom_ConvertToBSpline.cxx
src/ShapeFix/ShapeFix_ComposeShell.cxx
src/ShapeFix/ShapeFix_Face.cxx
src/ShapeFix/ShapeFix_Wire.cxx
src/ShapeProcess/ShapeProcess_ShapeContext.cxx
src/ShapeProcessAPI/ShapeProcessAPI_ApplySequence.cxx
src/TNaming/TNaming_NamedShape.cxx
src/TopClass/TopClass_Classifier2d.gxx
src/TopTrans/TopTrans_SurfaceTransition.cxx
src/V3d/V3d_View.cdl
src/ViewerTest/ViewerTest.cxx
src/ViewerTest/ViewerTest_EventManager.cxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
src/Voxel/Voxel_FastConverter.cxx
src/VrmlData/VrmlData_Geometry.cxx
src/VrmlData/VrmlData_IndexedFaceSet.cxx
src/VrmlData/VrmlData_Node.cxx
src/VrmlData/VrmlData_Scene.cxx
src/XCAFDoc/XCAFDoc_ColorTool.cxx
src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx

index b9341e1..0130bba 100755 (executable)
@@ -207,13 +207,14 @@ AIS_StatusOfDetection AIS_InteractiveContext::MoveTo(const Standard_Integer XPix
   selector->Init();
   if ( selector->More() )
   {
-    if ( HasOpenedContext() )
+    if ( HasOpenedContext() ) 
+    {
       if ( !myFilters->IsOk( selector->OnePicked() ) ) 
-       return AIS_SOD_AllBad;
+        return AIS_SOD_AllBad;
       else
         if ( !myLocalContexts( myCurLocalIndex )->Filter()->IsOk( selector->OnePicked() ) )
           return AIS_SOD_AllBad;
-    
+    }
  
     // Does nothing if previously detected object is equal to the current one
     if ( selector->OnePicked()->Selectable() == myLastPicked )
index 4997c38..f3c5495 100755 (executable)
@@ -538,7 +538,7 @@ Standard_Boolean AIS_LocalContext::Remove(const Handle(AIS_InteractiveObject)& a
   const Handle(V3d_Viewer)& aViewer = myCTX->CurrentViewer();
   for(i = 1; i <= myMapOfOwner.Extent(); i++){
     const Handle(SelectMgr_EntityOwner)& anOwner = myMapOfOwner(i) ;
-    if(!anOwner.IsNull())
+    if(!anOwner.IsNull()) {
       if(anOwner->Selectable() != aSelectable)
         ownersToKeep.Add(anOwner);
       else
@@ -549,6 +549,7 @@ Standard_Boolean AIS_LocalContext::Remove(const Handle(AIS_InteractiveObject)& a
             Unhilight(anOwner, aViewer->ActiveView());
         }
       }
+    }
   }
   myMapOfOwner.Clear();
   myMapOfOwner.Assign(ownersToKeep);
index 69ccd6b..91c72ae 100755 (executable)
@@ -248,11 +248,12 @@ AIS_SelectStatus AIS_Selection::Select(const Handle(Standard_Transient)& anObjec
   if ( S->myResultMap.IsBound( anObject ) ){
     AIS_NListTransient::Iterator aListIter = S->myResultMap.Find( anObject );
 //skt-----------------------------------------------------------------
-    if( S->myIterator == aListIter )
-       if( S->myIterator.More() )
-           S->myIterator.Next();
-       else
-           S->myIterator = AIS_NListTransient::Iterator();
+    if( S->myIterator == aListIter ) {
+      if( S->myIterator.More() )
+          S->myIterator.Next();
+      else
+          S->myIterator = AIS_NListTransient::Iterator();
+    }
 //--------------------------------------------------------------------
 #ifdef BUC60953
     // In the mode of advanced mesh selection only one owner is created
index f852a0c..8d23eed 100755 (executable)
@@ -55,7 +55,7 @@ static void GetConeApexParam(const gp_Cone& C, Standard_Real& U, Standard_Real&
 }
 
 
-Adaptor3d_TopolTool::Adaptor3d_TopolTool () : nbRestr(0),idRestr(0),myNbSamplesU(-1)
+Adaptor3d_TopolTool::Adaptor3d_TopolTool () : nbRestr(0),myNbSamplesU(-1),idRestr(0)
                                               
 {
 }
index ff9d868..128f545 100755 (executable)
@@ -41,13 +41,13 @@ myMax( 1.0 ),
 myXPos( 0 ),
 myYPos( 0 ),
 myWidth( 0.2 ),
-myHeight( 1 ),
 myTitle( "" ),
-myInterval( 10 ),
+myHeight( 1 ),
 myFormat( "%.4g" ),
+myInterval( 10 ),
 myAtBorder( Standard_True ),
-myReversed( Standard_False ),
 myColorType( Aspect_TOCSD_AUTO ),
+myReversed( Standard_False ),
 myLabelType( Aspect_TOCSD_AUTO ),
 myLabelPos( Aspect_TOCSP_RIGHT ),
 myTitlePos( Aspect_TOCSP_CENTER ),
index 9e4a91f..ab9c00b 100644 (file)
@@ -82,8 +82,8 @@ BOPDS_DS::BOPDS_DS()
   myMapShapeIndex(100, myAllocator),
   myPaveBlocksPool(myAllocator),
   myFaceInfoPool(myAllocator),
-  myShapesSD(100, myAllocator),
   myMapPBCB(100, myAllocator),
+  myShapesSD(100, myAllocator),
   myInterfTB(100, myAllocator),
   myInterfVV(myAllocator),
   myInterfVE(myAllocator),
@@ -108,8 +108,8 @@ BOPDS_DS::BOPDS_DS(const Handle(NCollection_BaseAllocator)& theAllocator)
   myMapShapeIndex(100, myAllocator),
   myPaveBlocksPool(myAllocator),
   myFaceInfoPool(myAllocator),
-  myShapesSD(100, myAllocator),
   myMapPBCB(100, myAllocator),
+  myShapesSD(100, myAllocator),
   myInterfTB(100, myAllocator),
   myInterfVV(myAllocator),
   myInterfVE(myAllocator),
index 5be56d8..890c0ef 100644 (file)
@@ -75,8 +75,8 @@ class BOPTools_ConnexityBlock {
   };
   //
  protected:
-  Standard_Boolean myRegular;
   Handle(NCollection_BaseAllocator) myAllocator;
+  Standard_Boolean myRegular;
   BOPCol_ListOfShape myShapes;
   BOPCol_ListOfShape myLoops;
 };
index 80b0502..5382969 100755 (executable)
@@ -96,7 +96,7 @@ void BRepExtrema_DistShapeShape::DistanceMapMap(const TopTools_IndexedMapOfShape
       const TopoDS_Shape &S2 = Map2(j);
 
       BRepExtrema_DistanceSS  dist(S1,S2,box1,box2,myDistRef,myEps);
-      if (dist.IsDone())
+      if (dist.IsDone()) {
         if(dist.DistValue() < (myDistRef-myEps))
         {
           mySolutionsShape1.Clear();
@@ -116,6 +116,7 @@ void BRepExtrema_DistShapeShape::DistanceMapMap(const TopTools_IndexedMapOfShape
           if (myDistRef > dist.DistValue())
             myDistRef=dist.DistValue();
         }
+      }
     }
   }
 }
index e6aadaf..8107679 100755 (executable)
@@ -210,10 +210,10 @@ static Standard_Boolean IsSameOriented(const TopoDS_Shape& aFace,
 //=======================================================================
 BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
                       :  mySpine(Spine), 
-                        myTrihedron(GeomFill_IsCorrectedFrenet),
-                        myTransition(BRepFill_Modified),
+                         myTrihedron(GeomFill_IsCorrectedFrenet),
                          myForceApproxC1(Standard_False),
-                        myStatus(GeomFill_PipeOk)
+                         myTransition(BRepFill_Modified),
+                         myStatus(GeomFill_PipeOk)
 {
   myLocation.Nullify();
   mySection.Nullify();
index dc8791b..69260a7 100755 (executable)
@@ -2259,26 +2259,27 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
         }
        }
 
-      if (ipath == 1)
-       if (uclose && (isec == NbLaw)) {
-         Vertex(isec+1, 1) =  Vertex(1, 1);
-       }  
-       else if (Vertex(isec+1, 1).IsNull()) {
-         if (constSection)
-           myLoc->PerformVertex(IPath-1, 
-                                TopoDS::Vertex(SecVertex(isec+1)),
-                                TabErr(isec,1)+VError(isec+1),
-                                TopoDS::Vertex(Vertex(isec+1, 1)) );
-         else
-           myLoc->PerformVertex(IPath-1, 
-                                mySec->Vertex(isec+1,Vi(1)), 
-                                TabErr(isec,1) +
-                                mySec->VertexTol(isec,Vi(1)),
-                                TopoDS::Vertex(Vertex(isec+1, 1)) );
-         if (MergeVertex(Vertex(isec,1), Vertex(isec+1,1))) {
-           VEdge(isec, 1) = NullEdge(Vertex(isec, 1)); 
-         }
-       }
+      if (ipath == 1) {
+        if (uclose && (isec == NbLaw)) {
+          Vertex(isec+1, 1) =  Vertex(1, 1);
+        }  
+        else if (Vertex(isec+1, 1).IsNull()) {
+          if (constSection)
+            myLoc->PerformVertex(IPath-1, 
+               TopoDS::Vertex(SecVertex(isec+1)),
+               TabErr(isec,1)+VError(isec+1),
+               TopoDS::Vertex(Vertex(isec+1, 1)) );
+          else
+            myLoc->PerformVertex(IPath-1, 
+               mySec->Vertex(isec+1,Vi(1)), 
+               TabErr(isec,1) +
+               mySec->VertexTol(isec,Vi(1)),
+               TopoDS::Vertex(Vertex(isec+1, 1)) );
+          if (MergeVertex(Vertex(isec,1), Vertex(isec+1,1))) {
+            VEdge(isec, 1) = NullEdge(Vertex(isec, 1)); 
+          }
+        }
+      }
 
       if (uclose && (isec == NbLaw)) {
        Vertex(isec+1, ipath+1) = Vertex(1, ipath+1);
index d9ac741..acd0815 100644 (file)
@@ -77,10 +77,10 @@ public:
 private:
 
   Standard_Integer          myEdge1;
-  Standard_Boolean          myOrientation1;
   Standard_Integer          myEdge2;
-  Standard_Boolean          myOrientation2;
   Standard_Integer          myEdge3;
+  Standard_Boolean          myOrientation1;
+  Standard_Boolean          myOrientation2;
   Standard_Boolean          myOrientation3;
   BRepMesh_DegreeOfFreedom  myMovability;
 };
index 2074125..a9e0ff9 100755 (executable)
@@ -544,19 +544,21 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
       v = (Vsup - Vinf)*0.1;
       if(S->IsUPeriodic()) {
         Standard_Real uperiod = S->UPeriod();
-        if(uperiod < (Usup+2*u-Uinf))
+        if(uperiod < (Usup+2*u-Uinf)) {
           if(uperiod <= (Usup-Uinf))
             u = 0;
           else
             u = (uperiod-(Usup-Uinf))*0.5;
+        }
       }
       if(S->IsVPeriodic()) {
         Standard_Real vperiod = S->VPeriod();
-        if(vperiod < (Vsup+2*v-Vinf))
+        if(vperiod < (Vsup+2*v-Vinf)) {
           if(vperiod <= (Vsup-Vinf))
             v = 0;
           else
             v = (vperiod-(Vsup-Vinf))*0.5;
+        }
       }
       GeomAdaptor_Surface GAS(S, Uinf-u,Usup+u,Vinf-v,Vsup+v);
       Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(GAS);
index 4eddfb2..86413b7 100755 (executable)
@@ -75,7 +75,7 @@ static Standard_OStream& operator <<(Standard_OStream& OS, const gp_Pnt P)
 //=======================================================================
 
 BinTools_ShapeSet::BinTools_ShapeSet(const Standard_Boolean isWithTriangles)
-     :myWithTriangles(isWithTriangles), myFormatNb(3)
+     :myFormatNb(3), myWithTriangles(isWithTriangles)
 {}
 
 //=======================================================================
index 2679676..a9ee795 100755 (executable)
@@ -46,7 +46,7 @@ BlendFunc_CSCircular::BlendFunc_CSCircular(const Handle(Adaptor3d_HSurface)& S,
                                            const Handle(Adaptor3d_HCurve)& C,
                                            const Handle(Adaptor3d_HCurve)& CGuide,
                                            const Handle(Law_Function)& L) :
-       surf(S),curv(C),guide(CGuide),istangent(Standard_True),law(L),
+       surf(S),curv(C),guide(CGuide),law(L),istangent(Standard_True),
        //prmc, dprmc, istangent, ray, choix, normtg,
        maxang(RealFirst()),minang(RealLast()),mySShape(BlendFunc_Rational)
        //myTConv
index 1e79f9a..c1c7e30 100755 (executable)
@@ -1778,7 +1778,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
       narc1 = Lin->StartPointOnFirst().NbPointOnRst();
       narc2 = Lin->StartPointOnSecond().NbPointOnRst();
 //  modified by eap Fri Feb  8 11:43:48 2002 ___BEGIN___
-      if(!debarc1)
+      if(!debarc1) {
        if (narc1 == 0)
          backwContinueFailed = Lin->StartPointOnFirst().ParameterOnGuide() > Target;
        else {
@@ -1799,7 +1799,8 @@ Standard_Boolean ChFi3d_Builder::ComputeData
 //         }
          }
        }
-      if(!debarc2)
+      }
+      if(!debarc2) {
        if (narc2 == 0)
          backwContinueFailed = Lin->StartPointOnSecond().ParameterOnGuide() > Target;
        else {
@@ -1820,6 +1821,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
 //             }
           }
         }
+      }
       if (backwContinueFailed) {
        // if we leave backwContinueFailed as is, we will stop in this direction
        // but we are to continue if there are no more faces on the side with arc
@@ -1879,7 +1881,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
       narc1 = Lin->EndPointOnFirst().NbPointOnRst();
       narc2 = Lin->EndPointOnSecond().NbPointOnRst();
 //  modified by eap Fri Feb  8 11:44:57 2002 ___BEGIN___
-      if(!finarc1)
+      if(!finarc1) {
        if (narc1 == 0) 
          forwContinueFailed = Lin->EndPointOnFirst().ParameterOnGuide() < Target;
        else {
@@ -1895,7 +1897,8 @@ Standard_Boolean ChFi3d_Builder::ComputeData
 //         }
          }
        }
-      if(!finarc2)
+      }
+      if(!finarc2) {
        if (narc2 == 0)
          forwContinueFailed = Lin->EndPointOnSecond().ParameterOnGuide() < Target;
        else {
@@ -1911,6 +1914,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
 //         }
          }
        }
+      }
       if (forwContinueFailed) {
        // if we leave forwContinueFailed as is, we will stop in this direction
        // but we are to continue if there are no more faces on the side with arc
index a59c3a8..0711bc2 100755 (executable)
@@ -2033,107 +2033,126 @@ Discretise(const Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter,
     if (Affich > 1) {
       cout << "Courbe : " << i << endl;
       cout << "  NbPnt, NbPtInter, NbPtG1G1 :" << NbPnt_i << ", " 
-       << NbPtInter << ", " << NbPtG1G1 << endl;
+           << NbPtInter << ", " << NbPtG1G1 << endl;
     }
 #endif
     for (Standard_Integer j=1; j<=NbPnt_i; j++)  
-      { // repartition des points en cosinus selon l'ACR 2d
-        // Afin d'eviter les points d'acumulation dans le 2d
-       //Inter=Uinit+(Uif)*((-cos(M_PI*((j-1)/(NbPnt_i-1)))+1)/2);
-       if (j==NbPnt_i)
-         Inter=Ufinal;//pour parer au bug sur sun
-       else if (ACR) {
-          CurLength = Length2d*(1-Cos((j-1)*M_PI/(NbPnt_i-1)))/2;
-         Inter =  acrlaw->Value(CurLength);
-       }
-       else {
-         Inter=Uinit+(Ufinal-Uinit)*((1-Cos((j-1)*M_PI/(NbPnt_i-1)))/2);
-       }
-       myParCont->ChangeValue(i).Append(Inter);// on ajoute le point
-       if (NbPtInter!=0) 
-         { for(Standard_Integer l=1;l<=NbPtInter;l+=2) 
-             //on cherche si le point Inter est dans l'intervalle 
-             //PntInter[i] PntInter[i+1]
-             //auquelle cas il ne faudrait pas le stocker (pb de doublons) 
-             { if ((Inter>PntInter->Value(i).Value(l))
-                   &&(Inter<PntInter->Value(i).Value(l+1)))
-                 { l=NbPtInter+2; 
-                   // pour sortir de la boucle sans stocker le point    
-                 }
-             else
-               { if (l+1>=NbPtInter) 
-                   // on a parcouru tout le tableau : Le point 
-                   // n'appartient pas a un interval point commun 
-                   if (NbPtG1G1!=0) 
-                     // est qu'il existe un intervalle incompatible
-                     for(Standard_Integer k=1;k<=NbPtG1G1;k+=2)
-                       { if ((Inter>PntG1G1->Value(i).Value(k))
-                             &&(Inter<PntG1G1->Value(i).Value(k+1)))
-                           { k=NbPtG1G1+2; // pour sortir de la boucle
-                             // Ajouter les points de contrainte G0
-                             gp_Pnt P3d,PP,Pdif;
-                             gp_Pnt2d P2d;
-                             
-                             AC2d.D0(Inter, P2d);
-                             LinCont->D0(Inter,P3d);
-                             mySurfInit->D0(P2d.Coord(1),P2d.Coord(2),PP);
-                             Pdif.SetCoord(-PP.Coord(1)+P3d.Coord(1),
-                                           -PP.Coord(2)+P3d.Coord(2),
-                                           -PP.Coord(3)+P3d.Coord(3));
-                             Plate_PinpointConstraint PC(P2d.XY(),
-                                                         Pdif.XYZ(),0,0);
-                             myPlate.Load(PC);
-
-                           }
-                       else // le point n'appartient pas a un interval G1
-                         { if (k+1>=NbPtG1G1) 
-                             { myPlateCont->ChangeValue(i).Append(Inter);
-                               // on ajoute le point
-                             }
-                         }
-                       }
-                   else
-                     { myPlateCont->ChangeValue(i).Append(Inter);
-                       // on ajoute le point
-                     }
-               }
-             }
-         }
-       else
-         { if (NbPtG1G1!=0) // est qu'il existe un intervalle incompatible
-             for(Standard_Integer k=1;k<=NbPtG1G1;k+=2)
-               { if ((Inter>PntG1G1->Value(i).Value(k))
-                     &&(Inter<PntG1G1->Value(i).Value(k+1)))
-                   { k=NbPtG1G1+2; // pour sortir de la boucle
-                     // Ajouter les points de contrainte G0
-                     gp_Pnt P3d,PP,Pdif;
-                     gp_Pnt2d P2d;
-                     
-                     AC2d.D0(Inter, P2d);
-                     LinCont->D0(Inter,P3d);
-                     mySurfInit->D0(P2d.Coord(1),P2d.Coord(2),PP);
-                     Pdif.SetCoord(-PP.Coord(1)+P3d.Coord(1),
-                                   -PP.Coord(2)+P3d.Coord(2),
-                                   -PP.Coord(3)+P3d.Coord(3));
-                     Plate_PinpointConstraint PC(P2d.XY(),Pdif.XYZ(),0,0);
-                     myPlate.Load(PC);
+    { 
+      // repartition des points en cosinus selon l'ACR 2d
+      // Afin d'eviter les points d'acumulation dans le 2d
+      //Inter=Uinit+(Uif)*((-cos(M_PI*((j-1)/(NbPnt_i-1)))+1)/2);
+      if (j==NbPnt_i)
+        Inter=Ufinal;//pour parer au bug sur sun
+      else if (ACR) {
+        CurLength = Length2d*(1-Cos((j-1)*M_PI/(NbPnt_i-1)))/2;
+        Inter =  acrlaw->Value(CurLength);
+      }
+      else {
+        Inter=Uinit+(Ufinal-Uinit)*((1-Cos((j-1)*M_PI/(NbPnt_i-1)))/2);
+      }
+      myParCont->ChangeValue(i).Append(Inter);// on ajoute le point
+      if (NbPtInter!=0) 
+      { 
+        for(Standard_Integer l=1;l<=NbPtInter;l+=2) 
+        {
+          //on cherche si le point Inter est dans l'intervalle 
+          //PntInter[i] PntInter[i+1]
+          //auquelle cas il ne faudrait pas le stocker (pb de doublons) 
+          if ((Inter>PntInter->Value(i).Value(l))
+            &&(Inter<PntInter->Value(i).Value(l+1)))
+          { 
+            l=NbPtInter+2; 
+            // pour sortir de la boucle sans stocker le point   
+          }
+          else
+          {
+            if (l+1>=NbPtInter) {
+              // on a parcouru tout le tableau : Le point 
+              // n'appartient pas a un interval point commun 
+              if (NbPtG1G1!=0) 
+              {
+                // est qu'il existe un intervalle incompatible
+                for(Standard_Integer k=1;k<=NbPtG1G1;k+=2)
+                { 
+                  if ((Inter>PntG1G1->Value(i).Value(k))
+                    &&(Inter<PntG1G1->Value(i).Value(k+1)))
+                  { 
+                    k=NbPtG1G1+2; // pour sortir de la boucle
+                    // Ajouter les points de contrainte G0
+                    gp_Pnt P3d,PP,Pdif;
+                    gp_Pnt2d P2d;
+                        
+                    AC2d.D0(Inter, P2d);
+                    LinCont->D0(Inter,P3d);
+                    mySurfInit->D0(P2d.Coord(1),P2d.Coord(2),PP);
+                    Pdif.SetCoord(-PP.Coord(1)+P3d.Coord(1),
+                                  -PP.Coord(2)+P3d.Coord(2),
+                                  -PP.Coord(3)+P3d.Coord(3));
+                    Plate_PinpointConstraint PC(P2d.XY(),Pdif.XYZ(),0,0);
+                    myPlate.Load(PC);
+                  }
+                  else // le point n'appartient pas a un interval G1
+                  {
+                    if (k+1>=NbPtG1G1) 
+                    {
+                      myPlateCont->ChangeValue(i).Append(Inter);
+                      // on ajoute le point
+                    }
+                  }
+                }
+              }
+              else
+              {
+                myPlateCont->ChangeValue(i).Append(Inter);
+                // on ajoute le point
+              }
+            }
+          }
+        }
+      }
+      else
+      {
+        if (NbPtG1G1!=0) // est qu'il existe un intervalle incompatible
+        {
+          for(Standard_Integer k=1;k<=NbPtG1G1;k+=2)
+          {
+            if ((Inter>PntG1G1->Value(i).Value(k))
+              &&(Inter<PntG1G1->Value(i).Value(k+1)))
+            {
+              k=NbPtG1G1+2; // pour sortir de la boucle
+              // Ajouter les points de contrainte G0
+              gp_Pnt P3d,PP,Pdif;
+              gp_Pnt2d P2d;
+              
+              AC2d.D0(Inter, P2d);
+              LinCont->D0(Inter,P3d);
+              mySurfInit->D0(P2d.Coord(1),P2d.Coord(2),PP);
+              Pdif.SetCoord(-PP.Coord(1)+P3d.Coord(1),
+                -PP.Coord(2)+P3d.Coord(2),
+                -PP.Coord(3)+P3d.Coord(3));
+              Plate_PinpointConstraint PC(P2d.XY(),Pdif.XYZ(),0,0);
+              myPlate.Load(PC);
 
-                   }
-               else // le point n'appartient pas a un intervalle G1
-                 { if (k+1>=NbPtG1G1) 
-                     { myPlateCont->ChangeValue(i).Append(Inter);
-                       // on ajoute le point
-                     }
-                 }
-               }
-         else
-           { if (  ( (!mySurfInitIsGive)
-                     &&(Geom2dAdaptor_Curve(LinCont->Curve2dOnSurf()).GetType()!=GeomAbs_Circle))
-                 || ( (j>1) &&(j<NbPnt_i))) //on enleve les extremites
-               myPlateCont->ChangeValue(i).Append(Inter);// on ajoute le point
-           }
-         }
+            }
+            else // le point n'appartient pas a un intervalle G1
+            {
+              if (k+1>=NbPtG1G1) 
+              {
+                myPlateCont->ChangeValue(i).Append(Inter);
+                // on ajoute le point
+              }
+            }
+          }
+        }
+        else
+        {
+          if (  ( (!mySurfInitIsGive)
+                  &&(Geom2dAdaptor_Curve(LinCont->Curve2dOnSurf()).GetType()!=GeomAbs_Circle))
+             || ( (j>1) &&(j<NbPnt_i))) //on enleve les extremites
+            myPlateCont->ChangeValue(i).Append(Inter);// on ajoute le point
+        }
       }
+    }
   } 
 }
 //---------------------------------------------------------
index c4881e2..4ff6c1c 100755 (executable)
@@ -235,62 +235,77 @@ static void PolyTest(const TColStd_Array1OfReal&         Herm,
     Standard_Real  Polemax=Polesinit(max).Y();
     if (((Polemax)>=((1/TolPoles)*Polemin))||((Polemin==0.0)&&(Polemax>=(1/TolPoles)))){
       if (Polesinit(0).Y()>=(1/TolPoles)*Polesinit(3).Y()||Polesinit(0).Y()<=TolPoles*Polesinit(3).Y())
-       Standard_DimensionError::Raise("Hermit Impossible Tolerance");       
-      if ((max==0)||(max==3))                                                
-       for (i=0;i<=3;i++)
-         Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-TolPoles*Polemax));
-      if ((max==1)||(max==2))
-       if ((min==0)||(min==3))                                             
-         for (i=0;i<=3;i++)
-           Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-(1/TolPoles)*Polemin));
-       else{                                                                  
-         if ((TolPoles*Polemax<Polesinit(0).Y())&&(TolPoles*Polemax<Polesinit(3).Y())){
-           for (i=0;i<=3;i++)                                             
-             Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-TolPoles*Polemax));
-           mark=1;
-         }
-         if ((1/TolPoles*Polemin>Polesinit(0).Y())&&(1/TolPoles*Polemin>Polesinit(3).Y())&&(mark==0)){
-           for (i=0;i<=3;i++)                                             
-             Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-1/TolPoles*Polemin));
-           mark=1;
-         }
-         if (mark==0){
-           Standard_Real Pole0,Pole3;
-           Pole0=Polesinit(0).Y();
-           Pole3=Polesinit(3).Y();
-           if (Pole0<3){                         
-             a=Log10(Pole3/Pole0);                      
-             if (boucle==2)                      
-               for (i=0;i<=3;i++)                                                    
-                 Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole3*(Pow(10.0,(-0.5*Log10(TolPoles)-a/2.0))))); 
-             if (boucle==1){
-               for (i=0;i<=3;i++)                                                    
-                 Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole0*(Pow(10.0,(a/2.0+0.5*Log10(TolPoles)))))); 
-               dercas=1;
-             }
-           }
-           if (Pole0>Pole3){                         
-             a=Log10(Pole0/Pole3);                           
-             if (boucle==2)                      
-               for (i=0;i<=3;i++)                                                    
-                 Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole0*(Pow(10.0,(-0.5*Log10(TolPoles)-a/2.0))))); 
-             if (boucle==1){
-               for (i=0;i<=3;i++)                                                    
-                 Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole3*(Pow(10.0,(a/2.0+0.5*Log10(TolPoles)))))); 
-               dercas=1;
-             }
-           }
-         }
-       }
+        Standard_DimensionError::Raise("Hermit Impossible Tolerance");       
+      if ((max==0)||(max==3))
+      {
+        for (i=0;i<=3;i++)
+          Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-TolPoles*Polemax));
+      }
+      else if ((max==1)||(max==2)) {
+        if ((min==0)||(min==3))
+        {
+          for (i=0;i<=3;i++)
+            Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-(1/TolPoles)*Polemin));
+        }
+        else{                                                                  
+          if ((TolPoles*Polemax<Polesinit(0).Y())&&(TolPoles*Polemax<Polesinit(3).Y())){
+            for (i=0;i<=3;i++)                                             
+              Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-TolPoles*Polemax));
+            mark=1;
+          }
+          if ((1/TolPoles*Polemin>Polesinit(0).Y())&&(1/TolPoles*Polemin>Polesinit(3).Y())&&(mark==0)){
+            for (i=0;i<=3;i++)                                             
+              Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-1/TolPoles*Polemin));
+            mark=1;
+          }
+          if (mark==0){
+            Standard_Real Pole0,Pole3;
+            Pole0=Polesinit(0).Y();
+            Pole3=Polesinit(3).Y();
+            if (Pole0<3){                         
+              a=Log10(Pole3/Pole0);
+              if (boucle==2)
+              {
+                for (i=0;i<=3;i++)                                                    
+                  Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole3*(Pow(10.0,(-0.5*Log10(TolPoles)-a/2.0))))); 
+              }
+              if (boucle==1)
+              {
+                for (i=0;i<=3;i++)                                                    
+                  Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole0*(Pow(10.0,(a/2.0+0.5*Log10(TolPoles)))))); 
+                dercas=1;
+              }
+            }
+            if (Pole0>Pole3)
+            {
+              a=Log10(Pole0/Pole3);                           
+              if (boucle==2)
+              {
+                for (i=0;i<=3;i++)                                                    
+                  Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole0*(Pow(10.0,(-0.5*Log10(TolPoles)-a/2.0)))));
+              }
+              if (boucle==1)
+              {
+                for (i=0;i<=3;i++)                                                    
+                  Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole3*(Pow(10.0,(a/2.0+0.5*Log10(TolPoles)))))); 
+                dercas=1;
+              }
+            }
+          }
+        }
+      }
     }
-  }                          //end of the loop
+  } // end of the loop
   
-  if (!SignDenom(Polesinit))                       //invertion of the polynome sign
+  if (!SignDenom(Polesinit)) //invertion of the polynome sign
+  {
     for (index=0;index<=3;index++)
       Polesinit(index).SetCoord(0.0,-Polesinit(index).Y());
-  
-                                //loop of positivity
-  if ((Polesinit(1).Y()<0.0)&&(Polesinit(2).Y()>=0.0)){              
+  }
+
+  // loop of positivity
+  if ((Polesinit(1).Y()<0.0)&&(Polesinit(2).Y()>=0.0))
+  {
     Us1=Polesinit(0).Y()/(Polesinit(0).Y()-Polesinit(1).Y());
     if (boucle==2)
       Us1=Us1*knots(2);
@@ -304,7 +319,8 @@ static void PolyTest(const TColStd_Array1OfReal&         Herm,
       U4=knots(I1);
   }
   
-  if ((Polesinit(1).Y()>=0.0)&&(Polesinit(2).Y()<0.0)){
+  if ((Polesinit(1).Y()>=0.0)&&(Polesinit(2).Y()<0.0))
+  {
     Us2=Polesinit(2).Y()/(Polesinit(2).Y()-Polesinit(3).Y());
     if (boucle==2)
       Us2=knots(knots.Length()-1)+Us2*(1-knots(knots.Length()-1));
@@ -397,6 +413,7 @@ static void PolyTest(const TColStd_Array1OfReal&        Herm,
   }
 
   if (I1==I2)                                            //definition and filling of the 
+  {
     if((I3==I4)||(I3==0)){                               //array of knots
       Knots=new TColStd_HArray1OfReal(1,BS->NbKnots());
       for (i=1;i<=BS->NbKnots();i++)
@@ -408,7 +425,9 @@ static void PolyTest(const TColStd_Array1OfReal&        Herm,
        Knots->SetValue(i,BS->Knot(i));
       Knots->SetValue(BS->NbKnots()+1,Uy);
     }
-  else{
+  }
+  else
+  {
     if((I3==I4)||(I3==0)){
       Knots=new TColStd_HArray1OfReal(1,BS->NbKnots()+1);
       for (i=1;i<=BS->NbKnots();i++)
@@ -433,69 +452,93 @@ static void PolyTest(const TColStd_Array1OfReal&        Herm,
   Polesinit(2).SetCoord(0.0,Herm(3)-Herm(2)/3.0);
   Polesinit(3).SetCoord(0.0,Herm(3));
 
-                              //loop to check the tolerances on poles
-  if (TolPoles!=0.0){
+  // loop to check the tolerances on poles
+  if (TolPoles!=0.0)
+  {
     Polemax(Polesinit,min,max);
     Standard_Real  Polemin=Polesinit(min).Y();
     Standard_Real  Polemax=Polesinit(max).Y();
-    if (((Polemax)>=((1/TolPoles)*Polemin))||((Polemin==0.0)&&(Polemax>=(1/TolPoles)))){
+    if (((Polemax)>=((1/TolPoles)*Polemin))||((Polemin==0.0)&&(Polemax>=(1/TolPoles))))
+    {
       if (Polesinit(0).Y()>=(1/TolPoles)*Polesinit(3).Y()||Polesinit(0).Y()<=TolPoles*Polesinit(3).Y())
-       Standard_DimensionError::Raise("Hermit Impossible Tolerance");       
-      if ((max==0)||(max==3))                                                
-       for (i=0;i<=3;i++)
-         Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-TolPoles*Polemax));
-      if ((max==1)||(max==2))
-       if ((min==0)||(min==3))                                             
-         for (i=0;i<=3;i++)
-           Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-(1/TolPoles)*Polemin));
-       else{                                                                  
-         if ((TolPoles*Polemax<Polesinit(0).Y())&&(TolPoles*Polemax<Polesinit(3).Y())){
-           for (i=0;i<=3;i++)                                             
-             Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-TolPoles*Polemax));
-           mark=1;
-         }
-         if ((1/TolPoles*Polemin>Polesinit(0).Y())&&(1/TolPoles*Polemin>Polesinit(3).Y())&&(mark==0)){
-           for (i=0;i<=3;i++)                                             
-             Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-1/TolPoles*Polemin));
-           mark=1;
-         }
-         if (mark==0){
-           Standard_Real Pole0,Pole3;
-           Pole0=Polesinit(0).Y();
-           Pole3=Polesinit(3).Y();
-           if (Pole0<3){                         
-             a=Log10(Pole3/Pole0);                      
-             if (boucle==2)                      
-               for (i=0;i<=3;i++)                                                    
-                 Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole3*(Pow(10.0,(-0.5*Log10(TolPoles)-a/2.0))))); 
-             if (boucle==1){
-               for (i=0;i<=3;i++)                                                    
-                 Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole0*(Pow(10.0,(a/2.0+0.5*Log10(TolPoles)))))); 
-               dercas=1;
-             }
-           }
-           if (Pole0>Pole3){                         
-             a=Log10(Pole0/Pole3);                           
-             if (boucle==2)                      
-               for (i=0;i<=3;i++)                                                    
-                 Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole0*(Pow(10.0,(-0.5*Log10(TolPoles)-a/2.0))))); 
-             if (boucle==1){
-               for (i=0;i<=3;i++)                                                    
-                 Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole3*(Pow(10.0,(a/2.0+0.5*Log10(TolPoles)))))); 
-               dercas=1;
-             }
-           }
-         }
-       }
+        Standard_DimensionError::Raise("Hermit Impossible Tolerance");       
+      if ((max==0)||(max==3))
+      {
+        for (i=0;i<=3;i++)
+          Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-TolPoles*Polemax));
+      }
+      else if ((max==1)||(max==2))
+      {
+        if ((min==0)||(min==3))
+        {
+          for (i=0;i<=3;i++)
+            Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-(1/TolPoles)*Polemin));
+        }
+        else
+        {
+          if ((TolPoles*Polemax<Polesinit(0).Y())&&(TolPoles*Polemax<Polesinit(3).Y()))
+          {
+            for (i=0;i<=3;i++)                                             
+              Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-TolPoles*Polemax));
+            mark=1;
+          }
+
+          if ((1/TolPoles*Polemin>Polesinit(0).Y())&&(1/TolPoles*Polemin>Polesinit(3).Y())&&(mark==0))
+          {
+            for (i=0;i<=3;i++)                                             
+              Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-1/TolPoles*Polemin));
+            mark=1;
+          }
+          if (mark==0)
+          {
+            Standard_Real Pole0,Pole3;
+            Pole0=Polesinit(0).Y();
+            Pole3=Polesinit(3).Y();
+            if (Pole0<3)
+            {
+              a=Log10(Pole3/Pole0);
+              if (boucle==2)
+              {
+                for (i=0;i<=3;i++)
+                  Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole3*(Pow(10.0,(-0.5*Log10(TolPoles)-a/2.0)))));
+              }
+              if (boucle==1)
+              {
+                for (i=0;i<=3;i++)
+                  Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole0*(Pow(10.0,(a/2.0+0.5*Log10(TolPoles)))))); 
+                dercas=1;
+              }
+            }
+            if (Pole0>Pole3)
+            {
+              a=Log10(Pole0/Pole3);                           
+              if (boucle==2)
+              {
+                for (i=0;i<=3;i++)                                                    
+                  Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole0*(Pow(10.0,(-0.5*Log10(TolPoles)-a/2.0))))); 
+              }
+              else if (boucle==1)
+              {
+                for (i=0;i<=3;i++)                                                    
+                  Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole3*(Pow(10.0,(a/2.0+0.5*Log10(TolPoles)))))); 
+                dercas=1;
+              }
+            }
+          }
+        }
+      }
     }
-  }                          //end of the loop
+  } // end of the loop
   
-  if (!SignDenom(Polesinit))                       //invertion of the polynome sign
+  if (!SignDenom(Polesinit)) // invertion of the polynome sign
+  {
     for (index=0;index<=3;index++)
       Polesinit(index).SetCoord(0.0,-Polesinit(index).Y());
-  
-                                //boucle de positivite
-  if ((Polesinit(1).Y()<0.0)&&(Polesinit(2).Y()>=0.0)){
+  }
+
+  // boucle de positivite
+  if ((Polesinit(1).Y()<0.0)&&(Polesinit(2).Y()>=0.0))
+  {
     Us1=Polesinit(0).Y()/(Polesinit(0).Y()-Polesinit(1).Y());
     if (boucle==2)
       Us1=Us1*knots(2);
@@ -509,7 +552,8 @@ static void PolyTest(const TColStd_Array1OfReal&        Herm,
       U4=knots(I1);
   }
   
-  if ((Polesinit(1).Y()>=0.0)&&(Polesinit(2).Y()<0.0)){
+  if ((Polesinit(1).Y()>=0.0)&&(Polesinit(2).Y()<0.0))
+  {
     Us2=Polesinit(2).Y()/(Polesinit(2).Y()-Polesinit(3).Y());
     if (boucle==2)
       Us2=knots(knots.Length()-1)+Us2*(1-knots(knots.Length()-1));
index ef2e283..c6082df 100755 (executable)
@@ -204,14 +204,14 @@ static Standard_Boolean Connect (const Handle(ShapeAnalysis_Wire)& theSAW,
   else if (( surfcurv == -3 && len3d > 0) || len2d == 0)
     GTranslate2d = Standard_False;
  
-  if (GTranslate3d && GTranslate2d)
+  if (GTranslate3d && GTranslate2d) {
     //Setting preference in the case of inconsitency between 3D and 2D
     if      (surfcurv == 2)         Preferred3d = Standard_False;
     else if (surfcurv == 3)         Preferred2d = Standard_False;
     else if (myfilepreference == 2) Preferred3d = Standard_False;
     else if (myfilepreference == 3) Preferred2d = Standard_False;
     else                            Preferred3d = Standard_False;
-  
+  }
   if (GTranslate3d && GTranslate2d && len3d != len2d) {
     GTranslate3d = Preferred3d;
     GTranslate2d = Preferred2d;
index d26d1ef..b53c666 100755 (executable)
@@ -281,10 +281,11 @@ void  IGESDefs_ToolAttributeTable::OwnCheck
   (const Handle(IGESDefs_AttributeTable)& ent,
    const Interface_ShareTool& , Handle(Interface_Check)& ach) const 
 {
-  if (ent->Definition().IsNull())
+  if (ent->Definition().IsNull()) {
     if (ent->HasStructure()) ach->AddFail
       ("Structure in Directory Entry is not an Attribute Definition Table");
     else ach->AddFail("No Attribute Definition defined");
+  }
   if (ent->FormNumber() == 0 && ent->NbRows() != 1)
     ach->AddFail("Form 0 with several Rows");
   if (ent->NbAttributes() != ent->Definition()->NbAttributes())
index c72a744..2383ad7 100755 (executable)
@@ -168,12 +168,12 @@ IGESToBRep_IGESBoundary::IGESToBRep_IGESBoundary(const IGESToBRep_CurveAndSurfac
   else if (len2d == 0)
     GTranslate2d = Standard_False;
   
-  if (GTranslate3d && GTranslate2d)
+  if (GTranslate3d && GTranslate2d) {
     //Setting preference in the case of inconsitency between 3D and 2D
     if      (myfilepreference == 2) Preferred3d = Standard_False;
     else if (myfilepreference == 3) Preferred2d = Standard_False;
     else                            Preferred3d = Standard_False;
-  
+  }
   if (GTranslate3d && GTranslate2d && len3d != len2d) {
     GTranslate3d = Preferred3d;
     GTranslate2d = Preferred2d;
index ae33cf2..632927d 100755 (executable)
@@ -807,16 +807,16 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L,
              }
 
              if (!duplicate) {
-               Standard_Integer ParamApproxOnLine = Standard_Integer(W1[ip])+1;
-
-               arc->D1(paramarc,p2d,d2d);
-               U1 = p2d.X(); V1 = p2d.Y();
-               if (typL == IntPatch_Walking && SurfaceIsPeriodic)
-                 if (OnFirst)
-                   Recadre(TypeS1,TypeS2,wlin,ParamApproxOnLine,U1,V1,U2,V2);
-                 else
-                   Recadre(TypeS1,TypeS2,wlin,ParamApproxOnLine,U2,V2,U1,V1);
-
+                Standard_Integer ParamApproxOnLine = Standard_Integer(W1[ip])+1;
+
+                arc->D1(paramarc,p2d,d2d);
+                U1 = p2d.X(); V1 = p2d.Y();
+                if (typL == IntPatch_Walking && SurfaceIsPeriodic) {
+                  if (OnFirst)
+                    Recadre(TypeS1,TypeS2,wlin,ParamApproxOnLine,U1,V1,U2,V2);
+                  else
+                    Recadre(TypeS1,TypeS2,wlin,ParamApproxOnLine,U2,V2,U1,V1);
+                }
                locpt.Append(ptsommet);
                locpt2.Append(gp_Pnt2d(U2,V2));
 
index e51bac1..b058c18 100755 (executable)
@@ -2936,16 +2936,17 @@ Standard_Integer IntPolyh_MaillageAffinage::TriangleEdgeContact2
        else SP1.SetEdge1(-1);
       }
       else {
-       PI=PE1+Edge*lambda;
-       if(TriSurfID==1) 
-         if(Tri2.GetEdgeOrientation(EdgeIndex)>0)
-           SP1.SetLambda2(lambda);
-         else SP1.SetLambda2(1.0-lambda);
-       if(TriSurfID==2) 
-         if(Tri1.GetEdgeOrientation(EdgeIndex)>0)
-           SP1.SetLambda1(lambda);
-         else SP1.SetLambda1(1.0-lambda);
-
+        PI=PE1+Edge*lambda;
+        if(TriSurfID==1) {
+          if(Tri2.GetEdgeOrientation(EdgeIndex)>0)
+            SP1.SetLambda2(lambda);
+          else SP1.SetLambda2(1.0-lambda);
+        }
+        if(TriSurfID==2) {
+          if(Tri1.GetEdgeOrientation(EdgeIndex)>0)
+            SP1.SetLambda1(lambda);
+          else SP1.SetLambda1(1.0-lambda);
+        }
       }
         
       Standard_Real Cote23X=Cote23.X();
index 1e81dc2..81a324d 100755 (executable)
@@ -186,11 +186,11 @@ fields
 
     ax3      : Ax3         from gp;
     lin      : Lin         from gp;
+    typ      : SurfaceType from GeomAbs;
     prm1     : Real        from Standard;
     prm2     : Real        from Standard;
     prm3     : Real        from Standard;
     prm4     : Real        from Standard;
     ax3direc : Boolean     from Standard;
-    typ      : SurfaceType from GeomAbs;
 
 end Quadric;
index e44d286..7f951a1 100755 (executable)
@@ -319,7 +319,7 @@ void MeshVS_Mesh::ComputeSelection ( const Handle(SelectMgr_Selection)& theSelec
           TColStd_MapIteratorOfPackedMapOfInteger anIterN( anAllNodesMap );
 
           for( ; anIterN.More(); anIterN.Next() )
-            if( myDataSource->GetGeom( anIterN.Key(), Standard_False, aCoords, NbNodes, aType ) )
+            if( myDataSource->GetGeom( anIterN.Key(), Standard_False, aCoords, NbNodes, aType ) ) {
               if( first )
               {
                 for( Standard_Integer i=1; i<=3; i++ )
@@ -334,6 +334,7 @@ void MeshVS_Mesh::ComputeSelection ( const Handle(SelectMgr_Selection)& theSelec
                   if( aCoords( i )>max[i-1] )
                     max[i-1] = aCoords( i );
                 }
+            }
           Bnd_Box box;
           box.Add( gp_Pnt( min[0], min[1], min[2] ) );
           box.Add( gp_Pnt( max[0], max[1], max[2] ) );
index 412544d..505bfc6 100755 (executable)
@@ -854,7 +854,7 @@ void MeshVS_MeshPrsBuilder::HowManyPrimitives (const Handle(MeshVS_HArray1OfSequ
                                                Standard_Integer& Vertices,
                                                Standard_Integer& Bounds)
 {
-  if( !Topo.IsNull() )
+  if( !Topo.IsNull() ) {
     if( AsPolygons || IsSelect )
     {
       Standard_Integer B = Topo->Upper()-Topo->Lower()+1;
@@ -874,6 +874,7 @@ void MeshVS_MeshPrsBuilder::HowManyPrimitives (const Handle(MeshVS_HArray1OfSequ
       Bounds += E;
       Vertices += 2*E;
     }
+  }
 }
 
 //================================================================
index 6fe6662..d485fa3 100755 (executable)
@@ -209,7 +209,7 @@ void NCollection_BaseSequence::PInsertAfter (const Standard_Integer theIndex,
 {
   if (theIndex < 0 || theIndex > mySize)
     Standard_OutOfRange::Raise();
-  if (Other.mySize != 0)
+  if (Other.mySize != 0) {
     if (theIndex == 0) 
       PPrepend (Other);
     else {
@@ -226,6 +226,7 @@ void NCollection_BaseSequence::PInsertAfter (const Standard_Integer theIndex,
         myCurrentIndex += Other.mySize;
       Other.Nullify();
     }
+  }
 }
 
 //=======================================================================
index 793e1ae..ee81b72 100755 (executable)
@@ -47,7 +47,7 @@ const Handle_NIS_Drawer& NIS_InteractiveObject::SetDrawer
                                          const Standard_Boolean    setUpdated)
 {
   NIS_InteractiveContext * aCtx = theDrawer->GetContext();
-  if (myDrawer.IsNull() == Standard_False)
+  if (myDrawer.IsNull() == Standard_False) {
     if (aCtx == 0L)
     {
       aCtx = myDrawer->GetContext();
@@ -59,6 +59,7 @@ const Handle_NIS_Drawer& NIS_InteractiveObject::SetDrawer
         (myDrawer->GetContext() != 0L && aCtx != myDrawer->GetContext(),
          "NIS_InteractiveObject::SetDrawer: different drawer context");
     }
+  }
 
   Standard_NullValue_Raise_if
     (aCtx == 0L, "NIS_InteractiveObject::SetDrawer: NULL drawer context");
index b984210..09cd4a5 100644 (file)
@@ -93,8 +93,8 @@ OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps)
   myReleaseQueue    (new OpenGl_ResourcesQueue()),
   myGlLibHandle (NULL),
   myGlCore20 (NULL),
-  myMaxTexDim  (1024),
   myAnisoMax   (1),
+  myMaxTexDim  (1024),
   myGlVerMajor (0),
   myGlVerMinor (0),
   myIsFeedback (Standard_False),
index 8c2d2be..22ae43e 100644 (file)
@@ -30,8 +30,8 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_PrinterContext, Standard_Transient)
 OpenGl_PrinterContext::OpenGl_PrinterContext()
 : myProjTransform  (0, 3, 0, 3),
   myLayerViewportX (0),
-  myLayerViewportY (0),
   myScaleX (1.0f),
+  myLayerViewportY (0),
   myScaleY (1.0f)
 {
   // identity projection matrix
index d7ccb54..d181b75 100644 (file)
@@ -101,8 +101,8 @@ OpenGl_View::OpenGl_View (const CALL_DEF_VIEWCONTEXT &AContext)
   myIntShadingMethod(TEL_SM_GOURAUD),
   myAntiAliasing(Standard_False),
   myTransPers(&myDefaultTransPers),
-  myIsTransPers(Standard_False),
   myTrihedron(NULL),
+  myIsTransPers(Standard_False),
   myGraduatedTrihedron(NULL)
 {
   // Initialize matrices
index e9df2b5..02179dc 100755 (executable)
@@ -199,34 +199,38 @@ static gp_Pnt2d Function_Value(const Standard_Real U,
   if(Surf->IsVPeriodic() || Surf->IsVClosed()) {
     vperiod = Surf->LastVParameter() - Surf->FirstVParameter();
   } 
-  if(U0 < Uinf)
+  if(U0 < Uinf) {
     if(!uperiod)
       U0 = Uinf;
     else {
       decalU = int((Uinf - U0)/uperiod)+1;
       U0 += decalU*uperiod;
     }
-  if(U0 > Usup)
+  }
+  if(U0 > Usup) {
     if(!uperiod)
       U0 = Usup;
     else {
       decalU = -(int((U0 - Usup)/uperiod)+1);
       U0 += decalU*uperiod;
     }
-  if(V0 < Vinf)
+  }
+  if(V0 < Vinf) {
     if(!vperiod)
       V0 = Vinf;
     else {
       decalV = int((Vinf - V0)/vperiod)+1;
       V0 += decalV*vperiod;
     }
-  if(V0 > Vsup)
+  }
+  if(V0 > Vsup) {
     if(!vperiod)
       V0 = Vsup;
     else {
       decalV = -int((V0 - Vsup)/vperiod)-1;
       V0 += decalV*vperiod;
     }
+  }
   
   // The surface around U0 is reduced
   Standard_Real uLittle = (Usup - Uinf)/10, vLittle = (Vsup - Vinf)/10;
@@ -759,44 +763,46 @@ Handle(Adaptor2d_HCurve2d)
     case GeomAbs_Cylinder:
       {
 //     Standard_Real Sloc, Tloc;
-       Standard_Real Sloc;
-       Standard_Integer usens = 0;
-       gp_Cylinder Cylinder = Surf->Cylinder();
-       ElSLib::Parameters( Cylinder, Pts(1), S, T);
-       Pts2d(1).SetCoord(S,T);
-       for ( i = 2 ; i <= NbOfPnts ; i++) { 
-         Sloc = S;
-         ElSLib::Parameters( Cylinder, Pts(i), S, T);
-         if(Abs(Sloc - S) > M_PI)
-           if(Sloc > S)
-             usens++;
-           else
-             usens--;
-         Pts2d(i).SetCoord(S+usens*2*M_PI,T);
-       }
-       myProjIsDone = Standard_True;
-       break;
+        Standard_Real Sloc;
+        Standard_Integer usens = 0;
+        gp_Cylinder Cylinder = Surf->Cylinder();
+        ElSLib::Parameters( Cylinder, Pts(1), S, T);
+        Pts2d(1).SetCoord(S,T);
+        for ( i = 2 ; i <= NbOfPnts ; i++) { 
+          Sloc = S;
+          ElSLib::Parameters( Cylinder, Pts(i), S, T);
+          if(Abs(Sloc - S) > M_PI) {
+            if(Sloc > S)
+              usens++;
+            else
+              usens--;
+          }
+          Pts2d(i).SetCoord(S+usens*2*M_PI,T);
+        }
+        myProjIsDone = Standard_True;
+        break;
       }
     case GeomAbs_Cone:
       {
 //     Standard_Real Sloc, Tloc;
-       Standard_Real Sloc;
-       Standard_Integer usens = 0;
-       gp_Cone Cone = Surf->Cone();
-       ElSLib::Parameters( Cone, Pts(1), S, T);
-       Pts2d(1).SetCoord(S,T);
-       for ( i = 2 ; i <= NbOfPnts ; i++) { 
-         Sloc = S;
-         ElSLib::Parameters( Cone, Pts(i), S, T);
-         if(Abs(Sloc - S) > M_PI)
-           if(Sloc > S)
-             usens++;
-           else
-             usens--;
-         Pts2d(i).SetCoord(S+usens*2*M_PI,T);
-       }
-       myProjIsDone = Standard_True;
-       break;
+        Standard_Real Sloc;
+        Standard_Integer usens = 0;
+        gp_Cone Cone = Surf->Cone();
+        ElSLib::Parameters( Cone, Pts(1), S, T);
+        Pts2d(1).SetCoord(S,T);
+        for ( i = 2 ; i <= NbOfPnts ; i++) { 
+          Sloc = S;
+          ElSLib::Parameters( Cone, Pts(i), S, T);
+          if(Abs(Sloc - S) > M_PI) {
+            if(Sloc > S)
+              usens++;
+            else
+              usens--;
+          }
+          Pts2d(i).SetCoord(S+usens*2*M_PI,T);
+        }
+        myProjIsDone = Standard_True;
+        break;
       }
     case GeomAbs_Sphere:
       {
@@ -809,11 +815,12 @@ Handle(Adaptor2d_HCurve2d)
        for ( i = 2 ; i <= NbOfPnts ; i++) { 
          Sloc = S;Tloc = T;
          ElSLib::Parameters( Sphere, Pts(i), S, T);
-         if(1.6*M_PI < Abs(Sloc - S))
+         if(1.6*M_PI < Abs(Sloc - S)) {
            if(Sloc > S)
              usens += 2;
            else
              usens -= 2;
+    }
          if(1.6*M_PI > Abs(Sloc - S) && Abs(Sloc - S) > 0.4*M_PI) {
            vparit = !vparit;
            if(Sloc > S)
@@ -846,16 +853,18 @@ Handle(Adaptor2d_HCurve2d)
        for ( i = 2 ; i <= NbOfPnts ; i++) { 
          Sloc = S; Tloc = T;
          ElSLib::Parameters( Torus, Pts(i), S, T);
-         if(Abs(Sloc - S) > M_PI)
+         if(Abs(Sloc - S) > M_PI) {
            if(Sloc > S)
              usens++;
            else
              usens--;
-         if(Abs(Tloc - T) > M_PI)
+    }
+         if(Abs(Tloc - T) > M_PI) {
            if(Tloc > T)
              vsens++;
            else
              vsens--;
+    }
          Pts2d(i).SetCoord(S+usens*2*M_PI,T+vsens*2*M_PI);
        }
        myProjIsDone = Standard_True;
@@ -1159,7 +1168,7 @@ Handle(Adaptor2d_HCurve2d)
              if (Dist2Min < DistTol3d * DistTol3d) {
              //if (Dist2Min < Tol3d * Tol3d) {
                (ext.Point(GoodValue)).Parameter(u,v);
-               if(uperiod)
+               if(uperiod) {
                  if((U0 - u) > (2*uperiod/3)) {
                    usens++;
                  }
@@ -1167,7 +1176,8 @@ Handle(Adaptor2d_HCurve2d)
                    if((u - U0) > (2*uperiod/3)) {
                      usens--;
                    }
-               if(vperiod)
+    }
+               if(vperiod) {
                  if((V0 - v) > (vperiod/2)) {
                    vsens++;
                  }
@@ -1175,6 +1185,7 @@ Handle(Adaptor2d_HCurve2d)
                    if((v - V0) > (vperiod/2)) {
                      vsens--;
                    }
+      }
                U0 = u; V0 = v;
                U1 = U0 + usens*uperiod;
                V1 = V0 + vsens*vperiod;
index 939ea1b..14ecf9a 100755 (executable)
@@ -309,33 +309,33 @@ void QANewBRepNaming_Gluing::RecomputeUnique(QANewModTopOpe_Glue& theMkGluing) {
       if (aNext == 0) anEdgesIterator.Initialize(theMkGluing.Generated(aFullEdge));
       else anEdgesIterator.Initialize(theMkGluing.Modified(aFullEdge));
       for (;anEdgesIterator.More();anEdgesIterator.Next())
-       if (anEdgesIterator.Value().ShapeType() == TopAbs_EDGE) {
-         TopoDS_Edge aDivEdge = TopoDS::Edge(anEdgesIterator.Value());
-         if (!TopExp::FirstVertex(aDivEdge).IsNull()) { // divided edge must have at least one vertex
-           if (TopExp::FirstVertex(aFullEdge).IsNull()) AddToTheUnique(aDivEdge,aFullEdge);
-           else if (!TopExp::LastVertex(aDivEdge).IsNull())//if full edge have at least one vertex, subedges must have two
-             if (TopExp::LastVertex(aFullEdge).IsNull()) {
-               if (BRep_Tool::Pnt(TopExp::FirstVertex(aFullEdge)).
-                   IsEqual(BRep_Tool::Pnt(TopExp::FirstVertex(aDivEdge)),Precision::Confusion()))
-                 AddToTheUnique(aDivEdge,aFullEdge);
-               else if (BRep_Tool::Pnt(TopExp::FirstVertex(aFullEdge)).
-                        IsEqual(BRep_Tool::Pnt(TopExp::LastVertex(aDivEdge)),Precision::Confusion()))
-                 AddToTheUnique(aDivEdge,aFullEdge);
-             } else {
-               Standard_Integer aCounter = 0;
-               if (BRep_Tool::Pnt(TopExp::FirstVertex(aFullEdge)).
-                   IsEqual(BRep_Tool::Pnt(TopExp::FirstVertex(aDivEdge)),Precision::Confusion()) ||
-                   BRep_Tool::Pnt(TopExp::FirstVertex(aFullEdge)).
-                   IsEqual(BRep_Tool::Pnt(TopExp::LastVertex(aDivEdge)),Precision::Confusion())) aCounter++;
-               if (BRep_Tool::Pnt(TopExp::LastVertex(aFullEdge)).
-                   IsEqual(BRep_Tool::Pnt(TopExp::FirstVertex(aDivEdge)),Precision::Confusion()) ||
-                   BRep_Tool::Pnt(TopExp::LastVertex(aFullEdge)).
-                   IsEqual(BRep_Tool::Pnt(TopExp::LastVertex(aDivEdge)),Precision::Confusion())) aCounter++;
-               if (aCounter!=2) AddToTheUnique(aDivEdge,aFullEdge);
-             }
-         }
-       }
-
+        if (anEdgesIterator.Value().ShapeType() == TopAbs_EDGE) {
+          TopoDS_Edge aDivEdge = TopoDS::Edge(anEdgesIterator.Value());
+          if (!TopExp::FirstVertex(aDivEdge).IsNull()) { // divided edge must have at least one vertex
+            if (TopExp::FirstVertex(aFullEdge).IsNull()) AddToTheUnique(aDivEdge,aFullEdge);
+            else if (!TopExp::LastVertex(aDivEdge).IsNull()) {//if full edge have at least one vertex, subedges must have two
+              if (TopExp::LastVertex(aFullEdge).IsNull()) {
+                if (BRep_Tool::Pnt(TopExp::FirstVertex(aFullEdge)).
+                    IsEqual(BRep_Tool::Pnt(TopExp::FirstVertex(aDivEdge)),Precision::Confusion()))
+                  AddToTheUnique(aDivEdge,aFullEdge);
+                else if (BRep_Tool::Pnt(TopExp::FirstVertex(aFullEdge)).
+                   IsEqual(BRep_Tool::Pnt(TopExp::LastVertex(aDivEdge)),Precision::Confusion()))
+                  AddToTheUnique(aDivEdge,aFullEdge);
+              } else {
+                Standard_Integer aCounter = 0;
+                if (BRep_Tool::Pnt(TopExp::FirstVertex(aFullEdge)).
+                    IsEqual(BRep_Tool::Pnt(TopExp::FirstVertex(aDivEdge)),Precision::Confusion()) ||
+                    BRep_Tool::Pnt(TopExp::FirstVertex(aFullEdge)).
+                    IsEqual(BRep_Tool::Pnt(TopExp::LastVertex(aDivEdge)),Precision::Confusion())) aCounter++;
+                if (BRep_Tool::Pnt(TopExp::LastVertex(aFullEdge)).
+                    IsEqual(BRep_Tool::Pnt(TopExp::FirstVertex(aDivEdge)),Precision::Confusion()) ||
+                    BRep_Tool::Pnt(TopExp::LastVertex(aFullEdge)).
+                    IsEqual(BRep_Tool::Pnt(TopExp::LastVertex(aDivEdge)),Precision::Confusion())) aCounter++;
+                if (aCounter!=2) AddToTheUnique(aDivEdge,aFullEdge);
+              }
+            }
+          }
+        }
     }
   }
   aNext = 2;
index 5d30478..5335c8f 100755 (executable)
@@ -98,8 +98,8 @@ QANewModTopOpe_Glue::QANewModTopOpe_Glue(const TopoDS_Shape& theS1,
                               const Standard_Boolean theAllowCutting,
                               const Standard_Boolean thePerformNow)
 : BRepAlgoAPI_BooleanOperation (theS1,theS2, BOPAlgo_FUSE),
-  myAllowCutting (theAllowCutting),
-  myCompleted (Standard_False)
+  myCompleted (Standard_False),
+  myAllowCutting (theAllowCutting)
 {
   NotDone();
   myGenerated.Clear();
index 4794e69..55ce31c 100755 (executable)
@@ -57,8 +57,8 @@ QANewModTopOpe_Limitation::QANewModTopOpe_Limitation(const TopoDS_Shape& theObje
        myObjectToCut(theObjectToCut),
        myFwdIsDone(Standard_False),
        myRevIsDone(Standard_False),
-       myMode(theMode),
        myCut(NULL),
+       myMode(theMode),
        myCommon(NULL)
 {
 
index 3431205..153a476 100755 (executable)
@@ -222,9 +222,10 @@ static Standard_Integer GetLine(OSD_File& aFile,TCollection_AsciiString& aLine)
   do {
     aFile.ReadLine(Buffer,BufSize,Len);
     aLine += Buffer;
-    if (aFile.IsAtEnd())
+    if (aFile.IsAtEnd()) {
       if (!aLine.Length()) return 0;
       else aLine += "\n";
+    }
   } while (aLine.Value(aLine.Length()) != '\n');
 
   return 1;
index d713de5..728995a 100755 (executable)
@@ -1339,12 +1339,13 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound (const Handle(T
     while ( !bnd.IsNull() ) {
       Handle(Transfer_SimpleBinderOfTransient) bx = 
         Handle(Transfer_SimpleBinderOfTransient)::DownCast(bnd);
-      if ( !bx.IsNull() )
+      if ( !bx.IsNull() ) {
         // Single SDR is created for a non-manifold group (ssv: 12.11.2010)
         if (!isManifold && i > 1)
           break;
         else
           binder->AddResult( TransientResult( bx->Result() ) );
+      }
       bnd = bnd->NextResult();
     }
   }
index a5051be..c690b36 100755 (executable)
@@ -264,10 +264,11 @@ static Standard_Integer stwire (Draw_Interpretor& di, Standard_Integer argc, con
       if (BRep_Tool::Degenerated(E)) di<<" DGNR";
       if (sbwd->IsSeam(i))        di<<" SEAM_WIRE";
       if (Shape.ShapeType() == TopAbs_FACE &&
-         sae.IsSeam(E,TopoDS::Face(Shape)))  di<<" SEAM_FACE";
-      if (Shape.ShapeType() == TopAbs_FACE )
-       if (sae.HasPCurve(E,TopoDS::Face(Shape)))     di<<" PCU";
-       else di<<" NO_PCU";
+          sae.IsSeam(E,TopoDS::Face(Shape)))  di<<" SEAM_FACE";
+      if (Shape.ShapeType() == TopAbs_FACE ) {
+        if (sae.HasPCurve(E,TopoDS::Face(Shape)))     di<<" PCU";
+        else di<<" NO_PCU";
+      }
       if (sae.HasCurve3d(E))    di<<" C3D";
       else di<<" NO_C3D";
       if (sae.IsClosed3d(E))  di<<" CLOSED";
index 9e0334a..99b5154 100755 (executable)
@@ -1150,21 +1150,25 @@ static Standard_Integer splitface
   Standard_Real Umin, Umax, Vmin, Vmax;
   S->Bounds ( Umin, Umax, Vmin, Vmax );
   if ( Uf < Umin && ! S->IsUPeriodic() ) Uf = Umin;
-  else if ( Uf > Umin )
+  else if ( Uf > Umin ) {
     if ( Precision::IsInfinite(Umin) ) Uf -= 100;
     else Uf = Umin;
+  }
   if ( Vf < Vmin && ! S->IsVPeriodic() ) Vf = Vmin;
-  else if ( Vf > Vmin )
+  else if ( Vf > Vmin ) {
     if ( Precision::IsInfinite(Vmin) ) Vf -= 100;
     else Vf = Vmin;
+  }
   if ( Ul > Umax && ! S->IsUPeriodic() ) Ul = Umax;
-  else if ( Ul < Umax )
+  else if ( Ul < Umax ) {
     if ( Precision::IsInfinite(Umax) ) Ul += 100;
     else Ul = Umax;
+  }
   if ( Vl > Vmax && ! S->IsVPeriodic() ) Vl = Vmax;
-  else if ( Vl < Vmax )
+  else if ( Vl < Vmax ) {
     if ( Precision::IsInfinite(Vmax) ) Vl += 100;
     else Vl = Vmax;
+  }
   
   TColStd_SequenceOfReal uval;
   TColStd_SequenceOfReal vval;
index e4217ed..7714b38 100755 (executable)
@@ -87,11 +87,12 @@ void SelectMgr_EntityOwner::HilightWithColor(const Handle(PrsMgr_PresentationMan
                                             const Quantity_NameOfColor aColor,
                                             const Standard_Integer aMode)
 {
-  if( HasSelectable() )
+  if( HasSelectable() ) {
     if( IsAutoHilight() )
       PM->Color(mySelectable,aColor,aMode);
     else
       mySelectable->HilightOwnerWithColor( PM, aColor, this );
+  }
 }
 
 void SelectMgr_EntityOwner::Unhilight(const Handle(PrsMgr_PresentationManager)& PM,
index 87d1b4b..540d8b7 100755 (executable)
@@ -182,7 +182,7 @@ void SelectMgr_SelectableObject::ResetLocation()
     for(Sel->Init();Sel->More();Sel->Next()){
       SE =  *((Handle(Select3D_SensitiveEntity)*) &(Sel->Sensitive()));
       if(!SE.IsNull()){
-        if(SE->HasLocation())
+        if(SE->HasLocation()) {
           if( SE->Location()==myLocation){
             SE->ResetLocation();
             const Handle(SelectBasics_EntityOwner)& EO = SE->OwnerId();
@@ -192,7 +192,7 @@ void SelectMgr_SelectableObject::ResetLocation()
             SE->SetLocation(iniloc*myLocation.Inverted());
             const Handle(SelectBasics_EntityOwner)& EO = SE->OwnerId();
             (*((Handle(SelectMgr_EntityOwner)*)&EO))->SetLocation(SE->Location());}
-        
+        }
       }
     }
     Sel->UpdateStatus(SelectMgr_TOU_None);
index 70e770f..8c3ea65 100755 (executable)
@@ -100,7 +100,6 @@ class ShapeAnalysis_BoxBndTreeSelector
   Bnd_Box                              myLBox;
   Handle (TopTools_HArray1OfShape)     mySeq;
   Standard_Boolean                     myShared;
-  Standard_Integer                     myStatus;
   Standard_Integer                     myNb;
   TopoDS_Vertex                        myFVertex;
   TopoDS_Vertex                        myLVertex;
@@ -110,6 +109,8 @@ class ShapeAnalysis_BoxBndTreeSelector
   Standard_Real                        myTol;
   Standard_Real                        myMin3d;
   TColStd_Array1OfInteger              myArrIndices;
+  Standard_Integer                     myStatus;
+
 };
 
 #endif
index 779d9bb..e7fbcf8 100755 (executable)
@@ -374,12 +374,13 @@ static Standard_Boolean MinMaxSmall
     else return Standard_False;
   }
   //   Now, check these two edge to define a strip !
-  if (!E1.IsNull()&&!E2.IsNull()) 
+  if (!E1.IsNull()&&!E2.IsNull()) {
     if(!CheckStripEdges (E1,E2,tol,dmax)) return Standard_False; 
-      else {   
-       myStatusStrip = ShapeExtend::EncodeStatus (ShapeExtend_DONE3);
-       return Standard_True ;
-      }
+    else {   
+      myStatusStrip = ShapeExtend::EncodeStatus (ShapeExtend_DONE3);
+      return Standard_True ;
+    }
+  }
   return Standard_False;
 }
 
index aa30895..9988e67 100755 (executable)
@@ -147,12 +147,13 @@ Handle(TColStd_HSequenceOfReal) ShapeAnalysis_TransferParametersProj::Perform
   }
   
   //pdn correcting on periodic
-  if(myCurve->IsClosed())
+  if(myCurve->IsClosed()) {
     for(j = len; j >=1; j--) 
-      if(resKnots->Value(j) < maxPar)
-       resKnots->SetValue(j,(To2d ? myAC3d.LastParameter() : myCurve->LastParameter())-(len-j)*preci);
+      if(resKnots->Value(j) < maxPar) 
+        resKnots->SetValue(j,(To2d ? myAC3d.LastParameter() : myCurve->LastParameter())-(len-j)*preci);
       else
-       break;
+        break;
+  }
   //pdn correction on range
   for ( j=1; j <= len; j++ ) {
     if ( resKnots->Value (j) < first ) resKnots->SetValue ( j, first );
index 5aef17e..93d837e 100755 (executable)
@@ -60,7 +60,7 @@ Standard_Boolean ShapeCustom_ConvertToBSpline::IsToConvert(const Handle(Geom_Sur
       Handle(Geom_RectangularTrimmedSurface)::DownCast ( S );
     SS = RTS->BasisSurface();
   }
-  if(SS->IsKind(STANDARD_TYPE(Geom_OffsetSurface)))
+  if(SS->IsKind(STANDARD_TYPE(Geom_OffsetSurface))) {
     if(myOffsetMode)
       return Standard_True;
     else {
@@ -69,6 +69,7 @@ Standard_Boolean ShapeCustom_ConvertToBSpline::IsToConvert(const Handle(Geom_Sur
       Handle(Geom_Surface) tmp;
       return IsToConvert(basis,tmp);
     }
+  }
   if ( SS->IsKind(STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion)) )
     return myExtrMode;
   if ( SS->IsKind(STANDARD_TYPE(Geom_SurfaceOfRevolution)) )
index 435cf35..9386e96 100755 (executable)
@@ -666,9 +666,10 @@ Standard_Integer ShapeFix_ComposeShell::ComputeCode (const Handle(ShapeExtend_Wi
       }
     }
     if ( j < np ) { i = 0; break; } // not tangency
-    if ( i == endInd ) 
+    if ( i == endInd ) {
       if ( special <=0 ) break;
       else special = -1;
+    }
   }
   if ( myClosedMode ) {
     if ( code != IOR_UNDEF && ! begin ) {
index 9043a1d..6349c01 100755 (executable)
@@ -1399,16 +1399,18 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
   if ( ::Precision::IsInfinite ( SUF ) || ::Precision::IsInfinite ( SUL ) ) {
     if ( ::Precision::IsInfinite ( SUF ) ) SUF = fU1;
     if ( ::Precision::IsInfinite ( SUL ) ) SUL = fU2;
-    if(Abs(SUL-SUF) < ::Precision::PConfusion())
+    if(Abs(SUL-SUF) < ::Precision::PConfusion()) {
       if ( ::Precision::IsInfinite ( SUF ) ) SUF-=1000.;
       else SUL+=1000.;
+    }
   }
   if ( ::Precision::IsInfinite ( SVF ) || ::Precision::IsInfinite ( SVL ) ) {
     if ( ::Precision::IsInfinite ( SVF ) ) SVF = fV1;
     if ( ::Precision::IsInfinite ( SVL ) ) SVL = fV2;
-    if(Abs(SVL-SVF) < ::Precision::PConfusion())
+    if(Abs(SVL-SVF) < ::Precision::PConfusion()) {
       if ( ::Precision::IsInfinite ( SVF ) ) SVF-=1000.;
       else SVL+=1000.;
+    }
   }
     
   URange = Abs ( SUL - SUF );
@@ -1629,9 +1631,10 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
        vf = pos1.Y();
       }
     }
-    if ( skipU && skipV ) 
+    if ( skipU && skipV ) {
       if ( i1 <= nb1 ) continue;
       else break;
+    }
     // or yet better - if it is end of some edges on both wires
     for ( Standard_Integer i2 = 1; i1 <= nb1 && i2 <= nb2; i2++ ) {
       TopoDS_Edge edge2 = wd2->Edge ( i2 );
index 7903053..c108909 100755 (executable)
@@ -1302,9 +1302,10 @@ Standard_Boolean ShapeFix_Wire::FixShifted()
   SVMid = 0.5*(SVF+SVL);
   if (uclosed) URange = Abs ( SUL - SUF );
   else         URange = RealLast();
-  if (!IsVCrvClosed)
+  if (!IsVCrvClosed) {
     if (vclosed) VRange = Abs ( SVL - SVF );
     else         VRange = RealLast();
+  }
   Standard_Real UTol = 0.2 * URange, VTol = 0.2 * VRange;
 
   Handle(ShapeExtend_WireData) sbwdOring = WireData();
index a63f063..ff2f17f 100755 (executable)
@@ -414,9 +414,11 @@ void ShapeProcess_ShapeContext::PrintStatistics () const
       if (valueshape.IsNull()) SN++;
       else SS++;
     else if (keyshape.ShapeType() == TopAbs_FACE)
+    {
       if (valueshape.IsNull()) FN++;
       else if (valueshape.ShapeType() == TopAbs_SHELL) FS++;
       else FF++;
+    }
   }
   
   // mapping
index c5ddb21..4d7c46b 100755 (executable)
@@ -110,13 +110,15 @@ void ShapeProcessAPI_ApplySequence::PrintPreparationResult () const
   Standard_Integer SS = 0, SN = 0, FF = 0, FS = 0, FN = 0;
   for (TopTools_DataMapIteratorOfDataMapOfShapeShape It (myContext->Map()); It.More(); It.Next()) {
     TopoDS_Shape keyshape = It.Key(), valueshape = It.Value();
-    if (keyshape.ShapeType() == TopAbs_SHELL)
+    if (keyshape.ShapeType() == TopAbs_SHELL) {
       if (valueshape.IsNull()) SN++;
       else SS++;
-    else if (keyshape.ShapeType() == TopAbs_FACE)
+    }
+    else if (keyshape.ShapeType() == TopAbs_FACE) {
       if (valueshape.IsNull()) FN++;
       else if (valueshape.ShapeType() == TopAbs_SHELL) FS++;
       else FF++;
+    }
   }
   
   Handle(Message_Messenger) aMessenger = myContext->Messenger();
index 460781a..7547169 100755 (executable)
@@ -1017,16 +1017,18 @@ static void SelectSameShape (TNaming_Node*&          myNode,
     else Valid = pdn->IsValidInTrans(Trans);
 
     if (Valid)
+    {
       if (Old) {
-       if( pdn->myOld == RS && pdn->myNew != 0L && pdn->myNew != RS) {
-         break;
-       }  
+        if( pdn->myOld == RS && pdn->myNew != 0L && pdn->myNew != RS) {
+          break;
+        }  
       }
       else {
-       if( pdn->myNew == RS && pdn->myOld != 0L && pdn->myOld != RS) {
-         break;
-       }
+        if( pdn->myNew == RS && pdn->myOld != 0L && pdn->myOld != RS) {
+          break;
+        }
       }
+    }
     pdn = pdn->NextSameShape(RS);
   }
   myNode = pdn;
index 4f99de7..8a37336 100755 (executable)
@@ -37,9 +37,8 @@
 TopClass_Classifier2d::TopClass_Classifier2d() :
        myIsSet(Standard_False),
        myFirstCompare(Standard_True),
-       myIsHeadOrEnd(Standard_False), // skv OCC12627
-       myState(TopAbs_UNKNOWN)        // skv OCC12627
-
+       myState(TopAbs_UNKNOWN),      // skv OCC12627
+       myIsHeadOrEnd(Standard_False) // skv OCC12627
 {
 }
 
index 3951694..b9603f7 100755 (executable)
@@ -451,9 +451,10 @@ TopAbs_State TopTrans_SurfaceTransition::StateBefore() const
     // we take the state before of after orientations
     before = ::FUN_getstate(myAng,myOri,AFTER,BEFORE);
     // eap Mar 25 2002 
-    if (myTouchFlag)
+    if (myTouchFlag) {
       if (before == TopAbs_OUT) before = TopAbs_IN;
       else if (before == TopAbs_IN) before = TopAbs_OUT;
+    }
   }
   return before;
 }
@@ -467,9 +468,10 @@ TopAbs_State TopTrans_SurfaceTransition::StateAfter() const
     // looking back in before for defined states
     after = ::FUN_getstate(myAng,myOri,BEFORE,AFTER);
     // eap Mar 25 2002 
-    if (myTouchFlag)
+    if (myTouchFlag) {
       if (after == TopAbs_OUT) after = TopAbs_IN;
       else if (after == TopAbs_IN) after = TopAbs_OUT;
+    }
   }
   return after;
 }
index aa9ceca..9c8b61b 100755 (executable)
@@ -1642,6 +1642,8 @@ fields
         --MyColorScale            :       ColorScale from V3d;
         MyLayerMgr              :       LayerMgr from V3d;
 
+        MyProjModel         :   TypeOfProjectionModel from V3d is protected;
+            
         -- the transformation between XoY and the grid plane
         MyTrsf                  :       Array2OfReal from TColStd;
 
@@ -1649,10 +1651,8 @@ fields
         MyGridEchoStructure             :       Structure from Graphic3d;
         MyGridEchoGroup                 :       Group from Graphic3d;
 
-    MyProjModel         :   TypeOfProjectionModel from V3d is protected;
-
-    MyTransparencyFlag      : Boolean from Standard;
-    myImmediateUpdate: Boolean from Standard is protected;
+        MyTransparencyFlag      : Boolean from Standard;
+        myImmediateUpdate: Boolean from Standard is protected;
 friends
 
         SetViewOn from class Viewer from V3d ( me : mutable ),
index ae1675a..a553702 100755 (executable)
@@ -439,13 +439,14 @@ Handle(AIS_Shape) GetAISShapeFromName(const char* name)
     const Handle(AIS_InteractiveObject) IO =
       Handle(AIS_InteractiveObject)::DownCast(GetMapOfAIS().Find2(name));
     if (!IO.IsNull()) {
-      if(IO->Type()==AIS_KOI_Shape)
+      if(IO->Type()==AIS_KOI_Shape) {
         if(IO->Signature()==0){
           retsh = *((Handle(AIS_Shape)*)&IO);
         }
         else
           cout << "an Object which is not an AIS_Shape "
             "already has this name!!!"<<endl;
+      }
     }
     return retsh;
   }
@@ -1009,12 +1010,12 @@ static int VSubInt(Draw_Interpretor& di, Standard_Integer argc, const char** arg
     TCollection_AsciiString name = argv[2];
     if(GetMapOfAIS().IsBound2(name)){
       IO = Handle(AIS_InteractiveObject)::DownCast(GetMapOfAIS().Find2(name));
-      if (!IO.IsNull())
+      if (!IO.IsNull()) {
         if(On==1)
           Ctx->SubIntensityOn(IO);
         else
           Ctx->SubIntensityOff(IO);
-
+      }
     }
     else return 1;
   }
@@ -1121,11 +1122,12 @@ static int VColor2 (Draw_Interpretor& di, Standard_Integer argc, const char** ar
       while ( it.More() ) {
         const Handle(AIS_InteractiveObject) ashape =
           Handle(AIS_InteractiveObject)::DownCast(it.Key1());
-        if (!ashape.IsNull())
+        if (!ashape.IsNull()) {
           if(HaveToSet)
             TheAISContext()->SetColor(ashape,ViewerTest::GetColorFromName(argv[1]),Standard_False);
           else
             TheAISContext()->UnsetColor(ashape,Standard_False);
+        }
         it.Next();
       }
       TheAISContext()->UpdateCurrentViewer();
@@ -1218,11 +1220,12 @@ static int VTransparency  (Draw_Interpretor& di, Standard_Integer argc,
       while ( it.More() ) {
         Handle(AIS_InteractiveObject) ashape =
           Handle(AIS_InteractiveObject)::DownCast(it.Key1());
-        if (!ashape.IsNull())
+        if (!ashape.IsNull()) {
           if(HaveToSet)
             TheAISContext()->SetTransparency(ashape,Draw::Atof(argv[1]),Standard_False);
           else
             TheAISContext()->UnsetTransparency(ashape,Standard_False);
+        }
         it.Next();
       }
       TheAISContext()->UpdateCurrentViewer();
@@ -1274,11 +1277,12 @@ static int VMaterial (Draw_Interpretor& di, Standard_Integer argc, const char**
     if ( ThereIsName && IsBound ) {
       Handle(AIS_InteractiveObject) ashape =
         Handle(AIS_InteractiveObject)::DownCast (GetMapOfAIS().Find2(name));
-      if (!ashape.IsNull())
+      if (!ashape.IsNull()) {
         if (HaveToSet)
           TheAISContext()->SetMaterial(ashape,GetMaterialFromName(argv[2]));
         else
           TheAISContext()->UnsetMaterial(ashape);
+      }
     }
     //=======================================================================
     // Il n'y a pas de nom de shape
@@ -1308,11 +1312,12 @@ static int VMaterial (Draw_Interpretor& di, Standard_Integer argc, const char**
       while ( it.More() ) {
         Handle(AIS_InteractiveObject) ashape =
           Handle(AIS_InteractiveObject)::DownCast (it.Key1());
-        if (!ashape.IsNull())
+        if (!ashape.IsNull()) {
           if (HaveToSet)
             TheAISContext()->SetMaterial(ashape,GetMaterialFromName(argv[1]),Standard_False);
           else
             TheAISContext()->UnsetMaterial(ashape,Standard_False);
+        }
         it.Next();
       }
       TheAISContext()->UpdateCurrentViewer();
@@ -1399,15 +1404,16 @@ static int VWidth (Draw_Interpretor& di, Standard_Integer argc, const char** arg
     else if (!ThereIsCurrent && !ThereIsArgument){
      ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName
        it(GetMapOfAIS());
-     while ( it.More() ) {
-       Handle(AIS_InteractiveObject) ashape =
-         Handle(AIS_InteractiveObject)::DownCast (it.Key1());
-       if (!ashape.IsNull())
-         if (HaveToSet)
-           TheAISContext()->SetWidth(ashape,Draw::Atof(argv[1]),Standard_False);
-         else
-           TheAISContext()->UnsetWidth(ashape,Standard_False);
-       it.Next();
+      while ( it.More() ) {
+        Handle(AIS_InteractiveObject) ashape =
+          Handle(AIS_InteractiveObject)::DownCast (it.Key1());
+        if (!ashape.IsNull()) {
+          if (HaveToSet)
+            TheAISContext()->SetWidth(ashape,Draw::Atof(argv[1]),Standard_False);
+          else
+            TheAISContext()->UnsetWidth(ashape,Standard_False);
+        }
+        it.Next();
      }
      TheAISContext()->UpdateCurrentViewer();
    }
index fd6c570..8e6ad7d 100755 (executable)
@@ -32,8 +32,8 @@
 ViewerTest_EventManager::ViewerTest_EventManager
         (const Handle(V3d_View)& aView,
          const Handle(AIS_InteractiveContext)& Ctx)
-  : myView (aView),
-    myCtx  (Ctx),
+  : myCtx  (Ctx),
+    myView (aView),
     myX    (-1),
     myY    (-1)
 {}
index 60b58c7..78cabc8 100755 (executable)
@@ -3319,14 +3319,13 @@ private:
 
   Standard_Real            myX1;
   Standard_Real            myY1;
-  Standard_Real            myHeight;
   TCollection_AsciiString  myText;
-  TCollection_AsciiString  myFontName;
+  Standard_Real            myHeight;
+  Handle(Visual3d_Layer)   myLayer;
   Quantity_Color           myColor;
   Quantity_Color           mySubtitleColor;
   Aspect_TypeOfDisplayText myType;
-  Handle(Visual3d_Layer)   myLayer;
-
+  TCollection_AsciiString  myFontName;
 };
 
 IMPLEMENT_STANDARD_HANDLE(V3d_TextItem, Visual3d_LayerItem)
@@ -3391,10 +3390,10 @@ public:
 private:
 
   Standard_Real       myX1, myY1, myX2, myY2;
+  V3d_LayerMgrPointer myLayerMgr;
+  Aspect_TypeOfLine   myType;
   Standard_Real       myWidth;
   Standard_Real       myTransparency;
-  Aspect_TypeOfLine   myType;
-  V3d_LayerMgrPointer myLayerMgr;
 };
 
 IMPLEMENT_STANDARD_HANDLE(V3d_LineItem, Visual3d_LayerItem)
index 1e07b20..47a3764 100755 (executable)
@@ -51,7 +51,7 @@ Voxel_FastConverter::Voxel_FastConverter(const TopoDS_Shape&    shape,
 :myShape(shape),myVoxels(&voxels),
  myDeflection(deflection),
  myNbX(nbx),myNbY(nby),myNbZ(nbz),
- myNbThreads(nbthreads),myIsBool(2),
+ myIsBool(2),myNbThreads(nbthreads),
  myNbTriangles(0),
  myUseExistingTriangulation(useExistingTriangulation)
 {
@@ -69,7 +69,7 @@ Voxel_FastConverter::Voxel_FastConverter(const TopoDS_Shape&    shape,
 :myShape(shape),myVoxels(&voxels),
  myDeflection(deflection),
  myNbX(nbx),myNbY(nby),myNbZ(nbz),
- myNbThreads(nbthreads),myIsBool(1),
+ myIsBool(1),myNbThreads(nbthreads),
  myNbTriangles(0),
  myUseExistingTriangulation(useExistingTriangulation)
 {
@@ -87,7 +87,7 @@ Voxel_FastConverter::Voxel_FastConverter(const TopoDS_Shape&    shape,
 :myShape(shape),myVoxels(&voxels),
  myDeflection(deflection),
  myNbX(nbx),myNbY(nby),myNbZ(nbz),
- myNbThreads(nbthreads),myIsBool(0),
+ myIsBool(0),myNbThreads(nbthreads),
  myNbTriangles(0),
  myUseExistingTriangulation(useExistingTriangulation)
 {
index fb83e14..0d638b6 100755 (executable)
@@ -563,7 +563,7 @@ VrmlData_ErrorStatus VrmlData_TextureCoordinate::Read
     // Match the name with the current word in the stream
     if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "point"))
       // Read the body of the data node (comma-separated list of duplets)
-      if (OK(aStatus, VrmlData_Scene::ReadLine(theBuffer)))
+      if (OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) {
         if (theBuffer.LinePtr[0] != '[')  // opening bracket
           aStatus = VrmlData_VrmlFormatError;
         else {
@@ -591,6 +591,7 @@ VrmlData_ErrorStatus VrmlData_TextureCoordinate::Read
             }
           }
         }
+      }
     if (OK(aStatus) && OK(aStatus, readBrace (theBuffer))) {
       myLength = vecValues.Length();
       if (myLength > 0) {
@@ -652,7 +653,7 @@ VrmlData_ErrorStatus VrmlData_ArrayVec3d::ReadArray
         theBuffer.LinePtr++;
     }
     // Read the body of the data node (list of triplets)
-    if (OK(aStatus) && OK(aStatus, VrmlData_Scene::ReadLine(theBuffer)))
+    if (OK(aStatus) && OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) {
       if (theBuffer.LinePtr[0] != '[')  // opening bracket
         aStatus = VrmlData_VrmlFormatError;
       else {
@@ -679,6 +680,7 @@ VrmlData_ErrorStatus VrmlData_ArrayVec3d::ReadArray
           }
         }
       }
+    }
     if (OK(aStatus) && OK(aStatus, readBrace (theBuffer))) {
       myLength = vecValues.Length();
       if (myLength > 0) {
index e172b53..b4d9dfa 100755 (executable)
@@ -66,11 +66,12 @@ VrmlData_ErrorStatus VrmlData_Faceted::readData (VrmlData_InBuffer& theBuffer)
   } else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "creaseAngle")) {
     Standard_Real anAngle;
     if (OK(aStatus, Scene().ReadReal (theBuffer, anAngle,
-                                      Standard_False, Standard_False)))
+                                      Standard_False, Standard_False))) {
       if (anAngle < -Precision::Confusion()*0.001)
         aStatus = VrmlData_IrrelevantNumber;
       else
         myCreaseAngle = anAngle;
+    }
   }
   return aStatus;
 }
index e4997ea..b87f942 100755 (executable)
@@ -181,11 +181,12 @@ VrmlData_ErrorStatus VrmlData_Node::WriteClosing () const
 VrmlData_ErrorStatus VrmlData_Node::readBrace (VrmlData_InBuffer& theBuffer)
 {
   VrmlData_ErrorStatus aStatus;
-  if (OK(aStatus, VrmlData_Scene::ReadLine(theBuffer)))
+  if (OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) {
     if (theBuffer.LinePtr[0] == '}')
       theBuffer.LinePtr++;
     else
       aStatus = VrmlData_VrmlFormatError;
+  }
   return aStatus;
 }
 
index 6105142..851f30e 100755 (executable)
@@ -208,13 +208,17 @@ VrmlData_ErrorStatus VrmlData_Scene::readLine (VrmlData_InBuffer& theBuffer)
     theBuffer.Input.getline (theBuffer.Line, sizeof(theBuffer.Line));
     theBuffer.LineCount++;
     const int stat = theBuffer.Input.rdstate();
-    if (stat & ios::badbit)
+    if (stat & ios::badbit) {
       aStatus = VrmlData_UnrecoverableError;
-    else if (stat & ios::failbit)
-      if (stat & ios::eofbit)
+    }
+    else if (stat & ios::failbit) {
+      if (stat & ios::eofbit) {
         aStatus = VrmlData_EndOfFile;
-      else
+      }
+      else {
         aStatus = VrmlData_GeneralError;
+      }
+    }
     theBuffer.LinePtr = &theBuffer.Line[0];
     theBuffer.IsProcessed = Standard_False;
   }
@@ -449,7 +453,7 @@ VrmlData_ErrorStatus VrmlData_Scene::createNode
   TCollection_AsciiString aName;
 
   // Read the DEF token to assign the node name
-  if (VrmlData_Node::OK(aStatus, ReadLine(theBuffer)))
+  if (VrmlData_Node::OK(aStatus, ReadLine(theBuffer))) {
     if (VRMLDATA_LCOMPARE(theBuffer.LinePtr, "DEF")) {
       if (VrmlData_Node::OK(aStatus, ReadWord (theBuffer, aName)))
         aStatus = ReadLine(theBuffer);
@@ -457,6 +461,7 @@ VrmlData_ErrorStatus VrmlData_Scene::createNode
       theNode.Nullify();
       return aStatus;
     }
+  }
 
   const char * strName = aName.ToCString();
   if (aStatus == VrmlData_StatusOK) {
@@ -517,7 +522,7 @@ VrmlData_ErrorStatus VrmlData_Scene::createNode
       aStatus = ReadWord (theBuffer, aTitle);
       if (isProto) {
         aStatus = ReadLine(theBuffer);
-        if (aStatus == VrmlData_StatusOK)
+        if (aStatus == VrmlData_StatusOK) {
           if (theBuffer.LinePtr[0] != '[')
             aStatus = VrmlData_VrmlFormatError;
           else {
@@ -541,6 +546,7 @@ VrmlData_ErrorStatus VrmlData_Scene::createNode
               }
             }
           }
+        }
       }
       if (aStatus == VrmlData_StatusOK)
         aNode = new VrmlData_UnknownNode(* this,
@@ -550,19 +556,21 @@ VrmlData_ErrorStatus VrmlData_Scene::createNode
   }
   aStatus = ReadLine(theBuffer);
   if (aNode.IsNull() == Standard_False) {
-    if (aNode->Name()[0] != '\0')
+    if (aNode->Name()[0] != '\0') 
       myNamedNodes.Add (aNode);
     if (theType.IsNull() == Standard_False)
       if (aNode->IsKind(theType) == Standard_False)
         aStatus = VrmlData_VrmlFormatError;
   }
-  if (aStatus == VrmlData_StatusOK)
+  if (aStatus == VrmlData_StatusOK) {
     if (theBuffer.LinePtr[0] == '{') {
       theBuffer.LinePtr++;
       theNode = aNode;
       myAllNodes.Append(aNode);
-    } else
+    } else {
       aStatus = VrmlData_VrmlFormatError;
+    }
+  }
   return aStatus;
 }
 
@@ -718,13 +726,16 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadXYZ
       theBuffer.LinePtr = endptr;
     }
   }
-  if (aStatus == VrmlData_StatusOK)
-    if (isScale)
+  if (aStatus == VrmlData_StatusOK) {
+    if (isScale) {
       theXYZ.SetCoord (aVal[0] * myLinearScale,
                        aVal[1] * myLinearScale,
                        aVal[2] * myLinearScale);
-    else
+    }
+    else {
       theXYZ.SetCoord (aVal[0], aVal[1], aVal[2]);
+    }
+  }
   return aStatus;
 }
 
@@ -757,11 +768,12 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadXY
       theBuffer.LinePtr = endptr;
     }
   }
-  if (aStatus == VrmlData_StatusOK)
+  if (aStatus == VrmlData_StatusOK) {
     if (isScale)
       theXY.SetCoord (aVal[0] * myLinearScale, aVal[1] * myLinearScale);
     else
       theXY.SetCoord (aVal[0], aVal[1]);
+  }
   return aStatus;
 }
 
@@ -778,7 +790,7 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadArrIndex
 {
   VrmlData_ErrorStatus aStatus;
   theNBlocks = 0;
-  if (VrmlData_Node::OK(aStatus, ReadLine(theBuffer)))
+  if (VrmlData_Node::OK(aStatus, ReadLine(theBuffer))) {
     if (theBuffer.LinePtr[0] != '[')  // opening bracket
       aStatus = VrmlData_VrmlFormatError;
     else {
@@ -845,6 +857,7 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadArrIndex
         }
       }
     }
+  }
   return aStatus;
 }
 
@@ -915,7 +928,7 @@ VrmlData_ErrorStatus VrmlData_Scene::WriteXYZ
                                  const char             * thePostfix) const
 {
   char buf[240];
-  if (IsDummyWrite() == Standard_False)
+  if (IsDummyWrite() == Standard_False) {
     if (isApplyScale && myLinearScale > Precision::Confusion())
       Sprintf (buf, "%.12g %.12g %.12g%s", theXYZ.X() / myLinearScale,
                theXYZ.Y() / myLinearScale, theXYZ.Z() / myLinearScale,
@@ -923,6 +936,7 @@ VrmlData_ErrorStatus VrmlData_Scene::WriteXYZ
     else
       Sprintf (buf, "%.12g %.12g %.12g%s", theXYZ.X(), theXYZ.Y(), theXYZ.Z(),
                thePostfix ? thePostfix : "");
+  }
   return WriteLine (buf);
 }
 
index 84c2a09..5a217c6 100755 (executable)
@@ -461,14 +461,16 @@ Standard_Boolean XCAFDoc_ColorTool::SetInstanceColor (const TopoDS_Shape& theSha
     return Standard_False;
   Handle(XCAFDoc_GraphNode) aSHUO;
   // set the SHUO structure for this component if it is not exist
-  if ( !ShapeTool()->FindSHUO( aLabels, aSHUO ) )
+  if ( !ShapeTool()->FindSHUO( aLabels, aSHUO ) ) {
     if (aLabels.Length() == 1) {
       // set color directly for component as NAUO
       SetColor(aLabels.Value(1), color, type);
       return Standard_True;
     }
-    else if ( !IsCreateSHUO ||  !ShapeTool()->SetSHUO( aLabels, aSHUO ) )
+    else if ( !IsCreateSHUO ||  !ShapeTool()->SetSHUO( aLabels, aSHUO ) ) {
       return Standard_False;
+    }
+  }
   TDF_Label aSHUOLabel = aSHUO->Label();
   SetColor( aSHUOLabel, color, type );
   return Standard_True;
index 1fc7e3e..9840404 100755 (executable)
@@ -614,10 +614,16 @@ static Standard_Integer hidesel
       Handle( MeshVS_MeshEntityOwner ) anOwner =
         Handle( MeshVS_MeshEntityOwner )::DownCast( aContext->SelectedOwner() );
       if( !anOwner.IsNull() )
+      {
         if( anOwner->Type()==MeshVS_ET_Node )
+        {
           aHiddenNodes->ChangeMap().Add( anOwner->ID() );
+        }
         else
+        {
           aHiddenElements->ChangeMap().Add( anOwner->ID() );
+        }
+      }
     }
     aContext->ClearSelected();
     aMesh->SetHiddenNodes( aHiddenNodes );
@@ -659,10 +665,16 @@ static Standard_Integer showonly
       Handle( MeshVS_MeshEntityOwner ) anOwner =
         Handle( MeshVS_MeshEntityOwner )::DownCast( aContext->SelectedOwner() );
       if( !anOwner.IsNull() )
+      {
         if( anOwner->Type()==MeshVS_ET_Node )
+        {
           aHiddenNodes->ChangeMap().Remove( anOwner->ID() );
+        }
         else
+        {
           aHiddenElements->ChangeMap().Remove( anOwner->ID() );
+        }
+      }
     }
     aMesh->SetHiddenNodes( aHiddenNodes );
     aMesh->SetHiddenElems( aHiddenElements );