mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
This commit is contained in:
@@ -517,7 +517,7 @@ void BndLib::Add( const gp_Cylinder& S,const Standard_Real UMin,
|
||||
void BndLib::Add( const gp_Cylinder& S,const Standard_Real VMin,
|
||||
const Standard_Real VMax,const Standard_Real Tol, Bnd_Box& B) {
|
||||
|
||||
BndLib::Add(S,0.,2.*PI,VMin,VMax,Tol,B);
|
||||
BndLib::Add(S,0.,2.*M_PI,VMin,VMax,Tol,B);
|
||||
}
|
||||
|
||||
void BndLib::Add(const gp_Cone& S,const Standard_Real UMin,
|
||||
@@ -594,7 +594,7 @@ void BndLib::Add(const gp_Cone& S,const Standard_Real UMin,
|
||||
void BndLib::Add( const gp_Cone& S,const Standard_Real VMin,
|
||||
const Standard_Real VMax,const Standard_Real Tol, Bnd_Box& B) {
|
||||
|
||||
BndLib::Add(S,0.,2.*PI,VMin,VMax,Tol,B);
|
||||
BndLib::Add(S,0.,2.*M_PI,VMin,VMax,Tol,B);
|
||||
}
|
||||
|
||||
void BndLib::Add(const gp_Sphere& S,const Standard_Real UMin,
|
||||
@@ -703,12 +703,12 @@ void BndLib::Add(const gp_Torus& S,const Standard_Real UMin,
|
||||
Standard_Integer Fi1;
|
||||
Standard_Integer Fi2;
|
||||
if (VMax<VMin) {
|
||||
Fi1 = (Standard_Integer )( VMax/(PI/4.));
|
||||
Fi2 = (Standard_Integer )( VMin/(PI/4.));
|
||||
Fi1 = (Standard_Integer )( VMax/(M_PI/4.));
|
||||
Fi2 = (Standard_Integer )( VMin/(M_PI/4.));
|
||||
}
|
||||
else {
|
||||
Fi1 = (Standard_Integer )( VMin/(PI/4.));
|
||||
Fi2 = (Standard_Integer )( VMax/(PI/4.));
|
||||
Fi1 = (Standard_Integer )( VMin/(M_PI/4.));
|
||||
Fi2 = (Standard_Integer )( VMax/(M_PI/4.));
|
||||
}
|
||||
Fi2++;
|
||||
|
||||
|
@@ -240,9 +240,9 @@ void BndLib_AddSurface::Add(const Adaptor3d_Surface& S,
|
||||
case GeomAbs_Sphere:
|
||||
{
|
||||
if (Abs(UMin) < Precision::Angular() &&
|
||||
Abs(UMax - 2.*PI) < Precision::Angular() &&
|
||||
Abs(VMin + PI/2.) < Precision::Angular() &&
|
||||
Abs(VMax - PI/2.) < Precision::Angular()) // a whole sphere
|
||||
Abs(UMax - 2.*M_PI) < Precision::Angular() &&
|
||||
Abs(VMin + M_PI/2.) < Precision::Angular() &&
|
||||
Abs(VMax - M_PI/2.) < Precision::Angular()) // a whole sphere
|
||||
BndLib::Add(S.Sphere(),Tol,B);
|
||||
else
|
||||
BndLib::Add(S.Sphere(),UMin,UMax,VMin,VMax,Tol,B);
|
||||
|
@@ -22,17 +22,17 @@ void Compute(const Standard_Real P1,
|
||||
}
|
||||
Standard_Real Delta =Abs(Teta2-Teta1);
|
||||
|
||||
if (Delta > 2. * PI) {
|
||||
if (Delta > 2. * M_PI) {
|
||||
Teta1 = 0.;
|
||||
Teta2 = 2. * PI;
|
||||
Teta2 = 2. * M_PI;
|
||||
}
|
||||
else {
|
||||
|
||||
if (Teta1 < 0.) {
|
||||
do { Teta1+=2.*PI;} while (Teta1< 0.);
|
||||
do { Teta1+=2.*M_PI;} while (Teta1< 0.);
|
||||
}
|
||||
else if (Teta1> 2.*PI) {
|
||||
do { Teta1-=2.*PI;} while (Teta1> 2.*PI);
|
||||
else if (Teta1> 2.*M_PI) {
|
||||
do { Teta1-=2.*M_PI;} while (Teta1> 2.*M_PI);
|
||||
}
|
||||
Teta2 = Teta1 + Delta;
|
||||
|
||||
@@ -46,7 +46,7 @@ void Compute(const Standard_Real P1,
|
||||
B.Add(Point(O +Ra*Cn2*Xd +Rb*Sn2*Yd));
|
||||
|
||||
Standard_Real Ram,Rbm;
|
||||
if (Delta > PI/8.) {
|
||||
if (Delta > M_PI/8.) {
|
||||
// Main radiuses to take into account only 8 points (/cos(Pi/8.))
|
||||
Ram=Ra/0.92387953251128674;
|
||||
Rbm=Rb/0.92387953251128674;
|
||||
@@ -61,7 +61,7 @@ void Compute(const Standard_Real P1,
|
||||
B.Add(Point(O +Ram*Cn2*Xd +Rbm*Sn2*Yd));
|
||||
|
||||
|
||||
// cos or sin PI/4.
|
||||
// cos or sin M_PI/4.
|
||||
#define PI4 0.70710678118654746
|
||||
|
||||
// 8 points of the polygon
|
||||
@@ -74,8 +74,8 @@ void Compute(const Standard_Real P1,
|
||||
#define addP6 B.Add(Point(O -Rbm*Yd));
|
||||
#define addP7 B.Add(Point(O +Ram*PI4*Xd -Rbm*PI4*Yd))
|
||||
|
||||
Standard_Integer deb = (Standard_Integer )( Teta1/(PI/4.));
|
||||
Standard_Integer fin = (Standard_Integer )( Teta2/(PI/4.));
|
||||
Standard_Integer deb = (Standard_Integer )( Teta1/(M_PI/4.));
|
||||
Standard_Integer fin = (Standard_Integer )( Teta2/(M_PI/4.));
|
||||
deb++;
|
||||
|
||||
if (deb>fin) return;
|
||||
|
Reference in New Issue
Block a user