0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
[occt.git] / src / IntPatch / IntPatch_LineConstructor.cxx
index c152abc..b24e020 100755 (executable)
@@ -88,28 +88,28 @@ static void Recadre(const Handle(Adaptor3d_HSurface)& myHS1,
      }
   }
   if(myHS1IsUPeriodic) {
-    lmf = PI+PI; //-- myHS1->UPeriod();
+    lmf = M_PI+M_PI; //-- myHS1->UPeriod();
     f = myHS1->FirstUParameter();
     l = myHS1->LastUParameter();
     while(u1 < f) { u1+=lmf; } 
     while(u1 > l) { u1-=lmf; }
   }
   if(myHS1IsVPeriodic) {
-    lmf = PI+PI; //-- myHS1->VPeriod(); 
+    lmf = M_PI+M_PI; //-- myHS1->VPeriod(); 
     f = myHS1->FirstVParameter();
     l = myHS1->LastVParameter();
     while(v1 < f) { v1+=lmf; } 
     while(v1 > l) { v1-=lmf; }
   }
   if(myHS2IsUPeriodic) { 
-    lmf = PI+PI; //-- myHS2->UPeriod();
+    lmf = M_PI+M_PI; //-- myHS2->UPeriod();
     f = myHS2->FirstUParameter();
     l = myHS2->LastUParameter();
     while(u2 < f) { u2+=lmf; } 
     while(u2 > l) { u2-=lmf; }
   }
   if(myHS2IsVPeriodic) { 
-    lmf = PI+PI; //-- myHS2->VPeriod();
+    lmf = M_PI+M_PI; //-- myHS2->VPeriod();
     f = myHS2->FirstVParameter();
     l = myHS2->LastVParameter();
     while(v2 < f) { v2+=lmf; } 
@@ -318,7 +318,7 @@ static Standard_Real LocalLastParameter (const Handle(IntPatch_Line)& L)
 
        case IntPatch_Circle:
        case IntPatch_Ellipse:
-         lastp = PI+PI;
+         lastp = M_PI+M_PI;
          break;
        default:
          {
@@ -694,9 +694,9 @@ static void AddLine(const Handle(IntPatch_Line)& L,
       if(i!=j) { 
        if ((typl == IntPatch_Circle || typl == IntPatch_Ellipse) && i>j) {
          IntPatch_Point Vtx=GLine->Vertex(j);
-         Vtx.SetParameter(GLine->Vertex(j).ParameterOnLine()+PI+PI);
+         Vtx.SetParameter(GLine->Vertex(j).ParameterOnLine()+M_PI+M_PI);
          glig->AddVertex(Vtx);
-         IndexLastVertex+=AppendSameVertexG(glig,GLine,j,PI+PI,TabIndex);
+         IndexLastVertex+=AppendSameVertexG(glig,GLine,j,M_PI+M_PI,TabIndex);
        }
        else {
          glig->AddVertex(GLine->Vertex(j));
@@ -1468,12 +1468,12 @@ void IntPatch_LineConstructor::Perform(const IntPatch_SequenceOfLine& slinref,
     }
     if(typl == IntPatch_Circle || typl == IntPatch_Ellipse) { 
       firstp = GLine->Vertex(nbvtx).ParameterOnLine();
-      lastp  = PI + PI + GLine->Vertex(1).ParameterOnLine();
+      lastp  = M_PI + M_PI + GLine->Vertex(1).ParameterOnLine();
       Standard_Real cadrinf = LocalFirstParameter(L);
       Standard_Real cadrsup = LocalLastParameter(L);
       Standard_Real acadr = (firstp+lastp)*0.5;
-      while(acadr < cadrinf) { acadr+=PI+PI; }
-      while(acadr > cadrsup) { acadr-=PI+PI; } 
+      while(acadr < cadrinf) { acadr+=M_PI+M_PI; }
+      while(acadr > cadrsup) { acadr-=M_PI+M_PI; } 
       if(acadr>=cadrinf && acadr<=cadrsup) { 
        if(Abs(firstp-lastp)>Precision::PConfusion()) {
          intrvtested = Standard_True;