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

@@ -105,7 +105,7 @@ static Standard_Integer transform(Draw_Interpretor& di,Standard_Integer n,const
if (n < 9) return 1;
T.SetRotation(gp_Ax1(gp_Pnt(atof(a[n-7]),atof(a[n-6]),atof(a[n-5])),
gp_Vec(atof(a[n-4]),atof(a[n-3]),atof(a[n-2]))),
atof(a[n-1])* PI180);
atof(a[n-1])* (M_PI / 180.0));
last = n-7;
}
else if (!strcmp(a[0],"tmirror")) {

View File

@@ -103,11 +103,11 @@ static Standard_Integer chamfer(Draw_Interpretor& di,
if (!E.IsNull() && !F.IsNull() && (aMCh.Contour(E) == 0) ) {
d1 = atof(a[i + 3]);
angle = atof(a[i + 4]);
angle *= PI / 180.;
angle *= M_PI / 180.;
if ( (d1 > Precision::Confusion())
&& (angle > Precision::Confusion())
&& (PI / 2.- angle > Precision::Confusion()) )
&& (M_PI / 2.- angle > Precision::Confusion()) )
aMCh.AddDA(d1, angle, E, F);
}
i += 5;

View File

@@ -700,7 +700,7 @@ static Standard_Integer profile(Draw_Interpretor& di,
case 'r':
i++;
if (i >= n) goto badargs;
angle = atof(a[i]) * PI180;
angle = atof(a[i]) * (M_PI / 180.0);
if ((a[i-1][1] == 'R') || (a[i-1][1] == 'r')) {
dx = Cos(angle);
dy = Sin(angle);
@@ -736,7 +736,7 @@ static Standard_Integer profile(Draw_Interpretor& di,
if (i >= n) goto badargs;
radius = atof(a[i-1]);
if (Abs(radius) > Precision::Confusion()) {
angle = atof(a[i]) * PI180;
angle = atof(a[i]) * (M_PI / 180.0);
move = circle;
}
break;
@@ -1288,7 +1288,7 @@ static Standard_Integer profile2d(Draw_Interpretor& di,
case 'r':
i++;
if (i >= n) goto badargs;
angle = atof(a[i]) * PI180;
angle = atof(a[i]) * (M_PI / 180.0);
if ((a[i-1][1] == 'R') || (a[i-1][1] == 'r')) {
dx = Cos(angle);
dy = Sin(angle);
@@ -1324,7 +1324,7 @@ static Standard_Integer profile2d(Draw_Interpretor& di,
if (i >= n) goto badargs;
radius = atof(a[i-1]);
if (Abs(radius) > Precision::Confusion()) {
angle = atof(a[i]) * PI180;
angle = atof(a[i]) * (M_PI / 180.0);
move = circle;
}
break;

View File

@@ -58,7 +58,7 @@ static Standard_Integer DEP(Draw_Interpretor& theCommands,
TopoDS_Shape aLocalShape(DBRep::Get(a[8*ii+6],TopAbs_FACE));
F = TopoDS::Face(aLocalShape);
// F = TopoDS::Face(DBRep::Get(a[8*ii+6],TopAbs_FACE));
Angle = atof(a[8*ii+7])*PI/180.;
Angle = atof(a[8*ii+7])*M_PI/180.;
Pax.SetCoord(atof(a[8*ii+8]),atof(a[8*ii+9]),atof(a[8*ii+10]));
Dax.SetCoord(atof(a[8*ii+11]),atof(a[8*ii+12]),atof(a[8*ii+13]));
drft.Add(F,Dirextract,Angle,gp_Pln(Pax,Dax));
@@ -122,7 +122,7 @@ static Standard_Integer NDEP(Draw_Interpretor& theCommands,
//#else
Flag = (Standard_Boolean ) atof(a[9*ii+7]);
//#endif
Angle = atof(a[9*ii+8])*PI/180.;
Angle = atof(a[9*ii+8])*M_PI/180.;
Pax.SetCoord(atof(a[9*ii+9]),atof(a[9*ii+10]),atof(a[9*ii+11]));
Dax.SetCoord(atof(a[9*ii+12]),atof(a[9*ii+13]),atof(a[9*ii+14]));
drft.Add(F,Dirextract,Angle,gp_Pln(Pax,Dax), Flag);

View File

@@ -1107,7 +1107,7 @@ static Standard_Integer ROW(Draw_Interpretor& theCommands,
FFrom = DBRep::Get(a[4],TopAbs_SHAPE);
if (FFrom.IsNull()) {
Angle = atof(a[4]);
Angle *=PI/180.;
Angle *=M_PI/180.;
i = 5;
}
else {
@@ -1268,7 +1268,7 @@ static Standard_Integer ROF(Draw_Interpretor& theCommands,
FFrom = DBRep::Get(a[4],TopAbs_SHAPE);
if (FFrom.IsNull()) {
Angle = atof(a[4]);
Angle *=PI/180.;
Angle *=M_PI/180.;
i = 5;
}
else {
@@ -1589,7 +1589,7 @@ static Standard_Integer DEFIN(Draw_Interpretor& theCommands,
theCommands << "Invalid DPrism base";
return 1;
}
Standard_Real Angle = atof(a[4])*PI/360;
Standard_Real Angle = atof(a[4])*M_PI/360;
dprdef = Standard_True;
theDPrism.Init(Sbase,TopoDS::Face(Pbase),Skface,Angle,Fuse,Modify);
}
@@ -1773,7 +1773,7 @@ static Standard_Integer PERF(Draw_Interpretor& theCommands,
thePrism.Perform(Val);
}
else if (Kas == 2) {
Val *=(PI/180.);
Val *=(M_PI/180.);
theRevol.Perform(Val);
}
else if (Kas == 4) {
@@ -1795,7 +1795,7 @@ static Standard_Integer PERF(Draw_Interpretor& theCommands,
thePrism.PerformUntilHeight(FUntil, Val);
}
else if (Kas == 2) {
Val *=(PI/180.);
Val *=(M_PI/180.);
theRevol.PerformUntilAngle(FUntil, Val);
}
else if (Kas == 4) {

View File

@@ -106,7 +106,7 @@ static Standard_Integer chfi2d(Draw_Interpretor& di, Standard_Integer n, const c
MF.AddChamfer(E1,E2,p1,p2);
}
else {
MF.AddChamfer(E1,V,p1,p2*PI180);
MF.AddChamfer(E1,V,p1,p2 * (M_PI / 180.0));
}
}

View File

@@ -108,7 +108,7 @@ static Standard_Integer cylinder(Draw_Interpretor& , Standard_Integer n, const c
}
else if (n == 5) {
if (P.IsNull())
S = BRepPrimAPI_MakeCylinder(atof(a[2]),atof(a[3]),atof(a[4]) * PI180);
S = BRepPrimAPI_MakeCylinder(atof(a[2]),atof(a[3]),atof(a[4]) * (M_PI / 180.0));
else
S = BRepPrimAPI_MakeCylinder(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]));
}
@@ -116,7 +116,7 @@ static Standard_Integer cylinder(Draw_Interpretor& , Standard_Integer n, const c
if (P.IsNull())
return 1;
else
S = BRepPrimAPI_MakeCylinder(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]),atof(a[5]) * PI180);
S = BRepPrimAPI_MakeCylinder(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]),atof(a[5]) * (M_PI / 180.0));
}
else
return 1;
@@ -142,12 +142,12 @@ static Standard_Integer cone(Draw_Interpretor& , Standard_Integer n, const char*
}
else if (n == 6) {
if (P.IsNull())
S = BRepPrimAPI_MakeCone(atof(a[2]),atof(a[3]),atof(a[4]),atof(a[5]) * PI180);
S = BRepPrimAPI_MakeCone(atof(a[2]),atof(a[3]),atof(a[4]),atof(a[5]) * (M_PI / 180.0));
else
S = BRepPrimAPI_MakeCone(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]),atof(a[5]));
}
else if (n == 7) {
S = BRepPrimAPI_MakeCone(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]),atof(a[5]),atof(a[6]) * PI180);
S = BRepPrimAPI_MakeCone(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]),atof(a[5]),atof(a[6]) * (M_PI / 180.0));
}
else
return 1;
@@ -173,24 +173,24 @@ static Standard_Integer sphere(Draw_Interpretor& , Standard_Integer n, const cha
}
else if (n == 4) {
if (P.IsNull())
S = BRepPrimAPI_MakeSphere(atof(a[2]),atof(a[3]) * PI180);
S = BRepPrimAPI_MakeSphere(atof(a[2]),atof(a[3]) * (M_PI / 180.0));
else
S = BRepPrimAPI_MakeSphere(P->Pln().Position().Ax2(),atof(a[3]));
}
else if (n == 5) {
if (P.IsNull())
S = BRepPrimAPI_MakeSphere(atof(a[2]),atof(a[3]) * PI180,atof(a[4]) * PI180);
S = BRepPrimAPI_MakeSphere(atof(a[2]),atof(a[3]) * (M_PI / 180.0),atof(a[4]) * (M_PI / 180.0));
else
S = BRepPrimAPI_MakeSphere(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]) * PI180);
S = BRepPrimAPI_MakeSphere(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]) * (M_PI / 180.0));
}
else if (n == 6) {
if (P.IsNull())
S = BRepPrimAPI_MakeSphere(atof(a[2]),atof(a[3]) * PI180,atof(a[4]) * PI180,atof(a[5]) * PI180);
S = BRepPrimAPI_MakeSphere(atof(a[2]),atof(a[3]) * (M_PI / 180.0),atof(a[4]) * (M_PI / 180.0),atof(a[5]) * (M_PI / 180.0));
else
S = BRepPrimAPI_MakeSphere(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]) * PI180,atof(a[5]) * PI180);
S = BRepPrimAPI_MakeSphere(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]) * (M_PI / 180.0),atof(a[5]) * (M_PI / 180.0));
}
else if (n == 7) {
S = BRepPrimAPI_MakeSphere(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]) * PI180,atof(a[5]) * PI180,atof(a[6]) * PI180);
S = BRepPrimAPI_MakeSphere(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]) * (M_PI / 180.0),atof(a[5]) * (M_PI / 180.0),atof(a[6]) * (M_PI / 180.0));
}
else
return 1;
@@ -216,29 +216,29 @@ static Standard_Integer torus(Draw_Interpretor& , Standard_Integer n, const char
}
else if (n == 5) {
if (P.IsNull())
S = BRepPrimAPI_MakeTorus(atof(a[2]),atof(a[3]),atof(a[4]) * PI180);
S = BRepPrimAPI_MakeTorus(atof(a[2]),atof(a[3]),atof(a[4]) * (M_PI / 180.0));
else
S = BRepPrimAPI_MakeTorus(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]));
}
else if (n == 6) {
if (P.IsNull())
S = BRepPrimAPI_MakeTorus(atof(a[2]),atof(a[3]),
atof(a[4]) * PI180,atof(a[5]) * PI180);
atof(a[4]) * (M_PI / 180.0),atof(a[5]) * (M_PI / 180.0));
else
S = BRepPrimAPI_MakeTorus(P->Pln().Position().Ax2(),
atof(a[3]),atof(a[4]),atof(a[5]) * PI180);
atof(a[3]),atof(a[4]),atof(a[5]) * (M_PI / 180.0));
}
else if (n == 7) {
if (P.IsNull())
S = BRepPrimAPI_MakeTorus(atof(a[2]),atof(a[3]),
atof(a[4]) * PI180,atof(a[5]) * PI180,atof(a[6]) * PI180);
atof(a[4]) * (M_PI / 180.0),atof(a[5]) * (M_PI / 180.0),atof(a[6]) * (M_PI / 180.0));
else
S = BRepPrimAPI_MakeTorus(P->Pln().Position().Ax2(),atof(a[3]),
atof(a[4]),atof(a[5]) * PI180,atof(a[6]) * PI180);
atof(a[4]),atof(a[5]) * (M_PI / 180.0),atof(a[6]) * (M_PI / 180.0));
}
else if (n == 8) {
S = BRepPrimAPI_MakeTorus(P->Pln().Position().Ax2(),atof(a[3]),atof(a[4]),
atof(a[5]) * PI180,atof(a[6]) * PI180,atof(a[7]) * PI180);
atof(a[5]) * (M_PI / 180.0),atof(a[6]) * (M_PI / 180.0),atof(a[7]) * (M_PI / 180.0));
}
else
return 1;

View File

@@ -456,7 +456,7 @@ static Standard_Integer encoderegularity (Draw_Interpretor& ,
BRepLib::EncodeRegularity(sh);
else {
Standard_Real Tol = atof(a[2]);
Tol *= PI/180.;
Tol *= M_PI/180.;
BRepLib::EncodeRegularity(sh, Tol);
}
return 0;

View File

@@ -100,7 +100,7 @@ static Standard_Integer revol(Draw_Interpretor& ,
gp_Dir D(atof(a[6]),atof(a[7]),atof(a[8]));
gp_Ax1 A(P,D);
Standard_Real angle = atof(a[9]) * PI180;
Standard_Real angle = atof(a[9]) * (M_PI / 180.0);
Standard_Boolean copy = n > 10;