1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +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

@@ -287,7 +287,7 @@ Standard_Real IntCurve_IConicTool::FindParameter(const gp_Pnt2d& P) const {
case GeomAbs_Circle:
Param=ElCLib::CircleParameter(Axis,P);
if(Param<0.0) { Param+=PI+PI; }
if(Param<0.0) { Param+=M_PI+M_PI; }
break;
case GeomAbs_Ellipse: {
@@ -295,7 +295,7 @@ Standard_Real IntCurve_IConicTool::FindParameter(const gp_Pnt2d& P) const {
,Elips_a
,Elips_b
,P);
if (Param < 0.0) { Param+=PI+PI; }
if (Param < 0.0) { Param+=M_PI+M_PI; }
break;
}

View File

@@ -196,7 +196,7 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& L,
Inter.SetReversedParameters(ReversedParameters());
if(! DE.IsClosed()) {
IntRes2d_Domain D(DE);
D.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+PI+PI);
D.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+M_PI+M_PI);
Inter.Perform(ITool,DL,PCurve,D,TolConf,Tol);
}
else {
@@ -298,7 +298,7 @@ void IntCurve_IntConicConic::Perform(const gp_Circ2d& C,
IntRes2d_Domain D(DC);
if(! DC.IsClosed()) {
D.SetEquivalentParameters(DC.FirstParameter(),DC.FirstParameter()+PI+PI);
D.SetEquivalentParameters(DC.FirstParameter(),DC.FirstParameter()+M_PI+M_PI);
}
Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol;
@@ -374,10 +374,10 @@ void IntCurve_IntConicConic::Perform(const gp_Circ2d& C,
if(! DC.IsClosed()) {
IntRes2d_Domain D1(DC);
D1.SetEquivalentParameters(DC.FirstParameter(),DC.FirstParameter()+PI+PI);
D1.SetEquivalentParameters(DC.FirstParameter(),DC.FirstParameter()+M_PI+M_PI);
if(! DE.IsClosed()) {
IntRes2d_Domain D2(DE);
D2.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+PI+PI);
D2.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+M_PI+M_PI);
Inter.Perform(ITool,D1,PCurve,D2,TolConf,Tol);
}
else {
@@ -387,7 +387,7 @@ void IntCurve_IntConicConic::Perform(const gp_Circ2d& C,
else {
if(! DE.IsClosed()) {
IntRes2d_Domain D2(DE);
D2.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+PI+PI);
D2.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+M_PI+M_PI);
Inter.Perform(ITool,DC,PCurve,D2,TolConf,Tol);
}
else {
@@ -416,7 +416,7 @@ void IntCurve_IntConicConic::Perform(const gp_Circ2d& C,
IntRes2d_Domain D(DC);
if(! DC.IsClosed()) {
D.SetEquivalentParameters(DC.FirstParameter(),DC.FirstParameter()+PI+PI);
D.SetEquivalentParameters(DC.FirstParameter(),DC.FirstParameter()+M_PI+M_PI);
}
Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol;
gp_Pnt2d Pntinf,Pntsup;
@@ -562,7 +562,7 @@ void IntCurve_IntConicConic::Perform(const gp_Elips2d& E,
IntRes2d_Domain D(DE);
if(! DE.IsClosed()) {
D.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+PI+PI);
D.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+M_PI+M_PI);
}
//-- cout<<" Parab Elips "<<endl;
@@ -720,10 +720,10 @@ void IntCurve_IntConicConic::Perform(const gp_Elips2d& E1,
if(! DE1.IsClosed()) {
IntRes2d_Domain D1(DE1);
D1.SetEquivalentParameters(DE1.FirstParameter(),DE1.FirstParameter()+PI+PI);
D1.SetEquivalentParameters(DE1.FirstParameter(),DE1.FirstParameter()+M_PI+M_PI);
if(! DE2.IsClosed()) {
IntRes2d_Domain D2(DE2);
D2.SetEquivalentParameters(DE2.FirstParameter(),DE2.FirstParameter()+PI+PI);
D2.SetEquivalentParameters(DE2.FirstParameter(),DE2.FirstParameter()+M_PI+M_PI);
Inter.Perform(ITool,D1,PCurve,D2,TolConf,Tol);
}
else {
@@ -733,7 +733,7 @@ void IntCurve_IntConicConic::Perform(const gp_Elips2d& E1,
else {
if(! DE2.IsClosed()) {
IntRes2d_Domain D2(DE2);
D2.SetEquivalentParameters(DE2.FirstParameter(),DE2.FirstParameter()+PI+PI);
D2.SetEquivalentParameters(DE2.FirstParameter(),DE2.FirstParameter()+M_PI+M_PI);
Inter.Perform(ITool,DE1,PCurve,D2,TolConf,Tol);
}
else {
@@ -762,7 +762,7 @@ void IntCurve_IntConicConic::Perform(const gp_Elips2d& E,
IntRes2d_Domain DEModif(DE);
if(! DE.IsClosed()) {
DEModif.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+PI+PI);
DEModif.SetEquivalentParameters(DE.FirstParameter(),DE.FirstParameter()+M_PI+M_PI);
}
Standard_Real binf = Precision::Infinite(),bsup = -Precision::Infinite(),maxtol;

View File

@@ -30,7 +30,7 @@ Standard_Boolean AffichageGraph=Standard_True;
#define TOLERANCE_ANGULAIRE 1.e-15 //the reason is at least to make an accordance between transition and position computation.
//modified by NIZHNY-MKK Tue Feb 15 10:53:45 2000.END
const Standard_Real PIsur2 = 0.5*PI;
const Standard_Real PIsur2 = 0.5*M_PI;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IntRes2d_Position FindPositionLL(Standard_Real&,const IntRes2d_Domain&);
@@ -69,7 +69,7 @@ void ProjectOnC2AndIntersectWithC2Domain(const gp_Circ2d& Circle1
PeriodicInterval C2Inter(C2inf,C2sup);
if(!IdentCircles) {
if(C2Inter.Length() > PI)
if(C2Inter.Length() > M_PI)
C2Inter.Complement();
}
else {
@@ -102,7 +102,7 @@ void ProjectOnC2AndIntersectWithC2Domain(const gp_Circ2d& Circle1
SolutionC1[NbSolTotal]=PeriodicInterval(C1inf,C1sup);
if(!IdentCircles) {
if(SolutionC1[NbSolTotal].Length() > PI)
if(SolutionC1[NbSolTotal].Length() > M_PI)
SolutionC1[NbSolTotal].Complement();
}
else {
@@ -282,12 +282,12 @@ void CircleCircleGeometricIntersection(const gp_Circ2d& C1
//-- (permet de ne pas gerer trop de cas differents)
C1_Res1.SetValues(C1_binf1,C1_bsup1);
if(C1_Res1.Length() > PI) C1_Res1.Complement();
if(C1_Res1.Length() > M_PI) C1_Res1.Complement();
if(nbsol==2) {
C1_binf2+=dAngle1; C1_bsup2+=dAngle1;
C1_Res2.SetValues(C1_binf2,C1_bsup2);
if(C1_Res2.Length() > PI) C1_Res2.Complement();
if(C1_Res2.Length() > M_PI) C1_Res2.Complement();
}
else {
C1_Res2.SetNull();
@@ -371,7 +371,7 @@ void ProjectOnLAndIntersectWithLDomain(const gp_Circ2d& Circle
#endif
if(Cinf>=Csup) { Cinf = CDomainAndRes.Binf; Csup = CDomainAndRes.Bsup; }
CircleSolution[NbSolTotal]=PeriodicInterval(Cinf,Csup);
if(CircleSolution[NbSolTotal].Length() > PI)
if(CircleSolution[NbSolTotal].Length() > M_PI)
CircleSolution[NbSolTotal].Complement();
LineSolution[NbSolTotal]=LInterAndDomain;
@@ -514,7 +514,7 @@ void LineCircleGeometricIntersection(const gp_Lin2d& Line,
CInt1.SetValues(binf1,bsup1);
if(CInt1.Length() > PI) CInt1.Complement();
if(CInt1.Length() > M_PI) CInt1.Complement();
if(nbsol==2) {
@@ -527,7 +527,7 @@ void LineCircleGeometricIntersection(const gp_Lin2d& Line,
}
CInt2.SetValues(binf2,bsup2);
if(CInt2.Length() > PI) CInt2.Complement();
if(CInt2.Length() > M_PI) CInt2.Complement();
}
// Modified by Sergey KHROMOV - Thu Oct 26 17:51:05 2000 Begin
else {
@@ -537,9 +537,9 @@ void LineCircleGeometricIntersection(const gp_Lin2d& Line,
bsup2 = PIpPI;
binf1 = 0.;
CInt1.SetValues(binf1,CInt1.Bsup - PIpPI);
if(CInt1.Length() > PI) CInt1.Complement();
if(CInt1.Length() > M_PI) CInt1.Complement();
CInt2.SetValues(binf2,bsup2);
if(CInt2.Length() > PI) CInt2.Complement();
if(CInt2.Length() > M_PI) CInt2.Complement();
}
}
// Modified by Sergey KHROMOV - Thu Oct 26 17:51:13 2000 End

View File

@@ -20,7 +20,7 @@
#include <gp.hxx>
static Standard_Real PIpPI = Standard_PI+Standard_PI;
static Standard_Real PIpPI = M_PI + M_PI;
//======================================================================
//========== P R O T O T Y P E S ============

View File

@@ -17,7 +17,7 @@ IntCurve_IntConicCurveGen::IntCurve_IntConicCurveGen (const gp_Circ2d& C,
const Standard_Real Tol) {
if(!D1.IsClosed()) {
IntRes2d_Domain D(D1);
D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+PI+PI);
D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+M_PI+M_PI);
Perform(IntCurve_IConicTool(C),D,PCurve,D2,TolConf,Tol);
//-- Standard_ConstructionError::Raise("Domaine incorrect");
}
@@ -34,7 +34,7 @@ IntCurve_IntConicCurveGen::IntCurve_IntConicCurveGen (const gp_Elips2d& E,
const Standard_Real Tol) {
if(!D1.IsClosed()) {
IntRes2d_Domain D(D1);
D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+PI+PI);
D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+M_PI+M_PI);
Perform(IntCurve_IConicTool(E),D,PCurve,D2,TolConf,Tol);
//-- Standard_ConstructionError::Raise("Domaine incorrect");
}

View File

@@ -50,7 +50,7 @@ inline void IntCurve_IntConicCurveGen::Perform (const gp_Circ2d& C,
const Standard_Real Tol) {
if(!D1.IsClosed()) {
IntRes2d_Domain D(D1);
D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+PI+PI);
D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+M_PI+M_PI);
Perform(IntCurve_IConicTool(C),D,PCurve,D2,TolConf,Tol);
//-- Standard_ConstructionError::Raise("Domaine incorrect");
}
@@ -67,7 +67,7 @@ inline void IntCurve_IntConicCurveGen::Perform (const gp_Elips2d& E,
const Standard_Real Tol) {
if(!D1.IsClosed()) {
IntRes2d_Domain D(D1);
D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+PI+PI);
D.SetEquivalentParameters(D1.FirstParameter(),D1.FirstParameter()+M_PI+M_PI);
Perform(IntCurve_IConicTool(E),D,PCurve,D2,TolConf,Tol);
}
else {

View File

@@ -125,7 +125,7 @@ IntRes2d_Domain IntCurve_IntCurveCurveGen::ComputeDomain(const TheCurve& C1,
gp_Pnt2d P2(TheCurveTool::Value(C1,lastparameter));
D1.SetValues(P1,firstparameter ,TolDomain,
P2,lastparameter ,TolDomain);
D1.SetEquivalentParameters(firstparameter,firstparameter+PI+PI);
D1.SetEquivalentParameters(firstparameter,firstparameter+M_PI+M_PI);
break;
}
default: {

View File

@@ -32,7 +32,7 @@ Standard_Real IntCurve_ProjectOnPConicTool::FindParameter
case GeomAbs_Circle:
Param=ElCLib::CircleParameter(ThePConic.Axis2(),P);
if(Param<0.0) { Param+=PI+PI; }
if(Param<0.0) { Param+=M_PI+M_PI; }
break;
case GeomAbs_Ellipse: {
@@ -40,7 +40,7 @@ Standard_Real IntCurve_ProjectOnPConicTool::FindParameter
,ThePConic.Param1()
,ThePConic.Param2()
,P);
if (Param < 0.0) { Param+=PI+PI; }
if (Param < 0.0) { Param+=M_PI+M_PI; }
break;
}
@@ -84,7 +84,7 @@ Standard_Real IntCurve_ProjectOnPConicTool::FindParameter
case GeomAbs_Circle:
Param=ElCLib::CircleParameter(ThePConic.Axis2(),P);
if(Param<0.0) { Param+=PI+PI; }
if(Param<0.0) { Param+=M_PI+M_PI; }
break;
case GeomAbs_Ellipse: {
@@ -92,7 +92,7 @@ Standard_Real IntCurve_ProjectOnPConicTool::FindParameter
,ThePConic.Param1()
,ThePConic.Param2()
,P);
if (Param < 0.0) { Param+=PI+PI; }
if (Param < 0.0) { Param+=M_PI+M_PI; }
break;
}