1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025765: Coding rules - clean up code from obsolete macro checks

Unused code paths (including definition of these macros and meaningless comments) were eliminated.
This commit is contained in:
apn
2015-02-24 19:27:20 +03:00
committed by bugmaster
parent f1b0b4f9c6
commit d2094e110f
130 changed files with 11 additions and 1775 deletions

View File

@@ -52,8 +52,6 @@
// MyHatchStyle : HatchStyle;
#define OCC1174 // SAV : 08/01/03 Added back face interior color
//-Constructors
//-Destructors
@@ -64,9 +62,7 @@ Aspect_AspectFillArea::Aspect_AspectFillArea () {
MyInteriorStyle = Aspect_IS_EMPTY;
MyInteriorColor = Quantity_NOC_CYAN1;
#ifdef OCC1174
MyBackInteriorColor = Quantity_NOC_CYAN1;
#endif
MyEdgeColor = Quantity_NOC_WHITE;
MyEdgeType = Aspect_TOL_SOLID;
MyEdgeWidth = 1.0;
@@ -103,9 +99,7 @@ void Aspect_AspectFillArea::SetInteriorColor (const Quantity_Color& AColor) {
void Aspect_AspectFillArea::SetBackInteriorColor( const Quantity_Color& color )
{
#ifdef OCC1174
MyBackInteriorColor = color;
#endif
}
void Aspect_AspectFillArea::SetEdgeColor (const Quantity_Color& AColor) {
@@ -156,9 +150,7 @@ void Aspect_AspectFillArea::Values (Aspect_InteriorStyle& AStyle, Quantity_Color
AStyle = MyInteriorStyle;
AIntColor = MyInteriorColor;
#ifdef OCC1174
BackIntColor = MyBackInteriorColor;
#endif
AEdgeColor = MyEdgeColor;
AType = MyEdgeType;
AWidth = MyEdgeWidth;

View File

@@ -13,14 +13,6 @@
// Modified 23/02/98 : FMN ; Remplacement PI par Standard_PI
#define CSR577 //GG 25/09/00 Avoid to have unaccuracy coordinates computation
// when the grid is activated.
#define OCC192_193 // jfa 27/02/2002
// for big rotation angles - error of negative values expression in round numbers
#define xTRACE
#include <Aspect_CircularGrid.ixx>
#include <Aspect_Grid.hxx>
#include <Standard_NumericError.hxx>
@@ -71,11 +63,6 @@ void Aspect_CircularGrid::Compute(const Quantity_Length X,
Quantity_Length& gridX,
Quantity_Length& gridY) const {
#ifdef TRACE
if( X == 0. || Y == 0. ) {
cout << " Aspect_CircularGrid" << endl;
}
#endif
Standard_Real xo = XOrigin();
Standard_Real yo = YOrigin();
Standard_Real d = Sqrt( (xo-X)*(xo-X) + (yo-Y)*(yo-Y) );
@@ -85,13 +72,8 @@ void Aspect_CircularGrid::Compute(const Quantity_Length X,
Standard_Real a = ACos(cosinus);
Standard_Real ra = RotationAngle();
if ( Y < yo ) a = 2 * M_PI - a;
#ifdef OCC192_193
n = (Standard_Integer ) ((a-ra)/myAlpha + Sign(0.5, a-ra)) ;
#else
n = (Standard_Integer ) ((a-ra)/myAlpha +0.5 ) ;
#endif
#ifdef CSR577
Standard_Real cs=0,sn=0;
Standard_Boolean done = Standard_False;
Standard_Integer nmax = 2*myDivisionNumber;
@@ -139,18 +121,8 @@ void Aspect_CircularGrid::Compute(const Quantity_Length X,
Standard_Real ang = ra + Standard_Real(n)*myAlpha;
cs = Cos(ang); sn = Sin(ang);
}
#else
Standard_Real ang = RotationAngle()+ Standard_Real(n)*myAlpha;
Standard_Real cs = Cos(ang);
Standard_Real sn = Sin(ang);
#endif
gridX = xo + cs * radius;
gridY = yo + sn * radius;
#ifdef TRACE
cout << "Aspect_CircularGrid::Compute (" << Quantity_Length (X) << ", "
<< Quantity_Length (Y) << ", " << Quantity_Length (gridX) << ", "
<< Quantity_Length (gridY) << ")" << endl;
#endif
}
Quantity_Length Aspect_CircularGrid::RadiusStep() const {

View File

@@ -14,9 +14,6 @@
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
-- Updated: GG IMP230300 Add grid color parameters in constructor
-- and add new methods SetColors() & Colors()
deferred class Grid from Aspect
inherits TShared from MMgt

View File

@@ -11,9 +11,6 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
// Updated: GG IMP230300 Add grid color parameters in constructor
// and add new methods SetColors() & Colors()
#include <Aspect_Grid.ixx>

View File

@@ -13,11 +13,6 @@
// Modified 23/02/98 : FMN ; Remplacement PI par Standard_PI
#define CSR577 //GG 25/09/00 Avoid to have unaccuracy coordinates computation
// when the grid is activated.
#define xTRACE
#include <Aspect_RectangularGrid.ixx>
@@ -100,20 +95,9 @@ void Aspect_RectangularGrid::Compute(const Quantity_Length X,
Standard_Integer n2 = Standard_Integer ( Abs(D2)/myYStep + 0.5);
Standard_Real offset1 = c1 + Standard_Real(n1) * Sign (myXStep , D1);
Standard_Real offset2 = c2 + Standard_Real(n2) * Sign (myYStep , D2);
#ifdef CSR577
Standard_Real Delta = a1*b2 - b1*a2;
gridX = ( offset2*a1 - offset1*a2) /Delta;
gridY = ( offset2*b1 - offset1*b2) /Delta;
#else
Standard_Real Delta = b1*a2 - a1*b2;
gridX = ( offset1*a2 - offset2*a1) /Delta;
gridY = ( offset1*b2 - offset2*b1) /Delta;
#endif
#ifdef TRACE
cout << "Aspect_RectangularGrid::Compute (" << Quantity_Length (X) << ", "
<< Quantity_Length (Y) << ", " << Quantity_Length (gridX) << ", "
<< Quantity_Length (gridY) << ")" << endl;
#endif
}
Quantity_Length Aspect_RectangularGrid::XStep() const {
@@ -143,7 +127,6 @@ void Aspect_RectangularGrid::Init () {
// b2 = Sin (mySecondAngle + RotationAngle() + M_PI / 2.);
// c2 = XOrigin() * b2 - YOrigin() * a2;
#ifdef CSR577
Standard_Real angle1 = myFirstAngle + RotationAngle();
Standard_Real angle2 = mySecondAngle + RotationAngle();
if ( angle1 != 0. ) {
@@ -162,15 +145,6 @@ void Aspect_RectangularGrid::Init () {
} else {
a2 = -1.; b2 = 0.; c2 = YOrigin();
}
#else
a1 = -Sin (myFirstAngle + RotationAngle());
b1 = Cos (myFirstAngle + RotationAngle());
c1 = XOrigin() * b1 - YOrigin() * a1;
a2 = -Sin (mySecondAngle + RotationAngle() + M_PI / 2.);
b2 = Cos (mySecondAngle + RotationAngle() + M_PI / 2.);
c2 = XOrigin() * b2 - YOrigin() * a2;
#endif
//-zov
}