0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
[occt.git] / src / ChFi3d / ChFi3d_Builder_0.cxx
index c517814..5c67159 100755 (executable)
@@ -752,7 +752,7 @@ Handle(Geom_BezierCurve) ChFi3d_Spine(const gp_Pnt&       pd,
                                       const Standard_Real R)
 {     
   TColgp_Array1OfPnt pol(1,4);
-  const Standard_Real fac = 0.5 * tan((PI-vd.Angle(vf)) * 0.5);
+  const Standard_Real fac = 0.5 * tan((M_PI-vd.Angle(vf)) * 0.5);
   pol(1) = pd;
   vd.Multiply(fac*R);
   pol(2).SetCoord(pd.X()+vd.X(),pd.Y()+vd.Y(),pd.Z()+vd.Z());
@@ -3099,11 +3099,11 @@ Standard_Boolean ChFi3d_ComputeCurves(Handle(Adaptor3d_HSurface)&   S1,
          Ufin = -Ufin;
        }
        else{
-         Udeb = 2*PI - Udeb;
-         Ufin = 2*PI - Ufin;
+         Udeb = 2*M_PI - Udeb;
+         Ufin = 2*M_PI - Ufin;
        }
       }
-      if(!c1line) ElCLib::AdjustPeriodic(0.,2*PI,Precision::Angular(),Udeb,Ufin);
+      if(!c1line) ElCLib::AdjustPeriodic(0.,2*M_PI,Precision::Angular(),Udeb,Ufin);
       Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve();
       HC->ChangeCurve().Load(C3d,Udeb,Ufin);
       ChFi3d_ProjectPCurv(HC,S1,Pc1,tol3d,tolr1);
@@ -3629,7 +3629,7 @@ Handle(GeomAdaptor_HSurface) ChFi3d_BoundSurf(TopOpeBRepDS_DataStructure&    DSt
   //In the case of a torus or cone, it is not necessary that the bounds create a surface with period more than 2PI. 
   else if (styp == GeomAbs_Torus ||
           styp == GeomAbs_Cone) {
-    Du = Min(PI-0.5*Du,0.1*Du);
+    Du = Min(M_PI-0.5*Du,0.1*Du);
     Dv = 0.;
     S1.Load(DStr.Surface(Fd1->Surf()).Surface(),
            mu-Du,Mu+Du,mv,Mv);
@@ -4126,7 +4126,7 @@ Standard_EXPORT
   //
   caredeb = 0;
   carefin = 0;
-  Angle = PI*0.75;
+  Angle = M_PI*0.75;
   LocalWL = WL;
   LocalWF = WF;
   if (!ES.IsPeriodic() && !PDeb.IsEqual(BSpline->Pole(1), tol) ) {
@@ -4748,7 +4748,7 @@ Standard_Boolean ChFi3d_IsSmooth( const Handle(Geom_Curve)& C )
            LProp.CentreOfCurvature(P2);
            gp_Vec Vec(P1, P2);
            Standard_Real Angle = PrevVec.Angle( Vec );
-           if (Angle > PI/3.)
+           if (Angle > M_PI/3.)
              return Standard_False;
            Standard_Real Ratio = Vec.Magnitude() / PrevVec.Magnitude();
            if (Ratio < 1.)