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

@@ -1950,7 +1950,7 @@ static int VMoveA (Draw_Interpretor& di, Standard_Integer argc, const char** arg
if (TheAISContext()->HasOpenedContext())
TheAISContext()->CloseLocalContext();
Standard_Real Step=2*PI/180;
Standard_Real Step=2*M_PI/180;
Standard_Real Angle=0;
// R est le rayon de l'hellicoide
Standard_Real R=50;
@@ -1971,10 +1971,10 @@ static int VMoveA (Draw_Interpretor& di, Standard_Integer argc, const char** arg
// boucle generant le mouvement
if(argc==3) {
di<<" Transformations"<<"\n";
for (Standard_Real myAngle=0;Angle<5*2*PI; myAngle++) {
for (Standard_Real myAngle=0;Angle<5*2*M_PI; myAngle++) {
Angle=Step*myAngle;
gp_Ax3 newBase(gp_Pnt(R*cos(Angle), R*sin(Angle), D*Angle/(2*PI) ), gp_Vec(0,0,1), gp_Vec(1,0,0) );
gp_Ax3 newBase(gp_Pnt(R*cos(Angle), R*sin(Angle), D*Angle/(2*M_PI) ), gp_Vec(0,0,1), gp_Vec(1,0,0) );
gp_Trsf myTransfo;
myTransfo.SetTransformation(newBase.Rotated(gp_Ax1(gp_Pnt(R*cos(Angle),R*sin(Angle),0), gp_Dir(0,0,1) ),Angle ) );
TheAISContext()->SetLocation(aIO,myTransfo);
@@ -1993,7 +1993,7 @@ static int VMoveA (Draw_Interpretor& di, Standard_Integer argc, const char** arg
TopLoc_Location myDeltaDist (myDistTrsf);
TopLoc_Location myTrueLoc;
for (Standard_Real myAngle=0;Angle<5*2*PI; myAngle++) {
for (Standard_Real myAngle=0;Angle<5*2*M_PI; myAngle++) {
Angle=Step*myAngle;
myTrueLoc=myTrueLoc*myDeltaAngle*myDeltaDist;
@@ -2053,7 +2053,7 @@ static int VPerf(Draw_Interpretor& di, Standard_Integer , const char** argv) {
if (TheAISContext()->HasOpenedContext())
TheAISContext()->CloseLocalContext();
Standard_Real Step=4*PI/180;
Standard_Real Step=4*M_PI/180;
Standard_Real Angle=0;
Handle(AIS_InteractiveObject) aIO;
@@ -2076,7 +2076,7 @@ static int VPerf(Draw_Interpretor& di, Standard_Integer , const char** argv) {
// Movement par transformation
if(atoi(argv[2]) ==1) {
di<<" Calcul par Transformation"<<"\n";
for (Standard_Real myAngle=0;Angle<10*2*PI; myAngle++) {
for (Standard_Real myAngle=0;Angle<10*2*M_PI; myAngle++) {
Angle=Step*myAngle;
gp_Trsf myTransfo;
@@ -2093,7 +2093,7 @@ static int VPerf(Draw_Interpretor& di, Standard_Integer , const char** argv) {
TopLoc_Location myDeltaAngle (myAngleTrsf);
TopLoc_Location myTrueLoc;
for (Standard_Real myAngle=0;Angle<10*2*PI; myAngle++) {
for (Standard_Real myAngle=0;Angle<10*2*M_PI; myAngle++) {
Angle=Step*myAngle;
myTrueLoc=myTrueLoc*myDeltaAngle;
@@ -2174,9 +2174,9 @@ static int VAnimation (Draw_Interpretor& di, Standard_Integer argc, const char**
TheAISContext()->Deactivate(myAisPropeller );
// Boucle de mouvement
for (Standard_Real myAngle = 0;angleA<2*PI*10.175 ;myAngle++) {
for (Standard_Real myAngle = 0;angleA<2*M_PI*10.175 ;myAngle++) {
angleA = thread*myAngle*PI/180;
angleA = thread*myAngle*M_PI/180;
X = Sin(angleA)*3/8;
angleB = atan(X / Sqrt(-X * X + 1));
Standard_Real decal(25*0.6);
@@ -3678,7 +3678,7 @@ static Standard_Integer TDraft(Draw_Interpretor& di, Standard_Integer argc, cons
return 1;
}
anAngle = atof(argv[4]);
anAngle = 2*PI * anAngle / 360.0;
anAngle = 2*M_PI * anAngle / 360.0;
gp_Pln aPln;
Handle( Geom_Surface )aSurf;
AIS_KindOfSurface aSurfType;

View File

@@ -250,7 +250,7 @@ static int VTrihedron (Draw_Interpretor& di, Standard_Integer argc, const char**
gp_Dir TheZVector(coord[3],coord[4],coord[5]);
gp_Dir TheXVector(coord[6],coord[7],coord[8]);
if ( !TheZVector.IsNormal(TheXVector,PI/180)) {di<<argv[0]<<" VectorX is not normal to VectorZ"<<"\n"; return 1;}
if ( !TheZVector.IsNormal(TheXVector,M_PI/180)) {di<<argv[0]<<" VectorX is not normal to VectorZ"<<"\n"; return 1;}
Handle(Geom_Axis2Placement) OrigineAndAxii=new Geom_Axis2Placement(ThePoint,TheZVector,TheXVector);
@@ -1427,7 +1427,7 @@ static int VPlaneBuilder(Draw_Interpretor& di, Standard_Integer argc, const char
if (mySurface.GetType()==GeomAbs_Plane ) {
gp_Pln myPlane=mySurface.Plane();
// On effectue une rotation d'1/2 tour autour de l'axe de rotation
myPlane.Rotate(myRotAxis , PI/2 );
myPlane.Rotate(myRotAxis , M_PI/2 );
Handle(Geom_Plane) theGeomPlane=new Geom_Plane (myPlane );
// construit un plan parallele a theGeomPlane contenant l'edgeA (De centre le milieu de l'edgeA)
@@ -1489,7 +1489,7 @@ static int VPlaneBuilder(Draw_Interpretor& di, Standard_Integer argc, const char
if (mySurface.GetType()==GeomAbs_Plane ) {
gp_Pln myPlane=mySurface.Plane();
// On effectue une rotation d'1/2 tour autour de l'axe de rotation
myPlane.Rotate(myRotAxis , PI/2 );
myPlane.Rotate(myRotAxis , M_PI/2 );
Handle(Geom_Plane) theGeomPlane=new Geom_Plane (myPlane );
// construit un plan parallele a theGeomPlane contenant l'edgeA (De centre le milieu de l'edgeA)
gp_Pnt theMiddle ((Ba.X()+Bb.X() )/2 , (Ba.Y()+Bb.Y() )/2 , (Ba.Z()+Bb.Z() )/2 );
@@ -2494,15 +2494,15 @@ Handle( Poly_Triangulation ) CalculationOfSphere( double X , double Y , double Z
// Check data, determine increments, and convert to radians
startTheta = (localStartTheta < localEndTheta ? localStartTheta : localEndTheta);
startTheta *= Standard_PI / 180.0;
startTheta *= M_PI / 180.0;
endTheta = (localEndTheta > localStartTheta ? localEndTheta : localStartTheta);
endTheta *= Standard_PI / 180.0;
endTheta *= M_PI / 180.0;
startPhi = ( mStartPhi < mEndPhi ? mStartPhi : mEndPhi);
startPhi *= Standard_PI / 180.0;
startPhi *= M_PI / 180.0;
endPhi = ( mEndPhi > mStartPhi ? mEndPhi : mStartPhi);
endPhi *= Standard_PI / 180.0;
endPhi *= M_PI / 180.0;
phiResolution = mPhiResolution - numPoles;
deltaPhi = (endPhi - startPhi) / ( mPhiResolution - 1);
@@ -2562,7 +2562,7 @@ Handle( Poly_Triangulation ) CalculationOfSphere( double X , double Y , double Z
number_point = 3;
for ( i=0; i < localThetaResolution; i++){
theta = localStartTheta * Standard_PI / 180.0 + i*deltaTheta;
theta = localStartTheta * M_PI / 180.0 + i*deltaTheta;
for ( j = jStart; j < jEnd; j++){
phi = startPhi + j*deltaPhi;
radius = mRadius * sin((double)phi);

View File

@@ -242,7 +242,7 @@ static int VAngleDimBuilder(Draw_Interpretor& di, Standard_Integer argc, const c
TheAISContext()->CloseLocalContext(myCurrentIndex);
// Construction de l'AIS dimension
Handle (AIS_AngleDimension) myAISDim= new AIS_AngleDimension (TopoDS::Edge(ShapeA) ,TopoDS::Edge(ShapeB) ,theGeomPlane ,PI/2.0 ,TheMessage_Str );
Handle (AIS_AngleDimension) myAISDim= new AIS_AngleDimension (TopoDS::Edge(ShapeA) ,TopoDS::Edge(ShapeB) ,theGeomPlane ,M_PI/2.0 ,TheMessage_Str );
GetMapOfAIS().Bind (myAISDim,argv[1]);
TheAISContext()->Display(myAISDim );
@@ -1671,7 +1671,7 @@ static int VPerpendicularBuilder(Draw_Interpretor& di, Standard_Integer argc, co
// on verifie si les edges sont orthogonaux.
//gp_Lin theLineA=theCurveA.Line();
//gp_Lin theLineB=theCurveB.Line();
//if (abs(theLineA.Angle(theLineB) ) != PI/2 ) {cout<<"vperpendicular error: Edges are not othogonals."<<endl;return 1;}
//if (abs(theLineA.Angle(theLineB) ) != M_PI/2 ) {cout<<"vperpendicular error: Edges are not othogonals."<<endl;return 1;}
// On recupere 3 points A,B,C des curves.
gp_Pnt A=theCurveA.Value(0.1);