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:
@@ -473,21 +473,21 @@
|
||||
|| surf->GetType()==GeomAbs_Torus
|
||||
|| surf->GetType()==GeomAbs_Sphere
|
||||
|| surf->GetType()==GeomAbs_SurfaceOfRevolution) {
|
||||
Standard_Real uuu=PI+PI-(Umax-Umin);
|
||||
Standard_Real uuu=M_PI+M_PI-(Umax-Umin);
|
||||
if(uuu<0) uuu=0;
|
||||
U1 = Umin-uuu*0.5;
|
||||
U2 = U1+PI+PI;
|
||||
U2 = U1+M_PI+M_PI;
|
||||
}
|
||||
else {
|
||||
U1=U2=0.0;
|
||||
}
|
||||
|
||||
if(surf->GetType()==GeomAbs_Torus) {
|
||||
Standard_Real uuu=PI+PI-(Vmax-Vmin);
|
||||
Standard_Real uuu=M_PI+M_PI-(Vmax-Vmin);
|
||||
if(uuu<0) uuu=0;
|
||||
|
||||
V1 = Vmin-uuu*0.5;
|
||||
V2 = V1+PI+PI;
|
||||
V2 = V1+M_PI+M_PI;
|
||||
}
|
||||
else {
|
||||
V1=V2=0.0;
|
||||
|
@@ -756,8 +756,8 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
|
||||
Standard_Real eps = 1.e-14;
|
||||
if(!aPlDir.IsEqual(aCirDir, eps)) {
|
||||
Standard_Integer aNbP = 11;
|
||||
Standard_Real dt = 2.*PI / (aNbP - 1), t;
|
||||
for(t = 0.; t < 2.*PI; t += dt) {
|
||||
Standard_Real dt = 2.*M_PI / (aNbP - 1), t;
|
||||
for(t = 0.; t < 2.*M_PI; t += dt) {
|
||||
Standard_Real d = aPln.Distance(ElCLib::Value(t, aCir));
|
||||
if(myTolReached3d < d) myTolReached3d = d;
|
||||
}
|
||||
@@ -1134,7 +1134,7 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
|
||||
TColStd_SequenceOfReal aSeqFprm, aSeqLprm;
|
||||
|
||||
aNul=0.;
|
||||
aPeriod=PI+PI;
|
||||
aPeriod=M_PI+M_PI;
|
||||
|
||||
for (i=1; i<=aNbParts; i++) {
|
||||
myLConstruct.Part(i, fprm, lprm);
|
||||
@@ -1201,7 +1201,7 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
|
||||
lprm=aSeqLprm(i);
|
||||
//
|
||||
Standard_Real aRealEpsilon=RealEpsilon();
|
||||
if (Abs(fprm) > aRealEpsilon || Abs(lprm-2.*PI) > aRealEpsilon) {
|
||||
if (Abs(fprm) > aRealEpsilon || Abs(lprm-2.*M_PI) > aRealEpsilon) {
|
||||
//==============================================
|
||||
////
|
||||
IntTools_Curve aCurve;
|
||||
@@ -1248,14 +1248,14 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
|
||||
}
|
||||
mySeqOfCurve.Append(aCurve);
|
||||
//==============================================
|
||||
} //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) <= aRealEpsilon && Abs(lprm-2.*PI) <= aRealEpsilon) {
|
||||
// if (Abs(fprm) < RealEpsilon() && Abs(lprm-2.*M_PI) < RealEpsilon()) {
|
||||
if (Abs(fprm) <= aRealEpsilon && Abs(lprm-2.*M_PI) <= aRealEpsilon) {
|
||||
IntTools_Curve aCurve;
|
||||
Handle(Geom_TrimmedCurve) aTC3D=new Geom_TrimmedCurve(newc,fprm,lprm);
|
||||
aCurve.SetCurve(aTC3D);
|
||||
@@ -1296,7 +1296,7 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts)
|
||||
//
|
||||
Standard_Real aTwoPIdiv17, u1, v1, u2, v2, Tol;
|
||||
|
||||
aTwoPIdiv17=2.*PI/17.;
|
||||
aTwoPIdiv17=2.*M_PI/17.;
|
||||
|
||||
for (j=0; j<=17; j++) {
|
||||
gp_Pnt ptref (newc->Value (j*aTwoPIdiv17));
|
||||
@@ -3125,7 +3125,7 @@ Standard_Integer ComputeTangentZones( const Handle(GeomAdaptor_HSurface)& theSur
|
||||
|
||||
GeomAdaptor_Curve aC1( new Geom_Circle(aCircle1) );
|
||||
GeomAdaptor_Curve aC2( new Geom_Circle(aCircle2) );
|
||||
Extrema_ExtCC anExtrema(aC1, aC2, 0, 2.*Standard_PI, 0, 2.*Standard_PI,
|
||||
Extrema_ExtCC anExtrema(aC1, aC2, 0, 2. * M_PI, 0, 2. * M_PI,
|
||||
Precision::PConfusion(), Precision::PConfusion());
|
||||
|
||||
if ( anExtrema.IsDone() ) {
|
||||
@@ -3170,7 +3170,7 @@ Standard_Integer ComputeTangentZones( const Handle(GeomAdaptor_HSurface)& theSur
|
||||
aSeqResultRad.Append( aCriteria );
|
||||
|
||||
// torus is u and v periodic
|
||||
const Standard_Real twoPI = Standard_PI + Standard_PI;
|
||||
const Standard_Real twoPI = M_PI + M_PI;
|
||||
Standard_Real arr1tmp[2] = {pr1.X(), pr1.Y()};
|
||||
Standard_Real arr2tmp[2] = {pr2.X(), pr2.Y()};
|
||||
|
||||
@@ -3622,7 +3622,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;
|
||||
|
@@ -93,28 +93,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; }
|
||||
@@ -340,12 +340,12 @@ void IntTools_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())
|
||||
@@ -747,7 +747,7 @@ void IntTools_LineConstructor::PeriodicLine (const Handle(IntPatch_Line)& L) con
|
||||
}
|
||||
}
|
||||
if (changevtx) {
|
||||
thevtx.SetParameter(prm + 2.*PI);
|
||||
thevtx.SetParameter(prm + 2.*M_PI);
|
||||
glin->Replace(i,thevtx);
|
||||
}
|
||||
}
|
||||
|
@@ -270,7 +270,7 @@ static
|
||||
Standard_Real IntTools_Tools::IntermediatePoint (const Standard_Real aFirst,
|
||||
const Standard_Real aLast)
|
||||
{
|
||||
//define parameter division number as 10*e^(-PI) = 0.43213918
|
||||
//define parameter division number as 10*e^(-M_PI) = 0.43213918
|
||||
const Standard_Real PAR_T = 0.43213918;
|
||||
Standard_Real aParm;
|
||||
aParm=(1.-PAR_T)*aFirst + PAR_T*aLast;
|
||||
|
@@ -104,7 +104,7 @@ void IntTools_TopolTool::ComputeSamplePoints()
|
||||
break;
|
||||
case GeomAbs_Cylinder: {
|
||||
Standard_Real aRadius = myS->Cylinder().Radius();
|
||||
Standard_Real aMaxAngle = Standard_PI * 0.5;
|
||||
Standard_Real aMaxAngle = M_PI * 0.5;
|
||||
Standard_Real aDeflection = 1.e-02;
|
||||
|
||||
if(aRadius > aDeflection) {
|
||||
@@ -133,7 +133,7 @@ void IntTools_TopolTool::ComputeSamplePoints()
|
||||
|
||||
if(aRadius < aCircle.Radius())
|
||||
aRadius = aCircle.Radius();
|
||||
Standard_Real aMaxAngle = Standard_PI * 0.5;
|
||||
Standard_Real aMaxAngle = M_PI * 0.5;
|
||||
Standard_Real aDeflection = 1.e-02;
|
||||
|
||||
if(aRadius > aDeflection) {
|
||||
@@ -177,7 +177,7 @@ void IntTools_TopolTool::ComputeSamplePoints()
|
||||
aRadius1 = aSphere.Radius();
|
||||
aRadius2 = aSphere.Radius();
|
||||
}
|
||||
Standard_Real aMaxAngle = Standard_PI * 0.5;
|
||||
Standard_Real aMaxAngle = M_PI * 0.5;
|
||||
Standard_Real aDeflection = 1.e-02;
|
||||
|
||||
if(aRadius1 > aDeflection) {
|
||||
@@ -187,7 +187,7 @@ void IntTools_TopolTool::ComputeSamplePoints()
|
||||
if(aMaxAngle > Precision::Angular()) {
|
||||
nbsu = Standard_Integer((usup - uinf) / aMaxAngle);
|
||||
}
|
||||
aMaxAngle = Standard_PI * 0.5;
|
||||
aMaxAngle = M_PI * 0.5;
|
||||
|
||||
if(aRadius2 > aDeflection) {
|
||||
aMaxAngle = ACos(1. - aDeflection / aRadius2) * 2.;
|
||||
|
Reference in New Issue
Block a user