1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)

This commit is contained in:
DBV
2011-12-16 08:50:03 +00:00
committed by bugmaster
parent bc650d4170
commit c6541a0c86
438 changed files with 2142 additions and 2188 deletions

View File

@@ -395,7 +395,7 @@ Standard_Real ProjectPointOnSurf::LowerDistance() const
//
aRealEpsilon=RealEpsilon();
aNul=0.;
aPeriod=PI+PI;
aPeriod=M_PI+M_PI;
//
aNbParts=myLConstruct.NbParts();
//
@@ -435,12 +435,12 @@ Standard_Real ProjectPointOnSurf::LowerDistance() const
slineS2.Append(H1);
}
//==============================================
} //if (Abs(fprm) > RealEpsilon() || Abs(lprm-2.*PI) > RealEpsilon())
} //if (Abs(fprm) > RealEpsilon() || Abs(lprm-2.*M_PI) > RealEpsilon())
//
else {// on regarde si on garde
//
if (aNbParts==1) {
if (Abs(fprm) < RealEpsilon() && Abs(lprm-2.*PI) < RealEpsilon()) {
if (Abs(fprm) < RealEpsilon() && Abs(lprm-2.*M_PI) < RealEpsilon()) {
Handle(Geom_TrimmedCurve) aTC3D=new Geom_TrimmedCurve(newc,fprm,lprm);
//
sline.Append(aTC3D);
@@ -476,7 +476,7 @@ Standard_Real ProjectPointOnSurf::LowerDistance() const
//
Standard_Real aTwoPIdiv17, u1, v1, u2, v2, TolX;
//
aTwoPIdiv17=2.*PI/17.;
aTwoPIdiv17=2.*M_PI/17.;
//
for (j=0; j<=17; j++) {
gp_Pnt ptref (newc->Value (j*aTwoPIdiv17));
@@ -1518,7 +1518,7 @@ Standard_Boolean DecompositionOfWLine(const Handle(IntPatch_WLine)& theWLine,
else {
Standard_Real anAngle = aNewVec.Angle(aVecOld);
if((fabs(anAngle) < (Standard_PI * 0.25)) && (aNewVec.Dot(aVecOld) > 0.)) {
if((fabs(anAngle) < (M_PI * 0.25)) && (aNewVec.Dot(aVecOld) > 0.)) {
if(bCheckAngle1) {
Standard_Real U1, U2, V1, V2;

View File

@@ -88,28 +88,28 @@ static void Recadre(const Handle(GeomAdaptor_HSurface)& myHS1,
}
}
if(myHS1IsUPeriodic) {
const Standard_Real lmf = PI+PI; //-- myHS1->UPeriod();
const Standard_Real lmf = M_PI+M_PI; //-- myHS1->UPeriod();
const Standard_Real f = myHS1->FirstUParameter();
const Standard_Real l = myHS1->LastUParameter();
while(u1 < f) { u1+=lmf; }
while(u1 > l) { u1-=lmf; }
}
if(myHS1IsVPeriodic) {
const Standard_Real lmf = PI+PI; //-- myHS1->VPeriod();
const Standard_Real lmf = M_PI+M_PI; //-- myHS1->VPeriod();
const Standard_Real f = myHS1->FirstVParameter();
const Standard_Real l = myHS1->LastVParameter();
while(v1 < f) { v1+=lmf; }
while(v1 > l) { v1-=lmf; }
}
if(myHS2IsUPeriodic) {
const Standard_Real lmf = PI+PI; //-- myHS2->UPeriod();
const Standard_Real lmf = M_PI+M_PI; //-- myHS2->UPeriod();
const Standard_Real f = myHS2->FirstUParameter();
const Standard_Real l = myHS2->LastUParameter();
while(u2 < f) { u2+=lmf; }
while(u2 > l) { u2-=lmf; }
}
if(myHS2IsVPeriodic) {
const Standard_Real lmf = PI+PI; //-- myHS2->VPeriod();
const Standard_Real lmf = M_PI+M_PI; //-- myHS2->VPeriod();
const Standard_Real f = myHS2->FirstVParameter();
const Standard_Real l = myHS2->LastVParameter();
while(v2 < f) { v2+=lmf; }
@@ -260,12 +260,12 @@ void GeomInt_LineConstructor::Perform(const Handle(IntPatch_Line)& L)
if(typl == IntPatch_Circle || typl == IntPatch_Ellipse)
{
firstp = GeomInt_LineTool::Vertex(L,nbvtx).ParameterOnLine();
lastp = PI + PI + GeomInt_LineTool::Vertex(L,1).ParameterOnLine();
lastp = M_PI + M_PI + GeomInt_LineTool::Vertex(L,1).ParameterOnLine();
const Standard_Real cadrinf = GeomInt_LineTool::FirstParameter(L);
const Standard_Real cadrsup = GeomInt_LineTool::LastParameter(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())
@@ -605,7 +605,7 @@ void GeomInt_LineConstructor::PeriodicLine (const Handle(IntPatch_Line)& L) cons
}
}
if (changevtx) {
thevtx.SetParameter(prm + 2.*PI);
thevtx.SetParameter(prm + 2.*M_PI);
glin->Replace(i,thevtx);
}
}

View File

@@ -145,7 +145,7 @@ Standard_Real GeomInt_LineTool::LastParameter (const Handle(IntPatch_Line)& L)
return Precision::Infinite();
case IntPatch_Circle:
case IntPatch_Ellipse:
return 2.*PI;
return 2.*M_PI;
default: break;
}
}