1
0
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:
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

@@ -128,11 +128,11 @@ Standard_Boolean ChFiKPart_MakeChAsym(TopOpeBRepDS_DataStructure& DStr,
#endif
return Standard_False;
}
SemiAngl = PI / 2. - Angle;
SemiAngl = M_PI / 2. - Angle;
}
else {
ChamfRad = Spine.Radius() + Dis;
SemiAngl = Angle - PI / 2.;
SemiAngl = Angle - M_PI / 2.;
}
if (ouvert) {
@@ -148,7 +148,7 @@ Standard_Boolean ChFiKPart_MakeChAsym(TopOpeBRepDS_DataStructure& DStr,
if (ouvert) {
SemiAngl = Abs(angCon) + Angle;
if ( (PI / 2. - SemiAngl) < Precision::Confusion() ) {
if ( (M_PI / 2. - SemiAngl) < Precision::Confusion() ) {
cout <<"wrong choice of angle for the chamfer"<<endl;
return Standard_False;
}
@@ -328,10 +328,10 @@ Standard_Boolean ChFiKPart_MakeChAsym(TopOpeBRepDS_DataStructure& DStr,
Or.Z()+Rad*Dx.Z());
ElSLib::Parameters(Con,Pt ,u,v);
Standard_Real tol = Precision::PConfusion();
if(u >= 2*PI - tol && u <= 2*PI) u = 0.;
if(u >= 2*M_PI - tol && u <= 2*M_PI) u = 0.;
if(u >= fu - tol && u < fu) u = fu;
if(u <= lu + tol && u > lu) u = lu;
if(u < fu || u > lu) u = ElCLib::InPeriod(u,fu,fu + 2*PI);
if(u < fu || u > lu) u = ElCLib::InPeriod(u,fu,fu + 2*M_PI);
ElSLib::D1(u,v,Con,Pt,deru,derv);
gp_Pnt2d p2dCon(u,v);
gp_Dir2d d2dCon;
@@ -505,10 +505,10 @@ Standard_Boolean ChFiKPart_MakeChAsym(TopOpeBRepDS_DataStructure& DStr,
Or.Z()+Rad*Dx.Z());
ElSLib::Parameters(Con,Pt ,u,v);
Standard_Real tol = Precision::PConfusion();
if (u >= 2*PI - tol && u <= 2*PI) u = 0.;
if (u >= 2*M_PI - tol && u <= 2*M_PI) u = 0.;
if (u >= fu - tol && u < fu) u = fu;
if (u <= lu + tol && u > lu) u = lu;
if (u < fu || u > lu) u = ElCLib::InPeriod(u,fu,fu + 2*PI);
if (u < fu || u > lu) u = ElCLib::InPeriod(u,fu,fu + 2*M_PI);
ElSLib::D1(u,v,Con,Pt,deru,derv);
gp_Pnt2d p2dCon(u,v);
gp_Dir2d d2dCon;

View File

@@ -270,10 +270,10 @@ Standard_Boolean ChFiKPart_MakeChAsym(TopOpeBRepDS_DataStructure& DStr,
ElSLib::Parameters(Cyl, Pt ,u, v);
Standard_Real tol = Precision::PConfusion();
Standard_Boolean careaboutsens = 0;
if(Abs(lu - fu - 2 * PI) < tol) careaboutsens = 1;
if(Abs(lu - fu - 2 * M_PI) < tol) careaboutsens = 1;
if(u >= fu - tol && u < fu) u = fu;
if(u <= lu + tol && u > lu) u = lu;
if(u < fu || u > lu) u = ChFiKPart_InPeriod(u, fu, fu + 2 * PI, tol);
if(u < fu || u > lu) u = ChFiKPart_InPeriod(u, fu, fu + 2 * M_PI, tol);
ElSLib::D1(u, v, Cyl, Pt, deru, derv);
gp_Dir norcyl = deru.Crossed(derv);

View File

@@ -327,10 +327,10 @@ Standard_Boolean ChFiKPart_MakeChamfer(TopOpeBRepDS_DataStructure& DStr,
Or.Z()+Rad*Dx.Z());
ElSLib::Parameters(Con,Pt ,u,v);
Standard_Real tol = Precision::PConfusion();
if(u >= 2*PI - tol && u <= 2*PI) u = 0.;
if(u >= 2*M_PI - tol && u <= 2*M_PI) u = 0.;
if(u >= fu - tol && u < fu) u = fu;
if(u <= lu + tol && u > lu) u = lu;
if(u < fu || u > lu) u = ElCLib::InPeriod(u,fu,fu + 2*PI);
if(u < fu || u > lu) u = ElCLib::InPeriod(u,fu,fu + 2*M_PI);
ElSLib::D1(u,v,Con,Pt,deru,derv);
gp_Pnt2d p2dCon(u,v);
gp_Dir2d d2dCon;

View File

@@ -255,10 +255,10 @@ Standard_Boolean ChFiKPart_MakeChamfer(TopOpeBRepDS_DataStructure& DStr,
ElSLib::Parameters(Cyl,Pt ,u,v);
Standard_Real tol = Precision::PConfusion();
Standard_Boolean careaboutsens = 0;
if(Abs(lu - fu - 2*PI) < tol) careaboutsens = 1;
if(Abs(lu - fu - 2*M_PI) < tol) careaboutsens = 1;
if(u >= fu - tol && u < fu) u = fu;
if(u <= lu + tol && u > lu) u = lu;
if(u < fu || u > lu) u = ChFiKPart_InPeriod(u,fu,fu + 2*PI,tol);
if(u < fu || u > lu) u = ChFiKPart_InPeriod(u,fu,fu + 2*M_PI,tol);
ElSLib::D1(u,v,Cyl,Pt,deru,derv);
gp_Dir norcyl = deru.Crossed(derv);

View File

@@ -149,7 +149,7 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
else{
ElSLib::TorusParameters(FilAx3,Rad,Radius,P,u,v);
ElSLib::TorusD1(u,v,FilAx3,Rad,Radius,PP,deru,derv);
if(!plandab && Ang < PI/2 && dedans) v = v + 2*PI;
if(!plandab && Ang < M_PI/2 && dedans) v = v + 2*M_PI;
}
gp_Pnt2d p2dFil(0.,v);
gp_Dir norFil(deru.Crossed(derv));
@@ -211,7 +211,7 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
else{
ElSLib::TorusParameters(FilAx3,Rad,Radius,P,u,v);
ElSLib::TorusD1(u,v,FilAx3,Rad,Radius,PP,deru,derv);
if(plandab && Ang < PI/2 && dedans) v = v + 2*PI;
if(plandab && Ang < M_PI/2 && dedans) v = v + 2*M_PI;
}
norFil = deru.Crossed(derv);
p2dFil.SetCoord(0.,v);
@@ -220,10 +220,10 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
ElSLib::Parameters(Con,P,u,v);
Standard_Real tol = Precision::PConfusion();
Standard_Boolean careaboutsens = 0;
if(Abs(lu - fu - 2*PI) < tol) careaboutsens = 1;
if(Abs(lu - fu - 2*M_PI) < tol) careaboutsens = 1;
if(u >= fu - tol && u < fu) u = fu;
if(u <= lu + tol && u > lu) u = lu;
if(u < fu || u > lu) u = ElCLib::InPeriod(u,fu,fu + 2*PI);
if(u < fu || u > lu) u = ElCLib::InPeriod(u,fu,fu + 2*M_PI);
ElSLib::D1(u,v,Con,PP,deru,derv);
gp_Dir norCon = deru.Crossed(derv);
gp_Dir2d d2dCon = gp::DX2d();

View File

@@ -110,7 +110,7 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
ElSLib::Parameters(Cyl,OrFillet,UOnCyl,VOnCyl);
Standard_Real tesp = Precision::Confusion();
if(UOnCyl < fu - tesp || UOnCyl > lu + tesp)
UOnCyl = ElCLib::InPeriod(UOnCyl,fu,fu+2*PI);
UOnCyl = ElCLib::InPeriod(UOnCyl,fu,fu+2*M_PI);
ElSLib::Parameters(Pln,OrFillet,UOnPln,VOnPln);
gp_Vec XDir,OtherDir;
@@ -141,7 +141,7 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
gp_Lin C3d(POnPln,DirFillet);
Standard_Real UOnFillet,V;
ElSLib::CylinderParameters(AxFil,Radius,POnPln,UOnFillet,V);
if(UOnFillet > PI) UOnFillet = 0.;
if(UOnFillet > M_PI) UOnFillet = 0.;
gp_Lin2d LOnFillet(gp_Pnt2d(UOnFillet,V),gp::DY2d());
Handle(Geom_Line) L3d = new Geom_Line (C3d);
Handle(Geom2d_Line) LFac = new Geom2d_Line(Lin2dPln);
@@ -179,7 +179,7 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
gp_Pnt POnCyl = ElSLib::Value(UOnCyl,VOnCyl,Cyl);
C3d = gp_Lin(POnCyl,DirFillet);
ElSLib::CylinderParameters(AxFil,Radius,POnCyl,UOnFillet,V);
if(UOnFillet > PI) UOnFillet = 0.;
if(UOnFillet > M_PI) UOnFillet = 0.;
LOnFillet = gp_Lin2d(gp_Pnt2d(UOnFillet,V),gp::DY2d());
L3d = new Geom_Line (C3d);
LFac = new Geom2d_Line(Lin2dCyl);
@@ -254,12 +254,12 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
Standard_Real acote = 1e-7;
ElCLib::D1(First,Spine,PtSp,DSp);
ElSLib::Parameters(Cyl,PtSp,u,v);
if ((Abs(u)<acote) || (Abs(u-(2*PI))<acote)){
if ((Abs(u)<acote) || (Abs(u-(2*M_PI))<acote)){
ElCLib::D1(First+0.2,Spine,PtSp2,DSp2);
Standard_Real u2,v2;
ElSLib::Parameters(Cyl,PtSp2,u2,v2);
if (Abs(u2-u)>PI){
u = (2*PI)-u;
if (Abs(u2-u)>M_PI){
u = (2*M_PI)-u;
PtSp = ElSLib::Value(u,v,Cyl);
Standard_Real PR;
PR = ElCLib::Parameter(Spine,PtSp);
@@ -315,10 +315,10 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
cPln.Z()+Rad*Dx.Z());
u = 0.;
if ((dedans && plandab) || (!dedans && !plandab)){
if (c1sphere) { v = - PI / 2; }
else { v = 3 * PI / 2; }
if (c1sphere) { v = - M_PI / 2; }
else { v = 3 * M_PI / 2; }
}
else { v = PI / 2; }
else { v = M_PI / 2; }
gp_Dir norFil;
if(c1sphere){
ElSLib::SphereD1(u,v,FilAx3,cylrad,PP,deru,derv);
@@ -388,10 +388,10 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
Or.Z()+cylrad*Dx.Z());
u = 0.;
if (dedans) {
if (plandab && !c1sphere) { v = 2 * PI; }
if (plandab && !c1sphere) { v = 2 * M_PI; }
else { v = 0. ; }
}
else { v = PI; }
else { v = M_PI; }
p2dFil.SetCoord(u,v);
if(c1sphere){
ElSLib::SphereD1(u,v,FilAx3,cylrad,PP,deru,derv);
@@ -405,10 +405,10 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr,
ElSLib::Parameters(Cyl,P,u,v);
Standard_Real tol = Precision::PConfusion();
Standard_Boolean careaboutsens = 0;
if(Abs(lu - fu - 2*PI) < tol) careaboutsens = 1;
if(Abs(lu - fu - 2*M_PI) < tol) careaboutsens = 1;
if(u >= fu - tol && u < fu) u = fu;
if(u <= lu + tol && u > lu) u = lu;
if(u < fu || u > lu) u = ChFiKPart_InPeriod(u,fu,fu + 2*PI,tol);
if(u < fu || u > lu) u = ChFiKPart_InPeriod(u,fu,fu + 2*M_PI,tol);
ElSLib::D1(u,v,Cyl,PP,deru,derv);
gp_Dir norcyl = deru.Crossed(derv);
gp_Dir2d d2dCyl = gp::DX2d();

View File

@@ -89,7 +89,7 @@ Standard_Boolean ChFiKPart_MakeRotule(TopOpeBRepDS_DataStructure& DStr,
//------------------------------------------------------------
gp_Pnt pp;
gp_Vec du,dv;
ElSLib::TorusD1(0.,PI/2,ppos,r,r,pp,du,dv);
ElSLib::TorusD1(0.,M_PI/2,ppos,r,r,pp,du,dv);
gp_Dir drot(du.Crossed(dv));
Standard_Boolean reversecur = ( drot.Dot(dplnat) <= 0. );
Standard_Boolean reversefil = ( drot.Dot(dfpl) <= 0. );
@@ -113,7 +113,7 @@ Standard_Boolean ChFiKPart_MakeRotule(TopOpeBRepDS_DataStructure& DStr,
ppos.YDirection().Dot(pl.Position().YDirection()));
gp_Ax22d circ2dax(p2dcirc,dx2d,dy2d);
Handle(Geom2d_Circle) GC2d = new Geom2d_Circle(circ2dax,r);
gp_Pnt2d p2dlin(0.,PI/2);
gp_Pnt2d p2dlin(0.,M_PI/2);
Handle(Geom2d_Line) GL2d = new Geom2d_Line(p2dlin,gp::DX2d());
TopAbs_Orientation trans = TopAbs_REVERSED;
if (reversecur) trans = TopAbs_FORWARD;
@@ -124,7 +124,7 @@ Standard_Boolean ChFiKPart_MakeRotule(TopOpeBRepDS_DataStructure& DStr,
//--------------
Handle(Geom_Curve) bid;
Handle(Geom2d_Curve) bid2d;
p2dlin.SetCoord(0.,PI);
p2dlin.SetCoord(0.,M_PI);
Handle(Geom2d_Line) GL2dcoin = new Geom2d_Line(p2dlin,gp::DX2d());
Data->ChangeInterferenceOnS2().
SetInterference(ChFiKPart_IndexCurveInDS(bid,DStr),trans,bid2d,GL2dcoin);
@@ -132,7 +132,7 @@ Standard_Boolean ChFiKPart_MakeRotule(TopOpeBRepDS_DataStructure& DStr,
//et les points
//-------------
Data->ChangeVertexFirstOnS1().SetPoint(pp);
ElSLib::TorusD0(alpha,PI/2,ppos,r,r,pp);
ElSLib::TorusD0(alpha,M_PI/2,ppos,r,r,pp);
Data->ChangeVertexLastOnS1().SetPoint(pp);
Data->ChangeInterferenceOnS1().SetFirstParameter(0.);
Data->ChangeInterferenceOnS1().SetLastParameter(alpha);

View File

@@ -114,7 +114,7 @@ Standard_Boolean ChFiKPart_Sphere(TopOpeBRepDS_DataStructure& DStr,
Handle(Geom_Curve) C;
Handle(Geom2d_Curve) C2d;
gp_Pnt2d p2dFil(0.,-PI/2.);
gp_Pnt2d p2dFil(0.,-M_PI/2.);
gp_Lin2d lin2dFil(p2dFil,gp::DX2d());
Handle(Geom2d_Curve) C2dFil = new Geom2d_Line(lin2dFil);
toreverse = ( ddz.Dot(dnat1) <= 0. );