mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
This commit is contained in:
@@ -60,7 +60,7 @@ Handle(Geom_Surface) BRepOffset::Surface(const Handle(Geom_Surface)& Surface,
|
||||
Result = new Geom_CylindricalSurface( Axis, Radius);
|
||||
}
|
||||
else if ( Radius <= -Tol ){
|
||||
Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),PI);
|
||||
Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),M_PI);
|
||||
Result = new Geom_CylindricalSurface( Axis, Abs(Radius));
|
||||
Status = BRepOffset_Reversed;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ Handle(Geom_Surface) BRepOffset::Surface(const Handle(Geom_Surface)& Surface,
|
||||
gp_Vec Z( Axis.Direction());
|
||||
Z *= - Offset * Sin(Alpha);
|
||||
Axis.Translate(Z);
|
||||
Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),PI);
|
||||
Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),M_PI);
|
||||
Alpha = -Alpha;
|
||||
}
|
||||
Result = new Geom_ConicalSurface(Axis, Alpha, Radius);
|
||||
@@ -102,7 +102,7 @@ Handle(Geom_Surface) BRepOffset::Surface(const Handle(Geom_Surface)& Surface,
|
||||
Result = new Geom_SphericalSurface(Axis, Radius);
|
||||
}
|
||||
else if ( Radius <= -Tol ) {
|
||||
Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),PI);
|
||||
Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),M_PI);
|
||||
Axis.ZReverse();
|
||||
Result = new Geom_SphericalSurface(Axis, -Radius);
|
||||
Status = BRepOffset_Reversed;
|
||||
|
@@ -1946,7 +1946,7 @@ void BRepOffset_MakeOffset::CorrectConicalFaces()
|
||||
ElSLib::Parameters( theSphere, fPnt, Uf, Vf );
|
||||
ElSLib::Parameters( theSphere, lPnt, Ul, Vl );
|
||||
if (Abs(Ul) <= Precision::Confusion())
|
||||
Ul = 2.*PI;
|
||||
Ul = 2.*M_PI;
|
||||
Handle(Geom_Curve) aCurv = aSphSurf->VIso(Vf);
|
||||
/*
|
||||
if (!isFirstFace)
|
||||
@@ -2078,11 +2078,11 @@ void BRepOffset_MakeOffset::CorrectConicalFaces()
|
||||
Standard_Real Vfirst, Vlast;
|
||||
if (p2d1.Y() > 0.)
|
||||
{
|
||||
Vfirst = p2d1.Y(); Vlast = PI/2.;
|
||||
Vfirst = p2d1.Y(); Vlast = M_PI/2.;
|
||||
}
|
||||
else
|
||||
{
|
||||
Vfirst = -PI/2.; Vlast = p2d1.Y();
|
||||
Vfirst = -M_PI/2.; Vlast = p2d1.Y();
|
||||
}
|
||||
TopoDS_Face NewSphericalFace = BRepLib_MakeFace(aSphSurf, Ufirst, Ulast, Vfirst, Vlast, Precision::Confusion());
|
||||
TopoDS_Edge OldEdge;
|
||||
@@ -2154,12 +2154,12 @@ void BRepOffset_MakeOffset::CorrectConicalFaces()
|
||||
apex = OffSurf->Value( Uapex, Vapex );
|
||||
|
||||
//Making new degenerated edge
|
||||
Handle(Geom2d_Line) theLine = GCE2d_MakeLine( gp_Pnt2d( 0., Vapex ), gp_Pnt2d( 2.*PI, Vapex ) );
|
||||
Handle(Geom2d_Line) theLine = GCE2d_MakeLine( gp_Pnt2d( 0., Vapex ), gp_Pnt2d( 2.*M_PI, Vapex ) );
|
||||
TopoDS_Edge NewEdge;
|
||||
BB.MakeEdge( NewEdge );
|
||||
NewEdge.Orientation(TopAbs_FORWARD);
|
||||
BB.UpdateEdge( NewEdge, theLine, Cone, Precision::Confusion() );
|
||||
BB.Range( NewEdge, 0., 2.*PI );
|
||||
BB.Range( NewEdge, 0., 2.*M_PI );
|
||||
BB.SameParameter( NewEdge, Standard_True );
|
||||
BB.SameRange( NewEdge, Standard_True );
|
||||
BB.Degenerated( NewEdge, Standard_True );
|
||||
@@ -2250,12 +2250,12 @@ void BRepOffset_MakeOffset::CorrectConicalFaces()
|
||||
apex = OffSurf->Value( Uapex, Vapex );
|
||||
|
||||
//Making new degenerated edge
|
||||
Handle(Geom2d_Line) theLine = GCE2d_MakeLine( gp_Pnt2d( 0., Vapex ), gp_Pnt2d( 2.*PI, Vapex ) );
|
||||
Handle(Geom2d_Line) theLine = GCE2d_MakeLine( gp_Pnt2d( 0., Vapex ), gp_Pnt2d( 2.*M_PI, Vapex ) );
|
||||
TopoDS_Edge NewEdge;
|
||||
BB.MakeEdge( NewEdge );
|
||||
NewEdge.Orientation(TopAbs_FORWARD);
|
||||
BB.UpdateEdge( NewEdge, theLine, Cone, BRep_Tool::Tolerance( Circ ) );
|
||||
BB.Range( NewEdge, 0., 2.*PI );
|
||||
BB.Range( NewEdge, 0., 2.*M_PI );
|
||||
BB.SameParameter( NewEdge, Standard_True );
|
||||
BB.SameRange( NewEdge, Standard_True );
|
||||
BB.Degenerated( NewEdge, Standard_True );
|
||||
@@ -2358,9 +2358,9 @@ void BRepOffset_MakeOffset::CorrectConicalFaces()
|
||||
ElSLib::Parameters( theSphere, OrPnt, Uor, Vor );
|
||||
TopoDS_Face NewFace;
|
||||
if (Vor > 0.)
|
||||
NewFace = BRepLib_MakeFace( theSphere, 0., 2.*PI, Vor, PI/2. );
|
||||
NewFace = BRepLib_MakeFace( theSphere, 0., 2.*M_PI, Vor, M_PI/2. );
|
||||
else
|
||||
NewFace = BRepLib_MakeFace( theSphere, 0., 2.*PI, -PI/2., Vor );
|
||||
NewFace = BRepLib_MakeFace( theSphere, 0., 2.*M_PI, -M_PI/2., Vor );
|
||||
|
||||
//Updating the bound of NewFace
|
||||
TopoDS_Edge Bound;
|
||||
@@ -2436,12 +2436,12 @@ void BRepOffset_MakeOffset::CorrectConicalFaces()
|
||||
apex = OffSurf->Value( Uapex, Vapex );
|
||||
|
||||
//Making new degenerated edge
|
||||
Handle(Geom2d_Line) theLine = GCE2d_MakeLine( gp_Pnt2d( 0., Vapex ), gp_Pnt2d( 2.*PI, Vapex ) );
|
||||
Handle(Geom2d_Line) theLine = GCE2d_MakeLine( gp_Pnt2d( 0., Vapex ), gp_Pnt2d( 2.*M_PI, Vapex ) );
|
||||
TopoDS_Edge NewEdge;
|
||||
BB.MakeEdge( NewEdge );
|
||||
NewEdge.Orientation(TopAbs_FORWARD);
|
||||
BB.UpdateEdge( NewEdge, theLine, Cone, BRep_Tool::Tolerance( Circ ) );
|
||||
BB.Range( NewEdge, 0., 2.*PI );
|
||||
BB.Range( NewEdge, 0., 2.*M_PI );
|
||||
BB.SameParameter( NewEdge, Standard_True );
|
||||
BB.SameRange( NewEdge, Standard_True );
|
||||
BB.Degenerated( NewEdge, Standard_True );
|
||||
|
@@ -203,7 +203,7 @@ static void ComputeCurve3d(TopoDS_Edge Edge,
|
||||
if ( D.IsParallel(gp::DX2d(),Precision::Angular())) { // Iso V.
|
||||
if ( STy == GeomAbs_Sphere) {
|
||||
gp_Pnt2d P = C.Line().Location();
|
||||
if ( Abs( Abs(P.Y()) -PI/2. ) < Precision::PConfusion()) {
|
||||
if ( Abs( Abs(P.Y()) -M_PI/2. ) < Precision::PConfusion()) {
|
||||
TheBuilder.Degenerated(Edge, Standard_True);
|
||||
}
|
||||
else {
|
||||
@@ -1391,18 +1391,18 @@ void BRepOffset_Offset::Init(const TopoDS_Vertex& Vertex,
|
||||
// V` = +/- PI + 2 k` PI
|
||||
gp_Pnt2d P2d = PCurve->Value(f);
|
||||
Standard_Boolean IsToAdjust = Standard_False;
|
||||
if ( P2d.Y() < -PI/2.) {
|
||||
if ( P2d.Y() < -M_PI/2.) {
|
||||
IsToAdjust = Standard_True;
|
||||
PCurve->Mirror(gp_Ax2d(gp_Pnt2d(0.,-PI/2.),gp::DX2d()));
|
||||
PCurve->Mirror(gp_Ax2d(gp_Pnt2d(0.,-M_PI/2.),gp::DX2d()));
|
||||
}
|
||||
else if ( P2d.Y() > PI/2.) {
|
||||
else if ( P2d.Y() > M_PI/2.) {
|
||||
IsToAdjust = Standard_True;
|
||||
PCurve->Mirror(gp_Ax2d(gp_Pnt2d(0., PI/2.),gp::DX2d()));
|
||||
PCurve->Mirror(gp_Ax2d(gp_Pnt2d(0., M_PI/2.),gp::DX2d()));
|
||||
}
|
||||
if ( IsToAdjust) {
|
||||
// set the u firstpoint in [0,2*pi]
|
||||
gp_Vec2d Tr( PI, 0.);
|
||||
if ( P2d.X() > PI) Tr.Reverse();
|
||||
gp_Vec2d Tr( M_PI, 0.);
|
||||
if ( P2d.X() > M_PI) Tr.Reverse();
|
||||
PCurve->Translate(Tr);
|
||||
}
|
||||
|
||||
|
@@ -994,7 +994,7 @@ static Standard_Boolean BSplineEdges(const TopoDS_Edge& E1,
|
||||
|
||||
if (Der1.Magnitude() <= gp::Resolution() ||
|
||||
Der2.Magnitude() <= gp::Resolution())
|
||||
angle = PI/2.;
|
||||
angle = M_PI/2.;
|
||||
else
|
||||
angle = Der1.Angle(Der2);
|
||||
|
||||
@@ -1031,7 +1031,7 @@ static Standard_Real AngleWireEdge(const TopoDS_Wire& aWire,
|
||||
if (V11.IsSame(CV) && V21.IsSame(CV))
|
||||
{
|
||||
BSplineEdges( FirstEdge, anEdge, 0, 0, Angle );
|
||||
Angle = PI - Angle;
|
||||
Angle = M_PI - Angle;
|
||||
}
|
||||
else if (V11.IsSame(CV) && V22.IsSame(CV))
|
||||
BSplineEdges( FirstEdge, anEdge, 0, 1, Angle );
|
||||
@@ -1040,7 +1040,7 @@ static Standard_Real AngleWireEdge(const TopoDS_Wire& aWire,
|
||||
else
|
||||
{
|
||||
BSplineEdges( FirstEdge, anEdge, 1, 1, Angle );
|
||||
Angle = PI - Angle;
|
||||
Angle = M_PI - Angle;
|
||||
}
|
||||
return Angle;
|
||||
}
|
||||
|
Reference in New Issue
Block a user