]> OCCT Git - occt-copy.git/commitdiff
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 b9341e143f3ff17870b9f5aa54d15d89cdcb00d5..0130bbad35d24e2810df8d3364e44a890c618ff6 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 4997c384e41f611b9005a739104ed0466d052e38..f3c54950da1c06f05a478c1791bb6258f6e805bb 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 69ccd6b8ce72feb521486f41b093b090723d7ac1..91c72ae1f2e92b8c2a28521d5531bd1cccf25118 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 f852a0c1622e57bded8af9ab92d793ee40efd5e6..8d23eed134a13fad5c9e3039c66fe7cc1ce4ff79 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 ff9d868f0f475d513040357c566df75af523dd32..128f5459393ee9a4f6775f63bdddeca61211613c 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 9e4a91f77ef643ada8d460f49aff4b49dd2b7967..ab9c00be8cec8ced1dd54fa4e8cdc56543472f70 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 5be56d888c163dcbd1d311ee9b91cfd0c3a25396..890c0efca9647ec3bbe68332eace5523435d8863 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 80b05020a1d3fd45fb6bc1dc4ec2e4446dc73c9f..5382969b9209adaa556eea169db5ca79349e127e 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 e6aadaf7b75f81f1cf07b6df6eab6284542be154..81076790b95b765cad1e7810ddb337d61f479df7 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 dc8791b628b0d700b282c82649d8bbd0ad3ca372..69260a7db548c9494c173ffd0668002bac5604e6 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 d9ac741058ed1264f10629d307ea16bf54ddbbb8..acd08153496076f813e31894a3976cd296ca9365 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 2074125f465e7a77b62d2159e8d09de8603d59b4..a9e0ff950652435b8aef633e0d5afcc59fbf719e 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 4eddfb20d28f6e4d95abd500745c3165d993bd2f..86413b7b3634612221f248917b6b2ce7a0d077db 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 2679676646e52129e3c078e5bdc5dc0cc077ec73..a9ee795613540c72d46df0c67a51445a8b97ad29 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 1e79f9adbcdb7e43c6f9ab9505e1809efdcc94db..c1c7e3030f76d19e95ca7413ffa32cf708e79317 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 a59c3a8199b3875a27c6deda8bb6cad7d76e27be..0711bc2a350a76280c552dafac3d1ec69772de60 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 c4881e2a9eff8cc4b78b579f6453031e08705c08..4ff6c1c7ce33bc310a6455bed3486e91f1a9ecb6 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 ef2e2837e874105e238a844d6affca697e96dad5..c6082df9ee428853345d75e3d4184ff5c39c8426 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 d26d1ef2701c6f317c38a0241d0ac71b8d77c2d6..b53c666112d3f49312d7d1b0fd3169fabf8101d9 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 c72a74494511eddf467522dae2242584ccda37a6..2383ad7abc31572dc94926b70e842ac93a167602 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 ae33cf20b5b5022e7c1a547d2ebf1312d508345c..632927d494e5d155c2c09fe25396f2e5bded55fa 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 e51bac10403dd5509e714b339ee0e161e8c0da39..b058c187e47c552d2ea731fc2357c6d76c135009 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 1e81dc281823503ce8bb1f100564d786554b24a1..81a324dfec4694e765412ec53821da884d27e9e1 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 e44d2869b09bb5cc0553b3da58adeda62e2bb6ac..7f951a17bfbf6c82fef106a4b805c0b821c11d0c 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 412544dded3eec1e0346b368046a00a144010628..505bfc66a6c2e16ed467c0eb5805e66884858683 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 6fe6662023485a7d1db59f396ffeff3b35c53dbd..d485fa354b566d3b08ca53c920ab17f8d62343c4 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 793e1ae0a6a6f1c18db8f4ce9963d3059c749f1c..ee81b721fcb1424f1c8939625780f7cc5ce1e8fb 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 b9842105b5b74ea941032695f055d0b129fc558d..09cd4a562ad2cd82423d4ae590656338baf3f314 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 8c2d2be3834d896e6f7700583c25dc414f912f34..22ae43eaadb8cd457c84428c3415d692c771ac84 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 d7ccb5424603cf3f22d489d3e32b0055b0adbb09..d181b751c97530e521ac4af5f1424d05de37ff44 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 e9df2b509fa9980065dddd404699b32bf3df9a3b..02179dc8732ce382e51d1e77ac57387097c3ddbd 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 939ea1b2f579d7d6bc5915f133f4e8c13ee3f949..14ecf9a011a58a66ad594e5bb217051830029d94 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 5d304788506fad5489e9f69d782c02979e19ff8f..5335c8f6ab89de6f39d29d68c0883b6e631d0d79 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 4794e690e4d38d2f00c9e7e592d69707595a8390..55ce31cca82f1cda74c2d8390ce5b2ff8a57ed5e 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 34312052dfbfe0ba5fb3de86ff35c3b9a502306d..153a47686738ac21a83a5215e9630b688eb299cd 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 d713de5a0787bb0d411d339031826e40990fc03b..728995a70eba9ba65cbbe2d757545f66c0dae120 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 a5051beedcc8e44acdd91362c7b7bc62f5725f43..c690b36546fde900469166ebbfd831f4ea4d598c 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 9e0334aec6d2d4ca81c4826fc765625828e2fb9d..99b51542c219a216e050f271edf966fb578a609d 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 e4217ed655a6baacfbe64530ba616aa0f5cc92bb..7714b386bc4d1d4b10258f2f8185b63385a604e5 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 87d1b4b66dbe8b5c17175032edab66b2d0f25486..540d8b7b8bab9d93406911b1346130d060346fca 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 70e770fff86c9451ac9dd238c61c6280c720fcb9..8c3ea6594c21c54f254ab3bcc920c7ef280f0220 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 779d9bb2ad4f3a64cd9dae9b315a54d1029a8ee1..e7fbcf899bb2ce3a0fd18acf7340dea6c86cd46d 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 aa3089560a93a38a1ab1bf1665cdc17fb56aadb3..9988e672f215c1bce104258dc1fbbd4cbeab432c 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 5aef17e6a5d1413e21809f7a8d6a6493c86bc125..93d837e0d068c37337f86342b5f03ac0542a6a1b 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 435cf3524cd6058a9ed2bec041858382ff6b4e9a..9386e968751a55d3bd302c7f2257fde6f803f4b4 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 9043a1d88768c877d8c4d012c1f8c0b5f5909490..6349c0177e7b092f3b8b7a1454075996c335e452 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 7903053f4752528a62f3b1578834859858128ddd..c108909074e55a71417afcc51bc7e2b0abbfbd61 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 a63f063fd4496ebba9d313a5f509d110de04737a..ff2f17f9def770883abdae5a66ed97e89afb5459 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 c5ddb21f70cd65d18b50bf1499ffbbaa3bfb5747..4d7c46b028a42004ee12ee722b5c1de4cab016d8 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 460781a602f31ef49064d1bce6fa164d9d9ad993..75471694aac6a053eea722d307cb5fa4c57ed76b 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 4f99de7ce1c362ced4ead65afef16b1affc603b6..8a37336e77b316605d48575c6c4377491b755ccb 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 395169417adad8b460e4982085db36e2c9ba37ce..b9603f791a3c2f4987e18613fce2f83fb9a7e09f 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 aa9cecaf50208770842ccf8d88ec7ee08a478840..9c8b61b6959663b3d49c78707e45be6aa377e1a4 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 ae1675a820377e6e158ad6574a71aeac900ac5ee..a5537024bf1c408a0469bf2ebf50b0af6598c8b9 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 fd6c5700111b43d5bc55f3f07b77bae10386d19f..8e6ad7d71faa5084cdc1bc37a225baffdb0d9761 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 60b58c7fec8d3120a5221a75aac9eca51897e482..78cabc8b0e0929e32b2b93d555f0e554b80e9035 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 1e07b203e961609d9ceee11a258973a96a025015..47a37640b992eed74828591c2b99e0fd4263ca7f 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 fb83e1489711ef5f851e242b7c8fe2d64203233f..0d638b69c4cf66ac7679a92f32645e44b33ca7c4 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 e172b532b0c5328d226e8e722f2e4ba2df422c4a..b4d9dfa3a48f9a834edd81dad85d476cd384df45 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 e4997eac063997143c1f9cbb6c94f0082a825813..b87f942932e80dd277b400cdf1802db7900de082 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 6105142c44078e875643b9f2fd6d53dbfd456e41..851f30e6d1795bf79150968d9631464ed852916f 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 84c2a0998dba5cc71900c805f789a0ccfa2609a1..5a217c61a5efce85264b3fefaf8d16d61d26a589 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 1fc7e3e30a55847d6bcfa2c4f7149a3402239ad1..984040471ddc84b4557663bae4369b478de5c79c 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 );