diff --git a/src/AIS/AIS_LengthDimension.cxx b/src/AIS/AIS_LengthDimension.cxx index 8c053de858..34a8c581c0 100755 --- a/src/AIS/AIS_LengthDimension.cxx +++ b/src/AIS/AIS_LengthDimension.cxx @@ -1094,7 +1094,7 @@ void AIS_LengthDimension::ComputeFaceSelection( const Handle( SelectMgr_Selectio gp_Lin LengthLine( myPosition, DirOfArrow1 ); Standard_Real Par1 = ElCLib::Parameter( LengthLine, EndOfArrow1 ); Standard_Real Par2 = ElCLib::Parameter( LengthLine, EndOfArrow2 ); - if (Par1 > 0.0 && Par2 > 0.0 || Par1 < 0.0 && Par2 < 0.0) + if ((Par1 > 0.0 && Par2 > 0.0) || (Par1 < 0.0 && Par2 < 0.0)) { FirstPoint = myPosition; LastPoint = (Abs( Par1 ) > Abs( Par2 ))? EndOfArrow1 : EndOfArrow2; diff --git a/src/AppParCurves/AppParCurves_Variational_7.gxx b/src/AppParCurves/AppParCurves_Variational_7.gxx index 9f35af66d3..8339abbdca 100755 --- a/src/AppParCurves/AppParCurves_Variational_7.gxx +++ b/src/AppParCurves/AppParCurves_Variational_7.gxx @@ -150,12 +150,7 @@ void AppParCurves_Variational::Adjusting( j1cibl = Sqrt(myCriterium[0] / (NbrPnt - NbrConstraint)); vseuil = Sqrt(vocri[1]) + (erold - myMaxError) * 4; -// if(CNew->NbElements() == TheCurve->NbElements()) - lrejet = myMaxError > WQuality && myMaxError > erold * 1.01 - || Sqrt(myCriterium[1]) > vseuil * 1.05; -// else -// lrejet = myMaxError > WQuality && myMaxError > erold * 1.05 -// || Sqrt(myCriterium[1]) > vseuil * 1.01; + lrejet = ((myMaxError > WQuality) && (myMaxError > erold * 1.01)) || (Sqrt(myCriterium[1]) > vseuil * 1.05); if (lrejet) { myCriterium[0] = vocri[0]; @@ -175,7 +170,7 @@ void AppParCurves_Variational::Adjusting( /* (7) Test de convergence */ - if (iter >= mxiter && myMaxSegment == CNew->NbElements() || myMaxError < WQuality) { + if (((iter >= mxiter) && (myMaxSegment == CNew->NbElements())) || myMaxError < WQuality) { loptim = Standard_False; } diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx index 022771071d..872f74ea18 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx @@ -1231,8 +1231,8 @@ void BOPAlgo_PaveFiller::PerformFF() const BOPDS_InterfEF& aEF = aEFs(i); nE = aEF.Index1(); nFOpposite = aEF.Index2(); - if(aMIF1.Contains(nE) && aMIF2.Contains(nFOpposite) || - aMIF1.Contains(nFOpposite) && aMIF2.Contains(nE)) { + if((aMIF1.Contains(nE) && aMIF2.Contains(nFOpposite)) || + (aMIF1.Contains(nFOpposite) && aMIF2.Contains(nE))) { // IntTools_CommonPrt aCP = aEF.CommonPart(); if(aCP.Type() == TopAbs_VERTEX) { @@ -1462,8 +1462,8 @@ void BOPAlgo_PaveFiller::PerformFF() const BOPDS_InterfVV& aVV = aVVs(i); nV1 = aVV.Index1(); nV2 = aVV.Index2(); - if(aMIF1.Contains(nV1) && aMIF2.Contains(nV2) || - aMIF1.Contains(nV2) && aMIF2.Contains(nV1)) { + if((aMIF1.Contains(nV1) && aMIF2.Contains(nV2)) || + (aMIF1.Contains(nV2) && aMIF2.Contains(nV1))) { if (aVV.HasIndexNew()) { nVNew = aVV.IndexNew(); aMVStick.Add(nVNew); @@ -1475,8 +1475,8 @@ void BOPAlgo_PaveFiller::PerformFF() const BOPDS_InterfVE& aVE = aVEs(i); nV = aVE.Index1(); nE = aVE.Index2(); - if(aMIF1.Contains(nV) && aMIF2.Contains(nE) || - aMIF1.Contains(nE) && aMIF2.Contains(nV)) { + if((aMIF1.Contains(nV) && aMIF2.Contains(nE)) || + (aMIF1.Contains(nE) && aMIF2.Contains(nV))) { aMVStick.Add(nV); } } @@ -1485,8 +1485,8 @@ void BOPAlgo_PaveFiller::PerformFF() const BOPDS_InterfEE& aEE = aEEs(i); nE1 = aEE.Index1(); nE2 = aEE.Index2(); - if(aMIF1.Contains(nE1) && aMIF2.Contains(nE2) || - aMIF1.Contains(nE2) && aMIF2.Contains(nE1)) { + if((aMIF1.Contains(nE1) && aMIF2.Contains(nE2)) || + (aMIF1.Contains(nE2) && aMIF2.Contains(nE1))) { IntTools_CommonPrt aCP = aEE.CommonPart(); if(aCP.Type() == TopAbs_VERTEX) { nVNew = aEE.IndexNew(); @@ -1499,8 +1499,8 @@ void BOPAlgo_PaveFiller::PerformFF() const BOPDS_InterfVF& aVF = aVFs(i); nV = aVF.Index1(); nF = aVF.Index2(); - if(aMIF1.Contains(nV) && aMIF2.Contains(nF) || - aMIF1.Contains(nF) && aMIF2.Contains(nV)) { + if((aMIF1.Contains(nV) && aMIF2.Contains(nF)) || + (aMIF1.Contains(nF) && aMIF2.Contains(nV))) { aMVStick.Add(nV); } } @@ -1509,8 +1509,8 @@ void BOPAlgo_PaveFiller::PerformFF() const BOPDS_InterfEF& aEF = aEFs(i); nE = aEF.Index1(); nF = aEF.Index2(); - if(aMIF1.Contains(nE) && aMIF2.Contains(nF) || - aMIF1.Contains(nF) && aMIF2.Contains(nE)) { + if((aMIF1.Contains(nE) && aMIF2.Contains(nF)) || + (aMIF1.Contains(nF) && aMIF2.Contains(nE))) { IntTools_CommonPrt aCP = aEF.CommonPart(); if(aCP.Type() == TopAbs_VERTEX) { nVNew = aEF.IndexNew(); diff --git a/src/BRepFill/BRepFill_TrimEdgeTool.cxx b/src/BRepFill/BRepFill_TrimEdgeTool.cxx index a1a009bb2c..25639f48b1 100755 --- a/src/BRepFill/BRepFill_TrimEdgeTool.cxx +++ b/src/BRepFill/BRepFill_TrimEdgeTool.cxx @@ -357,10 +357,8 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1, Standard_Real TolInit= 1.e-9; Standard_Integer nn = 7; - if(AC1.GetType() != GeomAbs_Circle && - AC1.GetType() != GeomAbs_Line || - AC2.GetType() != GeomAbs_Circle && - AC2.GetType() != GeomAbs_Line ) { + if((AC1.GetType() != GeomAbs_Circle && AC1.GetType() != GeomAbs_Line) || + (AC2.GetType() != GeomAbs_Circle && AC2.GetType() != GeomAbs_Line)) { TolInit = 1.e-8; nn = 6; diff --git a/src/BRepLib/BRepLib_FindSurface.cxx b/src/BRepLib/BRepLib_FindSurface.cxx index 34cfe56fcd..8403879aad 100755 --- a/src/BRepLib/BRepLib_FindSurface.cxx +++ b/src/BRepLib/BRepLib_FindSurface.cxx @@ -483,7 +483,7 @@ void BRepLib_FindSurface::Init(const TopoDS_Shape& S, //static Standard_Real weakness = 5.0; Standard_Real weakness = 5.0; //XXf - if(dfDist <= myTolerance || dfDist < myTolerance*weakness && Tol<0) { + if(dfDist <= myTolerance || (dfDist < myTolerance*weakness && Tol<0)) { //XXf //myTolReached = dfDist; //XXt diff --git a/src/BRepOffset/BRepOffset_Tool.cxx b/src/BRepOffset/BRepOffset_Tool.cxx index 61f0c0920e..6b3b282406 100755 --- a/src/BRepOffset/BRepOffset_Tool.cxx +++ b/src/BRepOffset/BRepOffset_Tool.cxx @@ -950,8 +950,8 @@ static Standard_Boolean AreClosed(const TopoDS_Edge& E1, TopExp::Vertices( E1, V11, V12 ); TopExp::Vertices( E2, V21, V22 ); - if (V11.IsSame(V21) && V12.IsSame(V22) || - V11.IsSame(V22) && V12.IsSame(V21)) + if ((V11.IsSame(V21) && V12.IsSame(V22)) || + (V11.IsSame(V22) && V12.IsSame(V21))) return Standard_True; return Standard_False; @@ -1417,14 +1417,14 @@ static Standard_Boolean CheckIntersFF(const BOPDS_PDS& pDS, if (V1onBound && V2onBound) { - if (TangFirst.IsParallel(RefTangFirst,AngTol) && TangLast.IsParallel(RefTangLast,AngTol) || - TangFirst.IsParallel(RefTangLast,AngTol) && TangLast.IsParallel(RefTangFirst,AngTol)) - { - TrueEdges.Add( Edges(i) ); - return Standard_True; - } + if ((TangFirst.IsParallel(RefTangFirst,AngTol) && TangLast.IsParallel(RefTangLast,AngTol)) || + (TangFirst.IsParallel(RefTangLast,AngTol) && TangLast.IsParallel(RefTangFirst,AngTol))) + { + TrueEdges.Add( Edges(i) ); + return Standard_True; + } else - return Standard_False; + return Standard_False; } //StartEonF1 = (V1onBound)? VEmapF1( V1 ) : VEmapF1( V2 ); diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx index 940d1cab57..db6e2396d7 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx @@ -536,8 +536,8 @@ void BRepOffsetAPI_MiddlePath::Build() { anEdge = TopoDS::Edge(itl.Value()); TopExp::Vertices(anEdge, V1, V2); - if ((V1.IsSame(PrevVertex) && V2.IsSame(CurVertex) || - V1.IsSame(CurVertex) && V2.IsSame(PrevVertex)) && + if (((V1.IsSame(PrevVertex) && V2.IsSame(CurVertex)) || + (V1.IsSame(CurVertex) && V2.IsSame(PrevVertex))) && !anEdge.IsSame(E1)) { ProperEdge = anEdge; @@ -852,8 +852,8 @@ void BRepOffsetAPI_MiddlePath::Build() } gp_Dir aDir1 = gp_Vec(aCirc.Location(), Pnt1); gp_Dir aDir2 = gp_Vec(aCirc.Location(), Pnt2); - if (!(aDir1.IsEqual(theDir1, AngTol) && aDir2.IsEqual(theDir2, AngTol) || - aDir1.IsEqual(theDir2, AngTol) && aDir2.IsEqual(theDir1, AngTol))) + if (!((aDir1.IsEqual(theDir1, AngTol) && aDir2.IsEqual(theDir2, AngTol)) || + (aDir1.IsEqual(theDir2, AngTol) && aDir2.IsEqual(theDir1, AngTol)))) { SimilarArcs = Standard_False; break; diff --git a/src/BRepTest/BRepTest_GPropCommands.cxx b/src/BRepTest/BRepTest_GPropCommands.cxx index 60b206c579..ffaecf03a3 100755 --- a/src/BRepTest/BRepTest_GPropCommands.cxx +++ b/src/BRepTest/BRepTest_GPropCommands.cxx @@ -62,7 +62,7 @@ Standard_Integer props(Draw_Interpretor& di, Standard_Integer n, const char** a) Standard_Boolean onlyClosed = Standard_False; Standard_Real eps = 1.0; Standard_Boolean witheps = Standard_False; - if(n > 2 && *a[2]=='c' || n > 3 && *a[3]=='c') onlyClosed = Standard_True; + if((n > 2 && *a[2]=='c') || (n > 3 && *a[3]=='c')) onlyClosed = Standard_True; if(n > 2 && *a[2]!='c' && n != 5) {eps = Draw::Atof (a[2]); witheps = Standard_True;} if (witheps){ diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx b/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx index 9473e391d8..ebdae65737 100755 --- a/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx @@ -505,7 +505,7 @@ TopAbs_State BRepTopAdaptor_FClass2d::Perform(const gp_Pnt2d& _Puv, Status = aClassifier.State(); } - if (!RecadreOnPeriodic || !IsUPer && !IsVPer) + if (!RecadreOnPeriodic || (!IsUPer && !IsVPer)) return Status; if (Status == TopAbs_IN || Status == TopAbs_ON) return Status; @@ -635,7 +635,7 @@ TopAbs_State BRepTopAdaptor_FClass2d::TestOnRestriction(const gp_Pnt2d& _Puv, Status = aClassifier.State(); } - if (!RecadreOnPeriodic || !IsUPer && !IsVPer) + if (!RecadreOnPeriodic || (!IsUPer && !IsVPer)) return Status; if (Status == TopAbs_IN || Status == TopAbs_ON) return Status; diff --git a/src/Blend/Blend_Walking_1.gxx b/src/Blend/Blend_Walking_1.gxx index 1dffbb597f..23e449ef45 100755 --- a/src/Blend/Blend_Walking_1.gxx +++ b/src/Blend/Blend_Walking_1.gxx @@ -472,8 +472,8 @@ Standard_Boolean Blend_Walking::Continu(Blend_Function& Func, if (sens < 0.) { Ext1 = line->StartPointOnFirst(); Ext2 = line->StartPointOnSecond(); - if (OnS1 && Ext1.NbPointOnRst() == 0 || - !OnS1 && Ext2.NbPointOnRst() == 0) { + if ((OnS1 && Ext1.NbPointOnRst() == 0) || + (!OnS1 && Ext2.NbPointOnRst() == 0)) { return Standard_False; } previousP = line->Point(1); @@ -483,8 +483,8 @@ Standard_Boolean Blend_Walking::Continu(Blend_Function& Func, else { Ext1 = line->EndPointOnFirst(); Ext2 = line->EndPointOnSecond(); - if (OnS1 && Ext1.NbPointOnRst() == 0 || - !OnS1 && Ext2.NbPointOnRst() == 0) { + if ((OnS1 && Ext1.NbPointOnRst() == 0) || + (!OnS1 && Ext2.NbPointOnRst() == 0)) { return Standard_False; } previousP = line->Point(line->NbPoints()); @@ -505,16 +505,16 @@ Standard_Boolean Blend_Walking::Continu(Blend_Function& Func, Standard_Integer newlength = line->NbPoints(); if (sens <0.) { - if (OnS1 && line->StartPointOnSecond().NbPointOnRst() == 0 || - !OnS1 && line->StartPointOnFirst().NbPointOnRst() == 0) { + if ((OnS1 && line->StartPointOnSecond().NbPointOnRst() == 0) || + (!OnS1 && line->StartPointOnFirst().NbPointOnRst() == 0)) { line->Remove(1,newlength-length); line->SetStartPoints(Ext1,Ext2); return Standard_False; } } else { - if (OnS1 && line->EndPointOnSecond().NbPointOnRst() == 0 || - !OnS1 && line->EndPointOnFirst().NbPointOnRst() == 0) { + if ((OnS1 && line->EndPointOnSecond().NbPointOnRst() == 0) || + (!OnS1 && line->EndPointOnFirst().NbPointOnRst() == 0)) { line->Remove(length,newlength); line->SetEndPoints(Ext1,Ext2); return Standard_False; diff --git a/src/Bnd/Bnd_Box.cxx b/src/Bnd/Bnd_Box.cxx index 670b45b0ea..a25b42955a 100755 --- a/src/Bnd/Bnd_Box.cxx +++ b/src/Bnd/Bnd_Box.cxx @@ -832,7 +832,7 @@ Standard_Boolean Bnd_Box::IsOut (const gp_Trsf& T1, //======================================================================= -//function : IsOut +//function : IsSegmentOut //purpose : //======================================================================= @@ -848,12 +848,14 @@ static Standard_Boolean IsSegmentOut(Standard_Real x1,Standard_Real y1, Standard_Real ysmax = Max (ys1, ys2); if (ysmax-ysmin < eps && (y1-ys1 < eps && ys1-y2 < eps) && - (xsmin-x1 < eps && x1-xsmax < eps || xsmin-x2 < eps && x2-xsmax < eps || - x1-xs1 < eps && xs1-x2 < eps)) + ((xsmin-x1 < eps && x1-xsmax < eps) || + (xsmin-x2 < eps && x2-xsmax < eps) || + (x1-xs1 < eps && xs1-x2 < eps))) return Standard_False; if (xsmax-xsmin < eps && (x1-xs1 < eps && xs1-x2 < eps) && - (ysmin-y1 < eps && y1-ysmax < eps || ysmin-y2 < eps && y2-ysmax < eps || - y1-ys1 < eps && ys1-y2 < eps)) + ((ysmin-y1 < eps && y1-ysmax < eps) || + (ysmin-y2 < eps && y2-ysmax < eps) || + (y1-ys1 < eps && ys1-y2 < eps))) return Standard_False; if ((xs1 < x1 && xs2 < x1) || (xs1 > x2 && xs2 > x2) || diff --git a/src/ChFi2d/ChFi2d_Builder.cxx b/src/ChFi2d/ChFi2d_Builder.cxx index 35029b0b29..14f28ae2a3 100755 --- a/src/ChFi2d/ChFi2d_Builder.cxx +++ b/src/ChFi2d/ChFi2d_Builder.cxx @@ -1093,8 +1093,8 @@ TopoDS_Edge ChFi2d_Builder::BuildFilletEdge(const TopoDS_Vertex& V, if (U1 > Vv1 && U1 > 2.*M_PI) { ElCLib::AdjustPeriodic(0.,2.*M_PI,Precision::Confusion(),U1,Vv1); } // if (U1 ... - if (O1 == TopAbs_FORWARD && OE1 == TopAbs_FORWARD || - O1 == TopAbs_REVERSED && OE1 == TopAbs_REVERSED ) { + if ( (O1 == TopAbs_FORWARD && OE1 == TopAbs_FORWARD) || + (O1 == TopAbs_REVERSED && OE1 == TopAbs_REVERSED) ) { filletEdge = BRepLib_MakeEdge(circle, refSurf, NewExtr1, NewExtr2, U1, Vv1); } // if (O1 == ... @@ -1104,8 +1104,8 @@ TopoDS_Edge ChFi2d_Builder::BuildFilletEdge(const TopoDS_Vertex& V, } // else ... if (!Sense) { TopAbs_Orientation S1 = filletEdge.Orientation(); - if (O1 == TopAbs_FORWARD && OE1 == TopAbs_FORWARD || - O1 == TopAbs_REVERSED && OE1 == TopAbs_REVERSED ) { + if ((O1 == TopAbs_FORWARD && OE1 == TopAbs_FORWARD) || + (O1 == TopAbs_REVERSED && OE1 == TopAbs_REVERSED) ) { filletEdge = BRepLib_MakeEdge(circle, refSurf, NewExtr2, NewExtr1, Vv1, U1); } diff --git a/src/ChFi3d/ChFi3d_Builder_SpKP.cxx b/src/ChFi3d/ChFi3d_Builder_SpKP.cxx index 1a02f47ac9..49315ee1e1 100755 --- a/src/ChFi3d/ChFi3d_Builder_SpKP.cxx +++ b/src/ChFi3d/ChFi3d_Builder_SpKP.cxx @@ -389,9 +389,9 @@ void ChFi3d_Builder::Trunc(const Handle(ChFiDS_SurfData)& SD, TopoDS_Face F2 = BS2->ChangeSurface().Face(); const ChFiDS_CommonPoint& cp1 = SD->Vertex(isfirst,1); const ChFiDS_CommonPoint& cp2 = SD->Vertex(isfirst,2); - if(!(cp1.IsOnArc() && SearchFace(Spine,cp1,F1,FBID) || - cp2.IsOnArc() && SearchFace(Spine,cp2,F2,FBID))) { - tron = ChFi3d_KParticular(Spine,ivois,BS1->ChangeSurface(),BS2->ChangeSurface()); + if(!((cp1.IsOnArc() && SearchFace(Spine,cp1,F1,FBID)) || + (cp2.IsOnArc() && SearchFace(Spine,cp2,F2,FBID)))) { + tron = ChFi3d_KParticular(Spine,ivois,BS1->ChangeSurface(),BS2->ChangeSurface()); } } } diff --git a/src/ChFiDS/ChFiDS_FilSpine.cxx b/src/ChFiDS/ChFiDS_FilSpine.cxx index 6329cfe80b..2636679d7d 100755 --- a/src/ChFiDS/ChFiDS_FilSpine.cxx +++ b/src/ChFiDS/ChFiDS_FilSpine.cxx @@ -273,11 +273,11 @@ Standard_Boolean ChFiDS_FilSpine::IsConstant(const Standard_Integer IE)const rad = parandrad(i).Y(); Standard_Real nextpar = parandrad(i+1).X(); if (Abs( Uf-par ) <= gp::Resolution() || - par < Uf && Uf < nextpar && nextpar-Uf > gp::Resolution()) - { - StartRad = rad; - break; - } + (par < Uf && Uf < nextpar && nextpar-Uf > gp::Resolution())) + { + StartRad = rad; + break; + } } for (i++; i <= parandrad.Length(); i++) { @@ -322,11 +322,11 @@ Standard_Real ChFiDS_FilSpine::Radius(const Standard_Integer IE)const rad = parandrad(i).Y(); Standard_Real nextpar = parandrad(i+1).X(); if (Abs( Uf-par ) <= gp::Resolution() || - par < Uf && Uf < nextpar && nextpar-Uf > gp::Resolution()) - { - StartRad = rad; - break; - } + (par < Uf && Uf < nextpar && nextpar-Uf > gp::Resolution())) + { + StartRad = rad; + break; + } } for (i++; i <= parandrad.Length(); i++) { diff --git a/src/Contap/Contap_ContourGen_2.gxx b/src/Contap/Contap_ContourGen_2.gxx index 5dc9d8aac6..739ec69dcf 100755 --- a/src/Contap/Contap_ContourGen_2.gxx +++ b/src/Contap/Contap_ContourGen_2.gxx @@ -502,8 +502,8 @@ static void ComputeTangency (const Contap_TheSearch& solrst, LocTrans = TopAbs_EXTERNAL; // et pourquoi pas INTERNAL } else { - if ((test > 0.)&& arcorien == TopAbs_FORWARD || - (test < 0.)&& arcorien == TopAbs_REVERSED){ + if ((test > 0. && arcorien == TopAbs_FORWARD) || + (test < 0. && arcorien == TopAbs_REVERSED)){ LocTrans = TopAbs_FORWARD; } else { @@ -544,8 +544,8 @@ static void ComputeTangency (const Contap_TheSearch& solrst, LocTrans = TopAbs_EXTERNAL; // et pourquoi pas INTERNAL } else { - if ((test > 0.)&& arcorien == TopAbs_FORWARD || - (test < 0.)&& arcorien == TopAbs_REVERSED){ + if ((test > 0. && arcorien == TopAbs_FORWARD) || + (test < 0. && arcorien == TopAbs_REVERSED)){ LocTrans = TopAbs_FORWARD; } else { diff --git a/src/DsgPrs/DsgPrs_LengthPresentation.cxx b/src/DsgPrs/DsgPrs_LengthPresentation.cxx index 1151215429..9bde8b97f2 100755 --- a/src/DsgPrs/DsgPrs_LengthPresentation.cxx +++ b/src/DsgPrs/DsgPrs_LengthPresentation.cxx @@ -159,7 +159,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta Standard_Real Par1 = ElCLib::Parameter( LengthLine, EndOfArrow1 ); Standard_Real Par2 = ElCLib::Parameter( LengthLine, EndOfArrow2 ); gp_Pnt FirstPoint, LastPoint; - if (Par1 > 0.0 && Par2 > 0.0 || Par1 < 0.0 && Par2 < 0.0) + if ((Par1 > 0.0 && Par2 > 0.0) || (Par1 < 0.0 && Par2 < 0.0)) { FirstPoint = OffsetPoint; LastPoint = (Abs( Par1 ) > Abs( Par2 ))? EndOfArrow1 : EndOfArrow2; @@ -310,7 +310,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta Standard_Real Par1 = ElCLib::Parameter( LengthLine, AttachmentPoint1 ); Standard_Real Par2 = ElCLib::Parameter( LengthLine, EndOfArrow2 ); gp_Pnt FirstPoint, LastPoint; - if (Par1 > 0.0 && Par2 > 0.0 || Par1 < 0.0 && Par2 < 0.0) + if ((Par1 > 0.0 && Par2 > 0.0) || (Par1 < 0.0 && Par2 < 0.0)) { FirstPoint = OffsetPoint; LastPoint = (Abs( Par1 ) > Abs( Par2 ))? AttachmentPoint1 : EndOfArrow2; diff --git a/src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx b/src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx index 16e8637344..44b7bd24b4 100755 --- a/src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx +++ b/src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx @@ -178,8 +178,8 @@ static Standard_Boolean ComputeDir(const TopoDS_Shape& shape, gp_Pnt& pt, gp_Dir pt = lProps.Value(); dir = lProps.Normal(); } - if ((shape.Orientation() == TopAbs_FORWARD) && (mode == 1) || - (shape.Orientation() == TopAbs_REVERSED) && (mode == 0)) { + if (((shape.Orientation() == TopAbs_FORWARD) && (mode == 1)) || + ((shape.Orientation() == TopAbs_REVERSED) && (mode == 0))) { dir.Reverse(); } return Standard_True; diff --git a/src/Geom/Geom_OffsetSurface.cxx b/src/Geom/Geom_OffsetSurface.cxx index 0f80fd467c..46a73639da 100755 --- a/src/Geom/Geom_OffsetSurface.cxx +++ b/src/Geom/Geom_OffsetSurface.cxx @@ -1663,7 +1663,7 @@ void Geom_OffsetSurface::SetD0(const Standard_Real U, const Standard_Real V, CSLib_NormalStatus NStatus; CSLib::Normal (D1U, D1V, MagTol, NStatus, Normal); - if ((NStatus == CSLib_Defined)) // akm - only in singularities && !AlongU && !AlongV) + if (NStatus == CSLib_Defined) // akm - only in singularities && !AlongU && !AlongV) { P.SetXYZ(P.XYZ() + offsetValue * Normal.XYZ()); } diff --git a/src/Geom2dAdaptor/Geom2dAdaptor.cxx b/src/Geom2dAdaptor/Geom2dAdaptor.cxx index cecad74d37..a9016e7443 100755 --- a/src/Geom2dAdaptor/Geom2dAdaptor.cxx +++ b/src/Geom2dAdaptor/Geom2dAdaptor.cxx @@ -103,8 +103,8 @@ Handle(Geom2d_Curve) Geom2dAdaptor::MakeCurve // trim the curve if necassary. if (! C2D.IsNull() && - (HC.FirstParameter() != C2D->FirstParameter()) || - (HC.LastParameter() != C2D->LastParameter())) { + ((HC.FirstParameter() != C2D->FirstParameter()) || + (HC.LastParameter() != C2D->LastParameter()))) { C2D = new Geom2d_TrimmedCurve (C2D,HC.FirstParameter(),HC.LastParameter()); diff --git a/src/GeomAdaptor/GeomAdaptor.cxx b/src/GeomAdaptor/GeomAdaptor.cxx index c3bd6aa1f1..316d555362 100755 --- a/src/GeomAdaptor/GeomAdaptor.cxx +++ b/src/GeomAdaptor/GeomAdaptor.cxx @@ -90,8 +90,8 @@ Handle(Geom_Curve) GeomAdaptor::MakeCurve (const Adaptor3d_Curve& HC) } // trim the curve if necassary. - if (! C.IsNull() && - (HC.FirstParameter() != C->FirstParameter()) || + if ((! C.IsNull() && + (HC.FirstParameter() != C->FirstParameter())) || (HC.LastParameter() != C->LastParameter())) { C = new Geom_TrimmedCurve(C,HC.FirstParameter(),HC.LastParameter()); diff --git a/src/IGESData/IGESData_IGESModel.cxx b/src/IGESData/IGESData_IGESModel.cxx index a343b0f40d..a6fbc38078 100755 --- a/src/IGESData/IGESData_IGESModel.cxx +++ b/src/IGESData/IGESData_IGESModel.cxx @@ -513,8 +513,8 @@ void IGESData_VerifyDate(const Handle(TCollection_HAsciiString)& str, (stdvar->Value(5) == '3' && stdvar->Value(6) > '1'))&&(stdvar->Length() == 13)) ach->SendFail(Msg57); else if ((stdvar->Value(7) != '.' || stdvar->Value(10) > '5' || stdvar->Value(12) > '5')&&(stdvar->Length() == 13)) ach->SendFail(Msg57); - else if ((stdvar->Value(8) > '2' || - stdvar->Value(8) == '2' && stdvar->Value(9) > '3')&&(stdvar->Length() == 13)) ach->SendFail(Msg57); + else if ((stdvar->Value(8) > '2' || (stdvar->Value(8) == '2' && stdvar->Value(9) > '3')) && + (stdvar->Length() == 13)) ach->SendFail(Msg57); //smh#13 For long year date else if ( (stdvar->Value(5) > '1' || (stdvar->Value(5) == '1' && stdvar->Value(6) > '2'))&&(stdvar->Length() == 15)) ach->SendFail(Msg57); @@ -523,7 +523,7 @@ void IGESData_VerifyDate(const Handle(TCollection_HAsciiString)& str, else if ((stdvar->Value(9) != '.' || stdvar->Value(12) > '5' || stdvar->Value(14) > '5')&&(stdvar->Length() == 15)) ach->SendFail(Msg57); else if ((stdvar->Value(10) > '2' || - stdvar->Value(10) == '2' && stdvar->Value(11) > '3')&&(stdvar->Length() == 15)) ach->SendFail(Msg57); + (stdvar->Value(10) == '2' && stdvar->Value(11) > '3'))&&(stdvar->Length() == 15)) ach->SendFail(Msg57); } diff --git a/src/IGESToBRep/IGESToBRep_Actor.cxx b/src/IGESToBRep/IGESToBRep_Actor.cxx index 3a9f348aec..1f668bafae 100755 --- a/src/IGESToBRep/IGESToBRep_Actor.cxx +++ b/src/IGESToBRep/IGESToBRep_Actor.cxx @@ -94,9 +94,9 @@ Standard_Boolean IGESToBRep_Actor::Recognize Standard_Integer typnum = ent->TypeNumber(); Standard_Integer fornum = ent->FormNumber(); if (IGESToBRep::IsCurveAndSurface(ent) || - (typnum == 402 && (fornum == 1 || fornum == 7 || - fornum == 14 || fornum == 15) || - (typnum == 408 ) || (typnum == 308))) + ((typnum == 402 && (fornum == 1 || fornum == 7 || + fornum == 14 || fornum == 15)) || + (typnum == 408 ) || (typnum == 308))) return Standard_True; // Cas restants : non reconnus diff --git a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx index bd39936770..56cb016ec8 100755 --- a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx +++ b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx @@ -253,8 +253,8 @@ void ComputeTangency (const IntPatch_TheSOnBounds& solrst, LocTrans = TopAbs_EXTERNAL; // et pourquoi pas INTERNAL } else { - if ((test > 0.)&& arcorien == TopAbs_FORWARD || - (test < 0.)&& arcorien == TopAbs_REVERSED){ + if (((test > 0.)&& arcorien == TopAbs_FORWARD) || + ((test < 0.)&& arcorien == TopAbs_REVERSED)){ LocTrans = TopAbs_FORWARD; } else { @@ -292,8 +292,8 @@ void ComputeTangency (const IntPatch_TheSOnBounds& solrst, LocTrans = TopAbs_EXTERNAL; // et pourquoi pas INTERNAL } else { - if ((test > 0.)&& arcorien == TopAbs_FORWARD || - (test < 0.)&& arcorien == TopAbs_REVERSED){ + if (((test > 0.)&& arcorien == TopAbs_FORWARD) || + ((test < 0.)&& arcorien == TopAbs_REVERSED)){ LocTrans = TopAbs_FORWARD; } else { diff --git a/src/IntPatch/IntPatch_LineConstructor.cxx b/src/IntPatch/IntPatch_LineConstructor.cxx index d53af38842..23aaf3d23a 100755 --- a/src/IntPatch/IntPatch_LineConstructor.cxx +++ b/src/IntPatch/IntPatch_LineConstructor.cxx @@ -818,32 +818,32 @@ static Standard_Boolean TestWLineIsARLine(const IntPatch_SequenceOfLine& slinref if(slinref.Value(i)->ArcType()==IntPatch_Restriction) { Handle(IntPatch_RLine)& rlin = *((Handle(IntPatch_RLine) *)&(slinref(i))); for (Standard_Integer is=0; is<2; is++) { - Standard_Boolean onFirst = is==0; - if(onFirst && rlin->IsArcOnS1() || !onFirst && rlin->IsArcOnS2()) { - Handle(Adaptor2d_HCurve2d) arc; - Standard_Real u,v,u1,v1; - if (onFirst) { - arc = rlin->ArcOnS1(); - POn2S.ParametersOnS1(u,v); - POn2S1.ParametersOnS1(u1,v1); - } - else { - arc = rlin->ArcOnS2(); - POn2S.ParametersOnS2(u,v); - POn2S1.ParametersOnS2(u1,v1); - } - if (indicepnt == 1) { - u = (u+u1)*0.5; - v = (v+v1)*0.5; - } - const Adaptor2d_Curve2d& C2d=arc->Curve2d(); - gp_Pnt2d PObt,P2d(u,v); - Standard_Real par= Geom2dInt_TheProjPCurOfGInter::FindParameter(C2d,P2d,1e-7); - PObt=C2d.Value(par); - if(PObt.Distance(P2d) < tol2d) { - return Standard_True; - } - } + Standard_Boolean onFirst = is==0; + if((onFirst && rlin->IsArcOnS1()) || (!onFirst && rlin->IsArcOnS2())) { + Handle(Adaptor2d_HCurve2d) arc; + Standard_Real u,v,u1,v1; + if (onFirst) { + arc = rlin->ArcOnS1(); + POn2S.ParametersOnS1(u,v); + POn2S1.ParametersOnS1(u1,v1); + } + else { + arc = rlin->ArcOnS2(); + POn2S.ParametersOnS2(u,v); + POn2S1.ParametersOnS2(u1,v1); + } + if (indicepnt == 1) { + u = (u+u1)*0.5; + v = (v+v1)*0.5; + } + const Adaptor2d_Curve2d& C2d=arc->Curve2d(); + gp_Pnt2d PObt,P2d(u,v); + Standard_Real par= Geom2dInt_TheProjPCurOfGInter::FindParameter(C2d,P2d,1e-7); + PObt=C2d.Value(par); + if(PObt.Distance(P2d) < tol2d) { + return Standard_True; + } + } } } } @@ -970,8 +970,8 @@ static void TestWLineToRLine(const IntPatch_SequenceOfLine& slinref, Standard_Integer is; for (is=0; is<2; is++) { Standard_Boolean onFirst = is==0; - if( onFirst && WLine->HasArcOnS1() || - !onFirst && WLine->HasArcOnS2()) { + if(( onFirst && WLine->HasArcOnS1()) || + (!onFirst && WLine->HasArcOnS2())) { PiParOnS piParOnS; PQuery pIsOnDomS; PArcOnS pArcOnS; diff --git a/src/IntPatch/IntPatch_RstInt.cxx b/src/IntPatch/IntPatch_RstInt.cxx index 632927d494..36789e8886 100755 --- a/src/IntPatch/IntPatch_RstInt.cxx +++ b/src/IntPatch/IntPatch_RstInt.cxx @@ -695,8 +695,8 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L, tolU = Max(tolULast,tolU); tolV = Max(tolVLast,tolV); } Standard_Real nptCh = UMaxCh-UMinCh; - Standard_Boolean isNptLow = nptCh < 10. && nptCh < Nbptlin/100. || - !Domain->Has3d() && Standard_Integer(nptCh)+1 < Nbptlin; + Standard_Boolean isNptLow = (nptCh < 10. && nptCh < Nbptlin/100.) || + (!Domain->Has3d() && Standard_Integer(nptCh)+1 < Nbptlin); if (!isNptLow && !IsSegment2dSmall(Brise,UMinAr,UMaxAr,tolU,tolV)) { // treat both ends Standard_Real UMinChP,UMaxChP,UMinArP,UMaxArP; @@ -797,8 +797,8 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L, if (ptsommet.Distance(locpt(j)) <= edgeTol) { if (possiblyClosed) { locpt2(j).Coord(U,V); - if (OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed || - OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed) + if ((OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed) || + (OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed)) continue; } duplicate = Standard_True; @@ -827,14 +827,14 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L, // check in 2d if (SurfaceIsUClosed || SurfaceIsVClosed) { GetLinePoint2d (L, paramline, OnFirst, U,V); - if (SurfaceIsUClosed && Abs(U-U1) > tolUClosed || - SurfaceIsVClosed && Abs(V-V1) > tolVClosed) + if ((SurfaceIsUClosed && Abs(U-U1) > tolUClosed) || + (SurfaceIsVClosed && Abs(V-V1) > tolVClosed)) found = Standard_False; } if (found && (OSurfaceIsUClosed || OSurfaceIsVClosed)) { GetLinePoint2d (L, paramline, !OnFirst, U,V); - if (OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed || - OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed) + if ((OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed) || + (OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed)) found = Standard_False; } } @@ -861,22 +861,22 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L, ? wlin->Vertex(j) : rlin->Vertex(j)); Standard_Boolean APointOnRstStillExist = - (OnFirst && Rptline.IsOnDomS1() && Rptline.ArcOnS1() == arc || - !OnFirst && Rptline.IsOnDomS2() && Rptline.ArcOnS2() == arc); + ((OnFirst && Rptline.IsOnDomS1() && Rptline.ArcOnS1() == arc) || + (!OnFirst && Rptline.IsOnDomS2() && Rptline.ArcOnS2() == arc)); if(!APointOnRstStillExist) { if (possiblyClosed) { if (SurfaceIsUClosed || SurfaceIsVClosed) { if (OnFirst) Rptline.ParametersOnS1(U,V); else Rptline.ParametersOnS2(U,V); - if (SurfaceIsUClosed && Abs(U-U1) > tolUClosed || - SurfaceIsVClosed && Abs(V-V1) > tolVClosed) + if ((SurfaceIsUClosed && Abs(U-U1) > tolUClosed) || + (SurfaceIsVClosed && Abs(V-V1) > tolVClosed)) continue; } if (OSurfaceIsUClosed || OSurfaceIsVClosed) { if (OnFirst) Rptline.ParametersOnS2(U,V); else Rptline.ParametersOnS1(U,V); - if (OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed || - OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed) + if ((OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed) || + (OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed)) continue; } } @@ -983,8 +983,8 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L, // on doit avoir VtxOnArc = True. On duplique le point sur S1 // en changeant ArcOnS2. Standard_Boolean OnDifferentRst = - (OnFirst && ptline.IsOnDomS1() && ptline.ArcOnS1() != arc || - !OnFirst && ptline.IsOnDomS2() && ptline.ArcOnS2() != arc); + ((OnFirst && ptline.IsOnDomS1() && ptline.ArcOnS1() != arc) || + (!OnFirst && ptline.IsOnDomS2() && ptline.ArcOnS2() != arc)); ptline.SetTolerance(vtxTol); if ( (!ptline.IsVertexOnS1() && OnFirst) || (!ptline.IsVertexOnS2() && !OnFirst) diff --git a/src/IntPoly/IntPoly_ShapeSection.cxx b/src/IntPoly/IntPoly_ShapeSection.cxx index ea0b13f828..a355ca1421 100755 --- a/src/IntPoly/IntPoly_ShapeSection.cxx +++ b/src/IntPoly/IntPoly_ShapeSection.cxx @@ -614,15 +614,14 @@ Standard_Boolean IntPoly_ShapeSection::Intersect(const gp_Pnt& S1, //======================================================================= #define epsilon 0.000000000001 -Standard_Boolean IntPoly_ShapeSection::IsEqual(const gp_Pnt& Pt1, - const gp_Pnt& Pt2) +Standard_Boolean IntPoly_ShapeSection::IsEqual(const gp_Pnt& Pt1, const gp_Pnt& Pt2) { - return ((Pt1.X() <= Pt2.X() && Pt2.X() < Pt1.X()+epsilon || - Pt2.X() <= Pt1.X() && Pt1.X() < Pt2.X()+epsilon) && - (Pt1.Y() <= Pt2.Y() && Pt2.Y() < Pt1.Y()+epsilon || - Pt2.Y() <= Pt1.Y() && Pt1.Y() < Pt2.Y()+epsilon) && - (Pt1.Z() <= Pt2.Z() && Pt2.Z() < Pt1.Z()+epsilon || - Pt2.Z() <= Pt1.Z() && Pt1.Z() < Pt2.Z()+epsilon)); + return (((Pt1.X() <= Pt2.X() && Pt2.X() < Pt1.X()+epsilon) || + (Pt2.X() <= Pt1.X() && Pt1.X() < Pt2.X()+epsilon)) && + ((Pt1.Y() <= Pt2.Y() && Pt2.Y() < Pt1.Y()+epsilon) || + (Pt2.Y() <= Pt1.Y() && Pt1.Y() < Pt2.Y()+epsilon)) && + ((Pt1.Z() <= Pt2.Z() && Pt2.Z() < Pt1.Z()+epsilon) || + (Pt2.Z() <= Pt1.Z() && Pt1.Z() < Pt2.Z()+epsilon))); } diff --git a/src/IntPolyh/IntPolyh_MaillageAffinage.cxx b/src/IntPolyh/IntPolyh_MaillageAffinage.cxx index b058c187e4..dee5543dc7 100755 --- a/src/IntPolyh/IntPolyh_MaillageAffinage.cxx +++ b/src/IntPolyh/IntPolyh_MaillageAffinage.cxx @@ -2610,7 +2610,7 @@ Standard_Integer IntPolyh_MaillageAffinage::TriangleEdgeContact &&(Abs(SP1.V1()-SP2.V1())=2) return(NbPoints); //= remove - else if ( ( (pp3>ppe1)&&(pp1<=ppe1)&&(pp2<=ppe1) ) || ( (pp3=ppe1)&&(pp2>=ppe1) ) + else if ( (( (pp3>ppe1)&&(pp1<=ppe1)&&(pp2<=ppe1) ) || ( (pp3=ppe1)&&(pp2>=ppe1) )) && (NbPoints<2) ) { //there are two sides (common top PT3) that can cut the edge @@ -2895,8 +2895,8 @@ Standard_Integer IntPolyh_MaillageAffinage::TriangleEdgeContact2 &&(Abs(SP1.V1()-SP2.V1())=2) return(NbPoints); - else if ( ( (pp3>=ppe1)&&(pp1<=ppe1)&&(pp2<=ppe1) ) || ( (pp3<=ppe1)&&(pp1>=ppe1)&&(pp2>=ppe1) ) - && (NbPoints<2) ) { + else if ( (( (pp3>=ppe1)&&(pp1<=ppe1)&&(pp2<=ppe1) ) || ( (pp3<=ppe1)&&(pp1>=ppe1)&&(pp2>=ppe1) )) + && (NbPoints<2) ) { //there are two sides (common top PT3) that can cut the edge //first side diff --git a/src/IntTools/IntTools_FClass2d.cxx b/src/IntTools/IntTools_FClass2d.cxx index f8319712e0..b6f503422c 100755 --- a/src/IntTools/IntTools_FClass2d.cxx +++ b/src/IntTools/IntTools_FClass2d.cxx @@ -629,7 +629,7 @@ IntTools_FClass2d::IntTools_FClass2d() Status = aClassifier.State(); } - if (!RecadreOnPeriodic || !IsUPer && !IsVPer) + if (!RecadreOnPeriodic || (!IsUPer && !IsVPer)) return Status; if (Status == TopAbs_IN || Status == TopAbs_ON) @@ -762,7 +762,7 @@ IntTools_FClass2d::IntTools_FClass2d() Status = aClassifier.State(); } - if (!RecadreOnPeriodic || !IsUPer && !IsVPer) + if (!RecadreOnPeriodic || (!IsUPer && !IsVPer)) return Status; if (Status == TopAbs_IN || Status == TopAbs_ON) return Status; diff --git a/src/IntTools/IntTools_MarkedRangeSet.cxx b/src/IntTools/IntTools_MarkedRangeSet.cxx index f75cdfead1..a8db733ffe 100755 --- a/src/IntTools/IntTools_MarkedRangeSet.cxx +++ b/src/IntTools/IntTools_MarkedRangeSet.cxx @@ -241,7 +241,7 @@ Standard_Integer IntTools_MarkedRangeSet::GetIndex(const Standard_Real theValue, { Standard_Integer anIndex = 0; - if(UseLower && (theValue < myRangeSetStorer(1)) || + if((UseLower && (theValue < myRangeSetStorer(1))) || (!UseLower && (theValue <= myRangeSetStorer(1)))) anIndex = 0; else { diff --git a/src/Intf/Intf_TangentZone.cxx b/src/Intf/Intf_TangentZone.cxx index 38e94636fe..7cff4065c8 100755 --- a/src/Intf/Intf_TangentZone.cxx +++ b/src/Intf/Intf_TangentZone.cxx @@ -321,8 +321,8 @@ Standard_Boolean Intf_TangentZone::HasCommonRange Other.ParamOnFirst(c1, d1); Other.ParamOnSecond(c2, d2); - if ((c1<=a1 && a1<=d1 || c1<=b1 && b1<=d1 || a1<=c1 && c1<=b1) && - (c2<=a2 && a2<=d2 || c2<=b2 && b2<=d2 || a2<=c2 && c2<=b2)) + if (((c1<=a1 && a1<=d1) || (c1<=b1 && b1<=d1) || (a1<=c1 && c1<=b1)) && + ((c2<=a2 && a2<=d2) || (c2<=b2 && b2<=d2) || (a2<=c2 && c2<=b2))) return Standard_True; return Standard_False; } diff --git a/src/LocOpe/LocOpe_Pipe.cxx b/src/LocOpe/LocOpe_Pipe.cxx index e565fdb0ff..c96ec7abfd 100755 --- a/src/LocOpe/LocOpe_Pipe.cxx +++ b/src/LocOpe/LocOpe_Pipe.cxx @@ -159,8 +159,8 @@ LocOpe_Pipe::LocOpe_Pipe(const TopoDS_Wire& Spine, } Plref = Handle(Geom_Plane)::DownCast(P)->Pln(); gp_Dir Dirref(Plref.Axis().Direction()); - if (Plref.Direct() && orref == TopAbs_REVERSED || - !Plref.Direct() && orref == TopAbs_FORWARD) { + if ((Plref.Direct() && orref == TopAbs_REVERSED) || + (!Plref.Direct() && orref == TopAbs_FORWARD)) { Dirref.Reverse(); } @@ -201,8 +201,8 @@ LocOpe_Pipe::LocOpe_Pipe(const TopoDS_Wire& Spine, } gp_Pln Pl = Handle(Geom_Plane)::DownCast(OtherP)->Pln(); gp_Dir Dirpl(Pl.Axis().Direction()); - if (Pl.Direct() && orrelat == TopAbs_REVERSED || - !Plref.Direct() && orrelat == TopAbs_FORWARD) { + if ((Pl.Direct() && orrelat == TopAbs_REVERSED) || + (!Plref.Direct() && orrelat == TopAbs_FORWARD)) { Dirpl.Reverse(); } if (Dirpl.Dot(Dirref) > 0) { diff --git a/src/LocOpe/LocOpe_SplitDrafts.cxx b/src/LocOpe/LocOpe_SplitDrafts.cxx index aa77905838..31677395f7 100755 --- a/src/LocOpe/LocOpe_SplitDrafts.cxx +++ b/src/LocOpe/LocOpe_SplitDrafts.cxx @@ -1350,8 +1350,8 @@ static Standard_Boolean NewPlane(const TopoDS_Face& F, if (!Modify) { Newpl = Plorig; NormalF = Newpl.Axis(); - if (Newpl.Direct() && F.Orientation() == TopAbs_REVERSED || - !Newpl.Direct() && F.Orientation() == TopAbs_FORWARD) { + if ((Newpl.Direct() && F.Orientation() == TopAbs_REVERSED) || + (!Newpl.Direct() && F.Orientation() == TopAbs_FORWARD)) { NormalF.Reverse(); } return Standard_True; diff --git a/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx b/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx index 0a3f178f0b..c4605adb90 100755 --- a/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx +++ b/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx @@ -170,8 +170,8 @@ void MeshVS_NodalColorPrsBuilder::Build ( const Handle(Prs3d_Presentation)& Prs, if ( !( DisplayMode & GetFlags() ) || !IsElement ) return; - if ( myUseTexture && ( !myTextureCoords.Extent() || !myTextureColorMap.Length() ) || - !myUseTexture && !myNodeColorMap.Extent() ) + if ( (myUseTexture && ( !myTextureCoords.Extent() || !myTextureColorMap.Length() )) || + (!myUseTexture && !myNodeColorMap.Extent()) ) return; // subtract the hidden elements and ids to exclude (to minimise allocated memory) diff --git a/src/PLib/PLib_DoubleJacobiPolynomial.cxx b/src/PLib/PLib_DoubleJacobiPolynomial.cxx index 89ddc7aa8a..9e3abd2e84 100755 --- a/src/PLib/PLib_DoubleJacobiPolynomial.cxx +++ b/src/PLib/PLib_DoubleJacobiPolynomial.cxx @@ -238,7 +238,7 @@ void PLib_DoubleJacobiPolynomial::ReduceDegree(const Standard_Integer Dimension, } } } - while (ErrU > ErrV && ErrV <= EpmsCut || ErrV >= ErrU && ErrU <= EpmsCut); + while ((ErrU > ErrV && ErrV <= EpmsCut) || (ErrV >= ErrU && ErrU <= EpmsCut)); //-------------------------- Recuperation des degres ------------------- diff --git a/src/PLib/PLib_JacobiPolynomial.cxx b/src/PLib/PLib_JacobiPolynomial.cxx index d5f52d180d..43bd78439e 100755 --- a/src/PLib/PLib_JacobiPolynomial.cxx +++ b/src/PLib/PLib_JacobiPolynomial.cxx @@ -62,11 +62,11 @@ const Standard_Integer UNDEFINED=-999; void PLib_JacobiPolynomial::Points(const Standard_Integer NbGaussPoints, TColStd_Array1OfReal& TabPoints) const { - if (NbGaussPoints != NDEG8 && NbGaussPoints != NDEG10 && + if ((NbGaussPoints != NDEG8 && NbGaussPoints != NDEG10 && NbGaussPoints != NDEG15 && NbGaussPoints != NDEG20 && NbGaussPoints != NDEG25 && NbGaussPoints != NDEG30 && NbGaussPoints != NDEG40 && NbGaussPoints != NDEG50 && - NbGaussPoints != NDEG61 || + NbGaussPoints != NDEG61) || NbGaussPoints <= myDegree) Standard_ConstructionError::Raise("Invalid NbGaussPoints"); diff --git a/src/Poly/Poly_MakeLoops.cxx b/src/Poly/Poly_MakeLoops.cxx index 632d35d670..afe7d8a449 100755 --- a/src/Poly/Poly_MakeLoops.cxx +++ b/src/Poly/Poly_MakeLoops.cxx @@ -424,8 +424,8 @@ void Poly_MakeLoops::markHangChain(Standard_Integer theNode, Standard_Integer th Standard_Integer aInd = myMapLink.FindIndex(aL); if (aInd == 0 || aInd == aIndex) continue; - if (isOut && aNode1 == aL.node1 || - !isOut && aNode1 == aL.node2) + if ((isOut && aNode1 == aL.node1) || + (!isOut && aNode1 == aL.node2)) aInd = -aInd; if (canLinkBeTaken(aInd)) nEdges++; @@ -451,8 +451,8 @@ void Poly_MakeLoops::markHangChain(Standard_Integer theNode, Standard_Integer th Standard_Integer aInd = myMapLink.FindIndex(aL); if (aInd == 0 || aInd == aIndex) continue; - if (isOut && aNode1 == aL.node2 || - !isOut && aNode1 == aL.node1) + if ((isOut && aNode1 == aL.node2) || + (!isOut && aNode1 == aL.node1)) aInd = -aInd; if (canLinkBeTaken(aInd)) { diff --git a/src/Poly/Poly_MakeLoops.hxx b/src/Poly/Poly_MakeLoops.hxx index 8d859b8eb8..8d362d749b 100755 --- a/src/Poly/Poly_MakeLoops.hxx +++ b/src/Poly/Poly_MakeLoops.hxx @@ -271,10 +271,8 @@ inline Standard_Integer HashCode(const Poly_MakeLoops::Link& theKey, inline Standard_Boolean IsEqual(const Poly_MakeLoops::Link& theKey1, const Poly_MakeLoops::Link& theKey2) { - return (theKey1.node1 == theKey2.node1 && - theKey1.node2 == theKey2.node2 || - theKey1.node1 == theKey2.node2 && - theKey1.node2 == theKey2.node1); + return ((theKey1.node1 == theKey2.node1 && theKey1.node2 == theKey2.node2) || + (theKey1.node1 == theKey2.node2 && theKey1.node2 == theKey2.node1)); } /** diff --git a/src/ProjLib/ProjLib_CompProjectedCurve.cxx b/src/ProjLib/ProjLib_CompProjectedCurve.cxx index 132068f5e5..2b17f30631 100755 --- a/src/ProjLib/ProjLib_CompProjectedCurve.cxx +++ b/src/ProjLib/ProjLib_CompProjectedCurve.cxx @@ -1386,8 +1386,8 @@ gp_Vec2d ProjLib_CompProjectedCurve::DN(const Standard_Real t, TUdisc.Append(mySequence->Value(i)->Value(j).X()); else if(Abs(Ur - CutPntsU(k)) <= myTolU) TUdisc.Append(mySequence->Value(i)->Value(j + 1).X()); - else if(Ul < CutPntsU(k) && CutPntsU(k) < Ur || - Ur < CutPntsU(k) && CutPntsU(k) < Ul) + else if((Ul < CutPntsU(k) && CutPntsU(k) < Ur) || + (Ur < CutPntsU(k) && CutPntsU(k) < Ul)) { Standard_Real V; V = (mySequence->Value(i)->Value(j).Z() @@ -1440,8 +1440,8 @@ gp_Vec2d ProjLib_CompProjectedCurve::DN(const Standard_Real t, TVdisc.Append(mySequence->Value(i)->Value(j).X()); else if (Abs(Vr - CutPntsV(k)) <= myTolV) TVdisc.Append(mySequence->Value(i)->Value(j + 1).X()); - else if(Vl < CutPntsV(k) && CutPntsV(k) < Vr || - Vr < CutPntsV(k) && CutPntsV(k) < Vl) + else if((Vl < CutPntsV(k) && CutPntsV(k) < Vr) || + (Vr < CutPntsV(k) && CutPntsV(k) < Vl)) { Standard_Real U; U = (mySequence->Value(i)->Value(j).Y() diff --git a/src/ProjLib/ProjLib_ComputeApprox.cxx b/src/ProjLib/ProjLib_ComputeApprox.cxx index e50adb312e..91f646b652 100755 --- a/src/ProjLib/ProjLib_ComputeApprox.cxx +++ b/src/ProjLib/ProjLib_ComputeApprox.cxx @@ -1123,7 +1123,7 @@ ProjLib_ComputeApprox::ProjLib_ComputeApprox number = (Standard_Integer) (Floor((newV-v)/(F.myV2-F.myV1))); dv -= number*(F.myV2-F.myV1); } - if (F.UCouture || F.VCouture && SType == GeomAbs_Sphere) + if (F.UCouture || (F.VCouture && SType == GeomAbs_Sphere)) { gp_Pnt2d P2d = F.Value( UFirst ); number = (Standard_Integer) (Floor((P2d.X()-u)/M_PI + Epsilon(M_PI))); diff --git a/src/Quantity/Quantity_Date.lxx b/src/Quantity/Quantity_Date.lxx index e34c9781ae..ae22349589 100755 --- a/src/Quantity/Quantity_Date.lxx +++ b/src/Quantity/Quantity_Date.lxx @@ -18,6 +18,6 @@ inline Standard_Boolean Quantity_Date::IsLeap (const Standard_Integer yy){ -return ( ( yy % 4 == 0 && yy % 100 != 0 || yy % 400 == 0) - ? Standard_True : Standard_False ); +return (((yy % 4 == 0) && (yy % 100 != 0)) || (yy % 400) == 0) + ? Standard_True : Standard_False; } diff --git a/src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx b/src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx index 3f5b51d98e..96582f981b 100755 --- a/src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx +++ b/src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx @@ -1244,8 +1244,8 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertCurve2d(Handle(Geom2d_Cu } } if (aCurve->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve)) || - aCurve->IsKind(STANDARD_TYPE(Geom2d_BezierCurve)) || - (aCurve->IsKind(STANDARD_TYPE(Geom2d_OffsetCurve))) && !IsOf ) { + aCurve->IsKind(STANDARD_TYPE(Geom2d_BezierCurve)) || + ((aCurve->IsKind(STANDARD_TYPE(Geom2d_OffsetCurve))) && !IsOf )) { Standard_Integer Deg=1; if (aCurve->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve))) { diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx index 0797018f92..40ad4f94b6 100755 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx @@ -684,7 +684,7 @@ void TopOpeBRepBuild_Builder::GFillPointTopologyPVS(const TopoDS_Shape& E, // xpu110398 cto 009 L2 : e6ou en v11 // xpu140898 USA60111 : e9ou (!=0) + e7ou(=0) Standard_Boolean INTEXT = (oriI == TopAbs_INTERNAL) && (TB == TopAbs_IN); - INTEXT = INTEXT || (oriI == TopAbs_EXTERNAL) && (TB == TopAbs_OUT); + INTEXT = INTEXT || ((oriI == TopAbs_EXTERNAL) && (TB == TopAbs_OUT)); kpbound = lesmemes && Eclosed && INTEXT; if ( kpbound ) { kpbound = vclo.IsSame(VIG); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx index 64e80d71a9..57a6ef08f0 100755 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx @@ -1331,8 +1331,9 @@ static Standard_Boolean AreFacesCoincideInArea (const TopoDS_Shape& theBaseFace, Standard_Real tolE = BRep_Tool::Tolerance(aE); if (tolE > maxDist) maxDist = tolE; if (aE.IsEqual(anEdge) || - aE.Orientation() != TopAbs_FORWARD && aE.Orientation() != TopAbs_REVERSED && - aE.IsSame(anEdge)) + (aE.Orientation() != TopAbs_FORWARD && + aE.Orientation() != TopAbs_REVERSED && + aE.IsSame(anEdge))) continue; // the same pcurve Handle(Geom2d_Curve) PC = BRep_Tool::CurveOnSurface(aE,aBaseFace,pf,pl); if (PC.IsNull()) { diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Section.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Section.cxx index db3902f2f6..70349f6460 100755 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Section.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Section.cxx @@ -305,23 +305,23 @@ void TopOpeBRepBuild_Builder::SplitSectionEdges() Standard_Integer nLESDspon = LESDspon.Extent(); if ( nLEspon != 0 && nLESDspon != 0 ) { - Standard_Boolean takeE = (rE == 1 && iESD != iRef || iE == iRef); - pE1 = takeE ? &E : &ESD; - pE2 = !takeE ? &E : &ESD; - plos1 = takeE ? &LEspon : &LESDspon; - plos2 = !takeE ? &LEspon : &LESDspon; + Standard_Boolean takeE = ((rE == 1 && iESD != iRef) || iE == iRef); + pE1 = takeE ? &E : &ESD; + pE2 = !takeE ? &E : &ESD; + plos1 = takeE ? &LEspon : &LESDspon; + plos2 = !takeE ? &LEspon : &LESDspon; } else if ( nLEspon != 0 ) { - pE1 = &E; - pE2 = &ESD; - plos1 = &LEspon; - plos2 = &LESDspon; + pE1 = &E; + pE2 = &ESD; + plos1 = &LEspon; + plos2 = &LESDspon; } else if ( nLESDspon != 0 ) { - pE1 = &ESD; - pE2 = &E; - plos1 = &LESDspon; - plos2 = &LEspon; + pE1 = &ESD; + pE2 = &E; + plos1 = &LESDspon; + plos2 = &LEspon; } if (pE1 == NULL || pE2 == NULL) continue; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_mkTondgE.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_mkTondgE.cxx index e72db5fc6e..d590fd6df5 100755 --- a/src/TopOpeBRepTool/TopOpeBRepTool_mkTondgE.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_mkTondgE.cxx @@ -356,10 +356,10 @@ Standard_Boolean TopOpeBRepTool_mkTondgE::MkTonE(const TopoDS_Edge& ei, Standard Standard_Real dot = tgi.Dot(xxri); if (Abs(dot) < FUN_tola()) { - if (!onfi && !onli || closedi) - { mkT = MKI12; return Standard_True; } - else - dot = tgi.Dot(tgin1di); + if ((!onfi && !onli) || closedi) + { mkT = MKI12; return Standard_True; } + else + dot = tgi.Dot(tgin1di); } Standard_Boolean keepang = (dot > 0); if (keepang) mkT = outin ? MKI1 : MKI2; diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 3454c1c0f6..e038eb4929 100755 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -154,7 +154,7 @@ static void SetDisplayConnection (const Handle(Aspect_DisplayConnection)& theDis #if defined(_WIN32) || (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) Aspect_Handle GetWindowHandle(const Handle(Aspect_Window)& theWindow) { - Aspect_Handle aWindowHandle = NULL; + Aspect_Handle aWindowHandle = (Aspect_Handle)NULL; #if defined(_WIN32) const Handle (WNT_Window) aWindow = Handle(WNT_Window)::DownCast (theWindow); if (!aWindow.IsNull()) diff --git a/src/XCAFPrs/XCAFPrs.cxx b/src/XCAFPrs/XCAFPrs.cxx index ae261540ac..f70d2dcf12 100755 --- a/src/XCAFPrs/XCAFPrs.cxx +++ b/src/XCAFPrs/XCAFPrs.cxx @@ -122,7 +122,7 @@ void XCAFPrs::CollectStyleSettings (const TDF_Label &L, for ( Standard_Integer iL = 1; iL <= LayNames->Length(); iL++) { if ( !LTool->IsVisible( LTool->FindLayer(LayNames->Value(iL)) ) ) InVisCount++; } - if ( InVisCount >0 && InVisCount == LayNames->Length() || + if ( (InVisCount >0 && InVisCount == LayNames->Length()) || !CTool->IsVisible(lab) ) { style.SetVisibility(Standard_False); }