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:
@@ -918,7 +918,7 @@ Standard_Boolean ShapeAnalysis_CheckSmallFace::CheckTwisted (const TopoDS_Face&
|
||||
}
|
||||
// cout << "angle1 " << angle1<< endl;
|
||||
// cout << "angle2 " << angle2<< endl;
|
||||
if ((angle1<=0.001 && angle2<=0.01) || ((PI-angle2)<= 0.001 && (PI-angle2)<= 0.01)) return Standard_True;
|
||||
if ((angle1<=0.001 && angle2<=0.01) || ((M_PI-angle2)<= 0.001 && (M_PI-angle2)<= 0.01)) return Standard_True;
|
||||
else return Standard_False;
|
||||
}
|
||||
|
||||
|
@@ -338,7 +338,7 @@ Standard_Real ShapeAnalysis_Curve::ProjectAct(const Adaptor3d_Curve& C3D,
|
||||
proj = ElCLib::Value(param, aCirc);
|
||||
}
|
||||
closed = Standard_True;
|
||||
valclosed = 2.*PI;
|
||||
valclosed = 2.*M_PI;
|
||||
}
|
||||
break;
|
||||
case GeomAbs_Hyperbola:
|
||||
@@ -364,7 +364,7 @@ Standard_Real ShapeAnalysis_Curve::ProjectAct(const Adaptor3d_Curve& C3D,
|
||||
param = ElCLib::Parameter(C3D.Ellipse(), P3D);
|
||||
proj = ElCLib::Value(param, C3D.Ellipse());
|
||||
closed = Standard_True;
|
||||
valclosed = 2.*PI;
|
||||
valclosed = 2.*M_PI;
|
||||
|
||||
}
|
||||
break;
|
||||
@@ -802,8 +802,8 @@ static void AppendControlPoles (TColgp_SequenceOfPnt& seq,
|
||||
seq.Append(curve->Value(1));
|
||||
} else if ( curve->IsKind(STANDARD_TYPE(Geom_Conic))) {
|
||||
seq.Append(curve->Value(0));
|
||||
seq.Append(curve->Value(PI/2));
|
||||
seq.Append(curve->Value(PI));
|
||||
seq.Append(curve->Value(M_PI/2));
|
||||
seq.Append(curve->Value(M_PI));
|
||||
} else if ( curve->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
|
||||
//DeclareAndCast(Geom_TrimmedCurve, Trimmed, curve);
|
||||
Handle(Geom_TrimmedCurve) Trimmed = *((Handle(Geom_TrimmedCurve) *) &curve);
|
||||
@@ -1087,7 +1087,7 @@ Standard_Boolean ShapeAnalysis_Curve::GetSamplePoints (const Handle(Geom2d_Curve
|
||||
return Standard_True;
|
||||
}
|
||||
else if(curve->IsKind(STANDARD_TYPE(Geom2d_Conic))) {
|
||||
step = Min ( PI, last-first ) / 19; //:abv 05.06.02 TUBE.stp #19209...: PI/16
|
||||
step = Min ( M_PI, last-first ) / 19; //:abv 05.06.02 TUBE.stp #19209...: M_PI/16
|
||||
// if( step>(last-first) ) {
|
||||
// seq.Append(curve->Value(first));
|
||||
// seq.Append(curve->Value((last+first)/2));
|
||||
|
@@ -329,7 +329,7 @@ Standard_Boolean ShapeAnalysis_FreeBoundsProperties::CheckNotches(const TopoDS_W
|
||||
if ( E2.Orientation() == TopAbs_REVERSED ) vec2.Reverse();
|
||||
|
||||
Standard_Real angl = Abs( vec1.Angle(vec2));
|
||||
if (angl > 0.95*PI) {
|
||||
if (angl > 0.95*M_PI) {
|
||||
distMax = .0;
|
||||
for (Standard_Integer i = 0; i < NbControl; i++) {
|
||||
Standard_Real prm = ((NbControl-1-i)*First1 + i*Last1)/(NbControl-1);
|
||||
|
@@ -146,12 +146,12 @@ void ShapeAnalysis_Surface::ComputeSingularities()
|
||||
//szv#4:S4163:12Mar99 warning - possible div by zero
|
||||
Standard_Real Ang = ACos (Min (1., majorR / minorR));
|
||||
myPreci [0] = myPreci[1] = Max (0., majorR - minorR);
|
||||
myP3d [0] = mySurf->Value (0., PI-Ang);
|
||||
myFirstP2d[0].SetCoord (su1, PI-Ang);
|
||||
myLastP2d [0].SetCoord (su2, PI-Ang);
|
||||
myP3d [1] = mySurf->Value (0., PI+Ang);
|
||||
myFirstP2d[1].SetCoord (su2, PI+Ang);
|
||||
myLastP2d [1].SetCoord (su1, PI+Ang);
|
||||
myP3d [0] = mySurf->Value (0., M_PI-Ang);
|
||||
myFirstP2d[0].SetCoord (su1, M_PI-Ang);
|
||||
myLastP2d [0].SetCoord (su2, M_PI-Ang);
|
||||
myP3d [1] = mySurf->Value (0., M_PI+Ang);
|
||||
myFirstP2d[1].SetCoord (su2, M_PI+Ang);
|
||||
myLastP2d [1].SetCoord (su1, M_PI+Ang);
|
||||
myFirstPar[0] = myFirstPar[1] = su1;
|
||||
myLastPar [0] = myLastPar [1] = su2;
|
||||
myUIsoDeg [0] = myUIsoDeg [1] = Standard_False;
|
||||
@@ -917,29 +917,29 @@ gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D,const Standard_Real
|
||||
{
|
||||
gp_Cylinder Cylinder = SurfAdapt.Cylinder();
|
||||
ElSLib::Parameters( Cylinder, P3D, S, T);
|
||||
S += ShapeAnalysis::AdjustByPeriod(S,0.5*(uf+ul),2*PI);
|
||||
S += ShapeAnalysis::AdjustByPeriod(S,0.5*(uf+ul),2*M_PI);
|
||||
break;
|
||||
}
|
||||
case GeomAbs_Cone :
|
||||
{
|
||||
gp_Cone Cone = SurfAdapt.Cone();
|
||||
ElSLib::Parameters( Cone, P3D, S, T);
|
||||
S += ShapeAnalysis::AdjustByPeriod(S,0.5*(uf+ul),2*PI);
|
||||
S += ShapeAnalysis::AdjustByPeriod(S,0.5*(uf+ul),2*M_PI);
|
||||
break;
|
||||
}
|
||||
case GeomAbs_Sphere :
|
||||
{
|
||||
gp_Sphere Sphere = SurfAdapt.Sphere();
|
||||
ElSLib::Parameters( Sphere, P3D, S, T);
|
||||
S += ShapeAnalysis::AdjustByPeriod(S,0.5*(uf+ul),2*PI);
|
||||
S += ShapeAnalysis::AdjustByPeriod(S,0.5*(uf+ul),2*M_PI);
|
||||
break;
|
||||
}
|
||||
case GeomAbs_Torus :
|
||||
{
|
||||
gp_Torus Torus = SurfAdapt.Torus();
|
||||
ElSLib::Parameters( Torus, P3D, S, T);
|
||||
S += ShapeAnalysis::AdjustByPeriod(S,0.5*(uf+ul),2*PI);
|
||||
T += ShapeAnalysis::AdjustByPeriod(T,0.5*(vf+vl),2*PI);
|
||||
S += ShapeAnalysis::AdjustByPeriod(S,0.5*(uf+ul),2*M_PI);
|
||||
T += ShapeAnalysis::AdjustByPeriod(T,0.5*(vf+vl),2*M_PI);
|
||||
break;
|
||||
}
|
||||
case GeomAbs_BezierSurface :
|
||||
|
@@ -1476,8 +1476,8 @@ Standard_Boolean ShapeAnalysis_Wire::CheckLacking (const Standard_Integer num,
|
||||
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE1 );
|
||||
|
||||
if ( myMax2d < Precision::PConfusion() || //:abv 03.06.02 CTS21866.stp
|
||||
( v1.SquareMagnitude() > gp::Resolution() && Abs ( v12.Angle ( v1 ) ) > 0.9 * PI ) ||
|
||||
( v2.SquareMagnitude() > gp::Resolution() && Abs ( v12.Angle ( v2 ) ) > 0.9 * PI ) )
|
||||
( v1.SquareMagnitude() > gp::Resolution() && Abs ( v12.Angle ( v1 ) ) > 0.9 * M_PI ) ||
|
||||
( v2.SquareMagnitude() > gp::Resolution() && Abs ( v12.Angle ( v2 ) ) > 0.9 * M_PI ) )
|
||||
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE2 );
|
||||
return Standard_True;
|
||||
}
|
||||
|
Reference in New Issue
Block a user