mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
This commit is contained in:
@@ -29,9 +29,9 @@ static void ComputePoles ( const Standard_Real R,
|
||||
|
||||
// Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
|
||||
Standard_Integer
|
||||
nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
|
||||
nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / M_PI) + 1;
|
||||
Standard_Integer
|
||||
nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / PI) + 1;
|
||||
nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / M_PI) + 1;
|
||||
Standard_Real AlfaU = deltaU / ( nbUSpans * 2);
|
||||
Standard_Real AlfaV = deltaV / ( nbVSpans * 2);
|
||||
|
||||
@@ -88,8 +88,8 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
|
||||
{
|
||||
Standard_Real deltaU = U2 - U1;
|
||||
Standard_Real deltaV = V2 - V1;
|
||||
Standard_DomainError_Raise_if( (deltaU>2*PI) || (deltaU<0.) ||
|
||||
(deltaV>2*PI) || (deltaV<0.),
|
||||
Standard_DomainError_Raise_if( (deltaU>2*M_PI) || (deltaU<0.) ||
|
||||
(deltaV>2*M_PI) || (deltaV<0.),
|
||||
"Convert_TorusToBSplineSurface");
|
||||
|
||||
isuperiodic = Standard_False;
|
||||
@@ -100,9 +100,9 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
|
||||
|
||||
// Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
|
||||
Standard_Integer
|
||||
nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
|
||||
nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / M_PI) + 1;
|
||||
Standard_Integer
|
||||
nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / PI) + 1;
|
||||
nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / M_PI) + 1;
|
||||
Standard_Real AlfaU = deltaU / ( nbUSpans * 2);
|
||||
Standard_Real AlfaV = deltaV / ( nbVSpans * 2);
|
||||
|
||||
@@ -166,7 +166,7 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
|
||||
#ifndef No_Exception
|
||||
Standard_Real delta = Param2 - Param1;
|
||||
#endif
|
||||
Standard_DomainError_Raise_if( (delta>2*PI) || (delta<0.),
|
||||
Standard_DomainError_Raise_if( (delta>2*M_PI) || (delta<0.),
|
||||
"Convert_TorusToBSplineSurface");
|
||||
|
||||
Standard_Integer i, j;
|
||||
@@ -181,20 +181,20 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
|
||||
Standard_Real W1, W2, CosU, CosV;
|
||||
|
||||
if ( isuperiodic) {
|
||||
ComputePoles(R, r, 0, 2.*PI, Param1, Param2, poles);
|
||||
ComputePoles(R, r, 0, 2.*M_PI, Param1, Param2, poles);
|
||||
|
||||
nbUPoles = 6;
|
||||
nbUKnots = 4;
|
||||
|
||||
deltaV = Param2 - Param1;
|
||||
Standard_Integer
|
||||
nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / PI) + 1;
|
||||
nbVSpans = (Standard_Integer)IntegerPart( 1.2 * deltaV / M_PI) + 1;
|
||||
Standard_Real AlfaV = deltaV / ( nbVSpans * 2);
|
||||
nbVPoles = 2 * nbVSpans + 1;
|
||||
nbVKnots = nbVSpans + 1;
|
||||
|
||||
for ( i = 1; i <= nbUKnots; i++) {
|
||||
uknots(i) = ( i-1) * 2. * PI /3.;
|
||||
uknots(i) = ( i-1) * 2. * M_PI /3.;
|
||||
umults(i) = 2;
|
||||
}
|
||||
for ( i = 1; i <= nbVKnots; i++) {
|
||||
@@ -207,20 +207,20 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
|
||||
CosV = Cos(AlfaV);
|
||||
}
|
||||
else {
|
||||
ComputePoles(R, r, Param1, Param2, 0., 2.*PI, poles);
|
||||
ComputePoles(R, r, Param1, Param2, 0., 2.*M_PI, poles);
|
||||
|
||||
nbVPoles = 6;
|
||||
nbVKnots = 4;
|
||||
|
||||
deltaU = Param2 - Param1;
|
||||
Standard_Integer
|
||||
nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
|
||||
nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / M_PI) + 1;
|
||||
Standard_Real AlfaU = deltaU / ( nbUSpans * 2);
|
||||
nbUPoles = 2 * nbUSpans + 1;
|
||||
nbUKnots = nbUSpans + 1;
|
||||
|
||||
for ( i = 1; i <= nbVKnots; i++) {
|
||||
vknots(i) = ( i-1) * 2. * PI /3.;
|
||||
vknots(i) = ( i-1) * 2. * M_PI /3.;
|
||||
vmults(i) = 2;
|
||||
}
|
||||
for ( i = 1; i <= nbUKnots; i++) {
|
||||
@@ -281,12 +281,12 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
|
||||
Standard_Real R = T.MajorRadius();
|
||||
Standard_Real r = T.MinorRadius();
|
||||
|
||||
ComputePoles( R, r, 0., 2.*PI, 0., 2.*PI, poles);
|
||||
ComputePoles( R, r, 0., 2.*M_PI, 0., 2.*M_PI, poles);
|
||||
|
||||
uknots( 1) = vknots( 1) = 0.;
|
||||
uknots( 2) = vknots( 2) = 2. * PI / 3.;
|
||||
uknots( 3) = vknots( 3) = 4. * PI / 3.;
|
||||
uknots( 4) = vknots( 4) = 2. * PI;
|
||||
uknots( 2) = vknots( 2) = 2. * M_PI / 3.;
|
||||
uknots( 3) = vknots( 3) = 4. * M_PI / 3.;
|
||||
uknots( 4) = vknots( 4) = 2. * M_PI;
|
||||
for ( i = 1; i <= 4; i++) {
|
||||
umults( i) = vmults( i) = 2;
|
||||
}
|
||||
|
Reference in New Issue
Block a user