mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
This commit is contained in:
@@ -1992,7 +1992,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
|
||||
Standard_Integer index = 0;
|
||||
Standard_Boolean misoriented = Standard_True, samepatch = Standard_False;
|
||||
Standard_Boolean reverse = Standard_False, connected = Standard_False;
|
||||
Standard_Real angle = -PI, mindist = RealLast();
|
||||
Standard_Real angle = -M_PI, mindist = RealLast();
|
||||
Standard_Integer weigth = 0;
|
||||
Standard_Real shiftu=0., shiftv=0.;
|
||||
|
||||
@@ -2083,8 +2083,8 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
|
||||
}
|
||||
|
||||
// short segment is to be taken with highest priority by angle
|
||||
Standard_Real ang = ( shorts(i) >0 ? PI : endTan.Angle ( lVec ) );
|
||||
if ( myClosedMode && shorts(i) <=0 && PI-ang < ::Precision::Angular() )
|
||||
Standard_Real ang = ( shorts(i) >0 ? M_PI : endTan.Angle ( lVec ) );
|
||||
if ( myClosedMode && shorts(i) <=0 && M_PI-ang < ::Precision::Angular() )
|
||||
ang = 0.; // abv 21 Mar 00: trj3_s1-md-214.stp #2471: avoid going back
|
||||
// abv 05 Feb 02: face from Parasolid: use tolerance of edges for check
|
||||
// for coincidence (instead of vertex tolerance) in order
|
||||
|
@@ -1442,14 +1442,14 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
|
||||
// this means that degenerated edge should be added to one of poles, and
|
||||
// then usual procedure applied
|
||||
if ( ismodeu && mySurf->Surface()->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ) {
|
||||
gp_Pnt2d p ( ( ismodeu < 0 ? 0. : 2.*PI ), ismodeu * 0.5 * PI );
|
||||
gp_Pnt2d p ( ( ismodeu < 0 ? 0. : 2.*M_PI ), ismodeu * 0.5 * M_PI );
|
||||
gp_Dir2d d ( -ismodeu, 0. );
|
||||
Handle(Geom2d_Line) line = new Geom2d_Line ( p, d );
|
||||
TopoDS_Edge edge;
|
||||
B.MakeEdge ( edge );
|
||||
B.Degenerated ( edge, Standard_True );
|
||||
B.UpdateEdge ( edge, line, myFace, ::Precision::Confusion() );
|
||||
B.Range ( edge, myFace, 0., 2*PI );
|
||||
B.Range ( edge, myFace, 0., 2*M_PI );
|
||||
TopoDS_Vertex V;
|
||||
B.MakeVertex ( V, mySurf->Value ( p.X(), p.Y() ), ::Precision::Confusion() );
|
||||
V.Orientation(TopAbs_FORWARD);
|
||||
|
@@ -395,7 +395,7 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
|
||||
if (c1->IsKind(STANDARD_TYPE(Geom_Circle)) ||
|
||||
c1->IsKind(STANDARD_TYPE(Geom_Ellipse)))
|
||||
{
|
||||
Standard_Real diff = PI - Abs(clast1-cfirst2)*0.5;
|
||||
Standard_Real diff = M_PI - Abs(clast1-cfirst2)*0.5;
|
||||
first1 -= diff; last1 += diff;
|
||||
done1 = Standard_True;
|
||||
}
|
||||
@@ -422,7 +422,7 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
|
||||
else if (c1->IsKind(STANDARD_TYPE(Geom_Circle)) ||
|
||||
c1->IsKind(STANDARD_TYPE(Geom_Ellipse)))
|
||||
{
|
||||
domfirst1 = 0.; domlast1 = 2*PI;
|
||||
domfirst1 = 0.; domlast1 = 2*M_PI;
|
||||
}
|
||||
Standard_Real domfirst2 = first2, domlast2 = last2;
|
||||
if (c2->IsKind(STANDARD_TYPE(Geom_BSplineCurve)) ||
|
||||
@@ -442,7 +442,7 @@ static Standard_Real AdjustOnPeriodic3d (const Handle(Geom_Curve)& c,
|
||||
else if (c2->IsKind(STANDARD_TYPE(Geom_Circle)) ||
|
||||
c2->IsKind(STANDARD_TYPE(Geom_Ellipse)))
|
||||
{
|
||||
domfirst2 = 0.; domlast2 = 2*PI;
|
||||
domfirst2 = 0.; domlast2 = 2*M_PI;
|
||||
}
|
||||
|
||||
Standard_Real ipar1 = clast1, ipar2 = cfirst2;
|
||||
@@ -979,7 +979,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
|
||||
if (pc1->IsKind(STANDARD_TYPE(Geom2d_Circle)) ||
|
||||
pc1->IsKind(STANDARD_TYPE(Geom2d_Ellipse)))
|
||||
{
|
||||
Standard_Real diff = PI - Abs(clast1-cfirst2)*0.5;
|
||||
Standard_Real diff = M_PI - Abs(clast1-cfirst2)*0.5;
|
||||
first1 -= diff; last1 += diff;
|
||||
done1 = Standard_True;
|
||||
}
|
||||
@@ -1006,7 +1006,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
|
||||
else if (pc1->IsKind(STANDARD_TYPE(Geom2d_Circle)) ||
|
||||
pc1->IsKind(STANDARD_TYPE(Geom2d_Ellipse)))
|
||||
{
|
||||
domfirst1 = 0.; domlast1 = 2*PI;
|
||||
domfirst1 = 0.; domlast1 = 2*M_PI;
|
||||
}
|
||||
Standard_Real domfirst2 = first2, domlast2 = last2;
|
||||
if (pc2->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve)) ||
|
||||
@@ -1026,7 +1026,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc,
|
||||
else if (pc2->IsKind(STANDARD_TYPE(Geom2d_Circle)) ||
|
||||
pc2->IsKind(STANDARD_TYPE(Geom2d_Ellipse)))
|
||||
{
|
||||
domfirst2 = 0.; domlast2 = 2*PI;
|
||||
domfirst2 = 0.; domlast2 = 2*M_PI;
|
||||
}
|
||||
|
||||
Standard_Real ipar1 = clast1, ipar2 = cfirst2;
|
||||
|
@@ -685,14 +685,14 @@ Standard_Boolean ShapeFix_Wireframe::MergeSmallEdges(TopTools_MapOfShape& theSma
|
||||
if ( edge2.Orientation() == TopAbs_REVERSED ) Vec2.Reverse();
|
||||
Standard_Real tol2 = Precision::Confusion() * Precision::Confusion();
|
||||
if ( Vec1.SquareMagnitude() < tol2 ||
|
||||
Vec2.SquareMagnitude() < tol2 ) Ang1 = PI/2.;
|
||||
Vec2.SquareMagnitude() < tol2 ) Ang1 = M_PI/2.;
|
||||
else Ang1 = Abs(Vec1.Angle(Vec2));
|
||||
C2->D1(last2,P,Vec1);
|
||||
C3->D1(first3,P,Vec2);
|
||||
if ( edge2.Orientation() == TopAbs_REVERSED ) Vec1.Reverse();
|
||||
if ( edge3.Orientation() == TopAbs_REVERSED ) Vec2.Reverse();
|
||||
if ( Vec1.SquareMagnitude() < tol2 ||
|
||||
Vec2.SquareMagnitude() < tol2 ) Ang2 = PI/2.;
|
||||
Vec2.SquareMagnitude() < tol2 ) Ang2 = M_PI/2.;
|
||||
else Ang2 = Abs(Vec1.Angle(Vec2));
|
||||
//isLimAngle = (theLimitAngle != -1 && Min(Ang1,Ang2) > theLimitAngle);
|
||||
//take_next = (Ang2<Ang1);
|
||||
@@ -1125,14 +1125,14 @@ Standard_Boolean ShapeFix_Wireframe::MergeSmallEdges(TopTools_MapOfShape& theSma
|
||||
if ( edge2.Orientation() == TopAbs_REVERSED ) Vec2.Reverse();
|
||||
Standard_Real tol2 = Precision::Confusion() * Precision::Confusion();
|
||||
if ( Vec1.SquareMagnitude() < tol2 ||
|
||||
Vec2.SquareMagnitude() < tol2 ) Ang1 = PI/2.;
|
||||
Vec2.SquareMagnitude() < tol2 ) Ang1 = M_PI/2.;
|
||||
else Ang1 = Abs(Vec1.Angle(Vec2));
|
||||
C2->D1(last2,P,Vec1);
|
||||
C3->D1(first3,P,Vec2);
|
||||
if ( edge2.Orientation() == TopAbs_REVERSED ) Vec1.Reverse();
|
||||
if ( edge3.Orientation() == TopAbs_REVERSED ) Vec2.Reverse();
|
||||
if ( Vec1.SquareMagnitude() < tol2 ||
|
||||
Vec2.SquareMagnitude() < tol2 ) Ang2 = PI/2.;
|
||||
Vec2.SquareMagnitude() < tol2 ) Ang2 = M_PI/2.;
|
||||
else Ang2 = Abs(Vec1.Angle(Vec2));
|
||||
//isLimAngle = (theLimitAngle != -1 && Min(Ang1,Ang2) > theLimitAngle);
|
||||
//take_next = (Ang2<Ang1);
|
||||
|
Reference in New Issue
Block a user