mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-08 14:17:06 +03:00
0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
This commit is contained in:
@@ -908,14 +908,14 @@ Handle(Geom2d_Curve) TopOpeBRepTool_CurveTool::MakePCurveOnFace
|
||||
Handle(Geom2d_Curve) PCT = Handle(Geom2d_Curve)::DownCast(C2D->Copy());
|
||||
// make mirror relative to the isoline of apex -PI/2 or PI/2
|
||||
gp_Trsf2d aTrsf;
|
||||
gp_Pnt2d po(0,-PI/2);
|
||||
if (maxcond) po.SetY(PI/2);
|
||||
gp_Pnt2d po(0,-M_PI/2);
|
||||
if (maxcond) po.SetY(M_PI/2);
|
||||
aTrsf.SetMirror(gp_Ax2d(po, gp_Dir2d(1,0)));
|
||||
PCT->Transform(aTrsf);
|
||||
// add translation along U direction on PI
|
||||
gp_Vec2d vec(PI,0);
|
||||
gp_Vec2d vec(M_PI,0);
|
||||
Standard_Real UFirst = BAS.FirstUParameter();
|
||||
if (u2-UFirst-PI > -1e-7) vec.Reverse();
|
||||
if (u2-UFirst-M_PI > -1e-7) vec.Reverse();
|
||||
PCT->Translate(vec);
|
||||
C2D = PCT;
|
||||
// recompute the test point
|
||||
|
@@ -78,7 +78,7 @@ Standard_EXPORT Standard_Boolean FUN_tool_onapex(const gp_Pnt2d& p2d,const Handl
|
||||
isapex = (dist < tol);
|
||||
}
|
||||
if (ST == GeomAbs_Sphere) {
|
||||
Standard_Real pisur2 = PI*.5;
|
||||
Standard_Real pisur2 = M_PI*.5;
|
||||
#ifdef DEB
|
||||
Standard_Real u =
|
||||
#endif
|
||||
@@ -134,8 +134,8 @@ Standard_EXPORT gp_Dir FUN_tool_ngS(const gp_Pnt2d& p2d,const Handle(Geom_Surfac
|
||||
}
|
||||
}
|
||||
if (ST == GeomAbs_Sphere) {
|
||||
// Standard_Real deuxpi = 2*PI;
|
||||
Standard_Real pisur2 = PI*.5;
|
||||
// Standard_Real deuxpi = 2*M_PI;
|
||||
Standard_Real pisur2 = M_PI*.5;
|
||||
Standard_Real u = p2d.X(),v = p2d.Y();
|
||||
// Standard_Boolean u0 =(Abs(u) < toluv);
|
||||
// Standard_Boolean u2pi=(Abs(u-deuxpi) < toluv);
|
||||
|
@@ -315,7 +315,7 @@ Standard_Boolean TopOpeBRepTool::PurgeClosingEdges(const TopoDS_Face& Fin, const
|
||||
Standard_Boolean uviso = FUN_tool_IsUViso(PC,isuiso,isviso,d2d,O2d);
|
||||
if (!uviso) return Standard_False;
|
||||
|
||||
Standard_Real period = 2*PI;
|
||||
Standard_Real period = 2*M_PI;
|
||||
Standard_Real piso = isuiso? O2d.X(): O2d.Y();
|
||||
Standard_Real tol2d = 1.e-6;
|
||||
Standard_Boolean is0 = Abs(piso) < tol2d;
|
||||
|
@@ -542,7 +542,7 @@ Standard_Boolean TopOpeBRepTool_REGUW::NearestE(const TopTools_ListOfShape& loe,
|
||||
if (M_REVERSED(efound.Orientation())) tg2dfound.Reverse();
|
||||
Standard_Real angfound = 1.e7;
|
||||
if (iStep == 1) angfound = TopOpeBRepTool_TOOL::Matter(mytg2d,tg2dfound);
|
||||
else angfound = 2.*PI - TopOpeBRepTool_TOOL::Matter(tg2dfound,mytg2d);
|
||||
else angfound = 2.*M_PI - TopOpeBRepTool_TOOL::Matter(tg2dfound,mytg2d);
|
||||
#ifdef DEB
|
||||
if (trc) cout<<"ang(e"<<FUN_adds(myed)<<",e"<<FUN_adds(efound)<<")="<<angfound<<endl;
|
||||
#endif
|
||||
@@ -564,7 +564,7 @@ Standard_Boolean TopOpeBRepTool_REGUW::NearestE(const TopTools_ListOfShape& loe,
|
||||
|
||||
Standard_Real angi = 1.e7;
|
||||
if (iStep == 1) angi = TopOpeBRepTool_TOOL::Matter(mytg2d,tg2di);
|
||||
else angi = 2.*PI - TopOpeBRepTool_TOOL::Matter(tg2di,mytg2d);
|
||||
else angi = 2.*M_PI - TopOpeBRepTool_TOOL::Matter(tg2di,mytg2d);
|
||||
Standard_Boolean eq = Abs(angi-angfound) < tola;
|
||||
#ifdef DEB
|
||||
if (trc) cout<<"ang(e"<<FUN_adds(myed)<<",e"<<FUN_adds(ei)<<")="<<angi<<endl;
|
||||
|
@@ -1038,11 +1038,11 @@ Standard_Real TopOpeBRepTool_TOOL::Matter(const gp_Vec& d1, const gp_Vec& dR2, c
|
||||
Standard_Real ang = d1.Angle(d2);
|
||||
Standard_Boolean equal = (ang < tola);
|
||||
if (equal) return 0.;
|
||||
Standard_Boolean oppo = ((PI-ang) < tola);
|
||||
if (oppo) return PI;
|
||||
Standard_Boolean oppo = ((M_PI-ang) < tola);
|
||||
if (oppo) return M_PI;
|
||||
|
||||
ang = d1.AngleWithRef(d2,Ref);
|
||||
if (ang < 0) ang = 2.*PI+ang;
|
||||
if (ang < 0) ang = 2.*M_PI+ang;
|
||||
return ang;
|
||||
}
|
||||
|
||||
@@ -1099,7 +1099,7 @@ Standard_Boolean TopOpeBRepTool_TOOL::Matter(const gp_Dir& xx1,const gp_Dir& nt1
|
||||
z1.Reverse();
|
||||
ang = xx1.AngleWithRef(xx2,z1);
|
||||
if (Abs(ang) < tola) {ang = 0.; return Standard_True;}
|
||||
if (ang < 0) ang = 2.*PI+ang;
|
||||
if (ang < 0) ang = 2.*M_PI+ang;
|
||||
|
||||
return Standard_True;
|
||||
}
|
||||
@@ -1264,7 +1264,7 @@ static Standard_Boolean FUN_ngF(const gp_Pnt2d& uv, const TopoDS_Face& F, gp_Vec
|
||||
}
|
||||
}
|
||||
if (ST == GeomAbs_Sphere) {
|
||||
Standard_Real pisur2 = PI*.5;
|
||||
Standard_Real pisur2 = M_PI*.5;
|
||||
Standard_Real u = uv.X(),v = uv.Y();
|
||||
Standard_Boolean vpisur2 = (Abs(v-pisur2) < tolv);
|
||||
Standard_Boolean vmoinspisur2 = (Abs(v+pisur2) < tolv);
|
||||
@@ -1357,7 +1357,7 @@ Standard_Boolean TopOpeBRepTool_TOOL::MatterKPtg(const TopoDS_Face& f1,const Top
|
||||
|
||||
gp_Dir v12(gp_Vec(pf1,pf2));
|
||||
Standard_Real dot = v12.Dot(nt1);
|
||||
ang = (dot < 0.) ? 0. : 2.*PI;
|
||||
ang = (dot < 0.) ? 0. : 2.*M_PI;
|
||||
|
||||
// gp_Dir nt1; ok1 = TopOpeBRepTool_TOOL::Nt(uv1,f1,nt1);
|
||||
// if (!ok1) return Standard_False;
|
||||
@@ -1371,8 +1371,8 @@ Standard_Boolean TopOpeBRepTool_TOOL::MatterKPtg(const TopoDS_Face& f1,const Top
|
||||
// if (!ok2) return Standard_False;
|
||||
// Standard_Real angapp; Standard_Boolean ok = TopOpeBRepTool_TOOL::Matter(xx1,nt1, xx2,nt2,tola,angapp);
|
||||
// if (!ok) return Standard_False;
|
||||
// Standard_Boolean is0 = (Abs(angapp) < Abs(2.*PI-angapp));
|
||||
// ang = is0 ? 0. : 2.*PI;
|
||||
// Standard_Boolean is0 = (Abs(angapp) < Abs(2.*M_PI-angapp));
|
||||
// ang = is0 ? 0. : 2.*M_PI;
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
|
@@ -193,7 +193,7 @@ static Standard_Boolean FUN_MkTonE(const gp_Vec& faxis, const gp_Vec& dirINcle,
|
||||
Standard_Real ang = 1.e7;
|
||||
if (isONi) {
|
||||
Standard_Real dot = dirINcle.Dot(tgi);
|
||||
ang = (dot > 0) ? 0 : PI;
|
||||
ang = (dot > 0) ? 0 : M_PI;
|
||||
// outin = (ang > 0); -xpu190499
|
||||
outin = Standard_True;
|
||||
}
|
||||
@@ -205,7 +205,7 @@ static Standard_Boolean FUN_MkTonE(const gp_Vec& faxis, const gp_Vec& dirINcle,
|
||||
else outin = (dot < 0);
|
||||
}//!isONi
|
||||
|
||||
Standard_Real Cang = (ang > PI) ? ang-PI : ang+PI;
|
||||
Standard_Real Cang = (ang > M_PI) ? ang-M_PI : ang+M_PI;
|
||||
par1 = outin ? ang : Cang;
|
||||
par2 = outin ? Cang : ang;
|
||||
return Standard_True;
|
||||
|
Reference in New Issue
Block a user