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:
@@ -203,7 +203,7 @@ void GeomFill::GetShape (const Standard_Real MaxAng,
|
||||
default:
|
||||
{
|
||||
Standard_Integer NbSpan =
|
||||
(Standard_Integer)(Ceiling(3.*Abs(MaxAng)/2./PI));
|
||||
(Standard_Integer)(Ceiling(3.*Abs(MaxAng)/2./M_PI));
|
||||
NbPoles = 2*NbSpan+1;
|
||||
NbKnots = NbSpan+1;
|
||||
Degree = 2;
|
||||
@@ -380,7 +380,7 @@ void GeomFill::GetCircle( const Convert_ParameterisationType TConv,
|
||||
// Recadrage sur ]-pi/2, 3pi/2]
|
||||
if (Sina <0.) {
|
||||
if (Cosa > 0.) Angle = -Angle;
|
||||
else Angle = 2.*PI - Angle;
|
||||
else Angle = 2.*M_PI - Angle;
|
||||
}
|
||||
|
||||
switch (TConv) {
|
||||
@@ -466,7 +466,7 @@ Standard_Boolean GeomFill::GetCircle(const Convert_ParameterisationType TConv,
|
||||
// Recadrage sur ]-pi/2, 3pi/2]
|
||||
if (Sina <0.) {
|
||||
if (Cosa > 0.) Angle = -Angle;
|
||||
else Angle = 2.*PI - Angle;
|
||||
else Angle = 2.*M_PI - Angle;
|
||||
}
|
||||
|
||||
if (Abs(Sina)>Abs(Cosa)) {
|
||||
@@ -606,7 +606,7 @@ Standard_Boolean GeomFill::GetCircle(const Convert_ParameterisationType TConv,
|
||||
// Recadrage sur ]-pi/2, 3pi/2]
|
||||
if (Sina <0.) {
|
||||
if (Cosa > 0.) Angle = -Angle;
|
||||
else Angle = 2.*PI - Angle;
|
||||
else Angle = 2.*M_PI - Angle;
|
||||
}
|
||||
|
||||
if (Abs(Sina)>Abs(Cosa)) {
|
||||
|
@@ -112,7 +112,7 @@ GeomFill_CircularBlendFunc(const Handle(Adaptor3d_HCurve)& Path,
|
||||
|
||||
// Type de convertion ?
|
||||
if (Polynomial) myTConv=Convert_Polynomial;
|
||||
else if(maxang > 0.65*PI)
|
||||
else if(maxang > 0.65*M_PI)
|
||||
myTConv=Convert_QuasiAngular; //car c'est Continue
|
||||
else myTConv = Convert_TgtThetaOver2;
|
||||
//car c'est le plus performant
|
||||
|
@@ -155,7 +155,7 @@ static void sortbounds(const Standard_Integer nb,
|
||||
else bound[next]->Bounds(ln,fn);
|
||||
bound[next]->D1(fn,pbid,tgn);
|
||||
if(rev[next]) tgn.Reverse();
|
||||
Standard_Real ang = PI - tgi.Angle(tgn);
|
||||
Standard_Real ang = M_PI - tgi.Angle(tgn);
|
||||
stat[next].TgtAng(ang);
|
||||
if(bound[i]->HasNormals() && bound[next]->HasNormals()){
|
||||
stat[next].Constraint();
|
||||
@@ -183,7 +183,7 @@ static void coonscnd(const Standard_Integer nb,
|
||||
Standard_Real tolang = Min(bound[ip]->Tolang(),bound[i]->Tolang());
|
||||
Standard_Real an = stat[i].NorAng();
|
||||
Standard_Boolean twist = Standard_False;
|
||||
if(an >= 0.5*PI) { twist = Standard_True; an = PI-an; }
|
||||
if(an >= 0.5*M_PI) { twist = Standard_True; an = M_PI-an; }
|
||||
if(an > tolang) stat[i].DoKill(0.);
|
||||
else{
|
||||
Standard_Real fact = 0.5*27./4;
|
||||
@@ -1312,7 +1312,7 @@ void GeomFill_ConstrainedFilling::CheckTgteField(const Standard_Integer I)
|
||||
dout << seg;
|
||||
#endif
|
||||
if(vnor.Magnitude() > 1.e-15 && vtg.Magnitude() > 1.e-15){
|
||||
Standard_Real alpha = Abs(PI/2.-Abs(vnor.Angle(vtg)));
|
||||
Standard_Real alpha = Abs(M_PI/2.-Abs(vnor.Angle(vtg)));
|
||||
if(Abs(alpha) > maxang) maxang = Abs(alpha);
|
||||
}
|
||||
}
|
||||
@@ -1346,7 +1346,7 @@ void GeomFill_ConstrainedFilling::CheckApprox(const Standard_Integer I)
|
||||
vapp.SetXYZ(pbid.XYZ());
|
||||
vbound = bou->Norm(uu);
|
||||
if(vapp.Magnitude() > 1.e-15 && vbound.Magnitude() > 1.e-15){
|
||||
Standard_Real alpha = Abs(PI/2.-Abs(vbound.Angle(vapp)));
|
||||
Standard_Real alpha = Abs(M_PI/2.-Abs(vbound.Angle(vapp)));
|
||||
if(Abs(alpha) > maxang) maxang = Abs(alpha);
|
||||
}
|
||||
#ifdef DRAW
|
||||
@@ -1365,7 +1365,7 @@ void GeomFill_ConstrainedFilling::CheckApprox(const Standard_Integer I)
|
||||
cout<<"Controle approx/contrainte sur bord "<<I<<" : "<<endl;
|
||||
cout<<"Distance max : "<<maxdist<<endl;
|
||||
if (donor) {
|
||||
maxang = maxang*180./PI;
|
||||
maxang = maxang*180./M_PI;
|
||||
cout<<"Angle max : "<<maxang<<" deg"<<endl;
|
||||
}
|
||||
}
|
||||
@@ -1424,7 +1424,7 @@ void GeomFill_ConstrainedFilling::CheckResult(const Standard_Integer I)
|
||||
vres[k] = V1.Crossed(V2);
|
||||
if(vres[k].Magnitude() > 1.e-15 && vbound[k].Magnitude() > 1.e-15){
|
||||
Standard_Real alpha = Abs(vres[k].Angle(vbound[k]));
|
||||
alpha = Min(alpha,Abs(PI-alpha));
|
||||
alpha = Min(alpha,Abs(M_PI-alpha));
|
||||
if(alpha > maxang) maxang = alpha;
|
||||
ang[k] = alpha;
|
||||
hasang[k] = 1;
|
||||
@@ -1439,7 +1439,7 @@ void GeomFill_ConstrainedFilling::CheckResult(const Standard_Integer I)
|
||||
cout<<"Controle resultat/contrainte sur bord "<<I<<" : "<<endl;
|
||||
cout<<"Distance max : "<<maxdist<<endl;
|
||||
if (donor) {
|
||||
Standard_Real angdeg = maxang*180./PI;
|
||||
Standard_Real angdeg = maxang*180./M_PI;
|
||||
cout<<"Angle max : "<<angdeg<<" deg"<<endl;
|
||||
}
|
||||
#ifdef DRAW
|
||||
|
@@ -445,7 +445,7 @@ Handle(GeomFill_TrihedronLaw) GeomFill_CorrectedFrenet::Copy() const
|
||||
currParam = Last;
|
||||
|
||||
frenet->D0(currParam, Tangent, Normal, BN);
|
||||
if (prevTangent.Angle(Tangent) < PI/3 || i == 1) {
|
||||
if (prevTangent.Angle(Tangent) < M_PI/3 || i == 1) {
|
||||
parameters.Append(currParam);
|
||||
//OCC78
|
||||
SeqPoles.Append(Param);
|
||||
@@ -556,7 +556,7 @@ Standard_Real GeomFill_CorrectedFrenet::CalcAngleAT(const gp_Vec& Tangent, const
|
||||
else
|
||||
Normal_rot = Normal;
|
||||
Standard_Real angleAT = Normal_rot.Angle(prevNormal);
|
||||
if(angleAT > Precision::Angular() && PI - angleAT > Precision::Angular())
|
||||
if(angleAT > Precision::Angular() && M_PI - angleAT > Precision::Angular())
|
||||
if (Normal_rot.Crossed(prevNormal).IsOpposite(prevTangent, Precision::Angular()))
|
||||
angleAT = -angleAT;
|
||||
return angleAT;
|
||||
@@ -566,13 +566,13 @@ Standard_Real GeomFill_CorrectedFrenet::CalcAngleAT(const gp_Vec& Tangent, const
|
||||
// Purpose : This family of functions produce conversion of angle utility
|
||||
//===============================================================
|
||||
static Standard_Real corrPI_2PI(Standard_Real Ang){
|
||||
return Ang = (Ang >= 0.0? Ang: 2*PI+Ang);
|
||||
return Ang = (Ang >= 0.0? Ang: 2*M_PI+Ang);
|
||||
};
|
||||
static Standard_Real corr2PI_PI(Standard_Real Ang){
|
||||
return Ang = (Ang < PI? Ang: Ang-2*PI);
|
||||
return Ang = (Ang < M_PI? Ang: Ang-2*M_PI);
|
||||
};
|
||||
static Standard_Real diffAng(Standard_Real A, Standard_Real Ao){
|
||||
Standard_Real dA = (A-Ao) - Floor((A-Ao)/2.0/PI)*2.0*PI;
|
||||
Standard_Real dA = (A-Ao) - Floor((A-Ao)/2.0/M_PI)*2.0*M_PI;
|
||||
return dA = dA >= 0? corr2PI_PI(dA): -corr2PI_PI(-dA);
|
||||
};
|
||||
//===============================================================
|
||||
@@ -603,7 +603,7 @@ Standard_Real GeomFill_CorrectedFrenet::GetAngleAT(const Standard_Real Param) co
|
||||
Standard_Real DAng = CalcAngleAT(Tangent, Normal, HArrTangent->Value(iC), HArrNormal->Value(iC));
|
||||
Standard_Real DA = diffAng(DAng,dAng);
|
||||
// The correction (there is core of OCC78 bug)
|
||||
if(Abs(DA) > PI/2.0){
|
||||
if(Abs(DA) > M_PI/2.0){
|
||||
AngP = AngPo + DAng;
|
||||
};
|
||||
return AngP;
|
||||
|
@@ -47,7 +47,7 @@ static gp_Vec DDeriv(const gp_Vec& F, const gp_Vec& DF, const gp_Vec& D2F)
|
||||
//=======================================================================
|
||||
void GeomFill_DraftTrihedron::SetAngle(const Standard_Real Angle)
|
||||
{
|
||||
myAngle = PI/2 + Angle;
|
||||
myAngle = M_PI/2 + Angle;
|
||||
myCos = Cos(myAngle);
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ Standard_Boolean GeomFill_DraftTrihedron::D2(const Standard_Real Param,
|
||||
Handle(GeomFill_TrihedronLaw) GeomFill_DraftTrihedron::Copy() const
|
||||
{
|
||||
Handle(GeomFill_DraftTrihedron) copy =
|
||||
new (GeomFill_DraftTrihedron) (B,myAngle-PI/2);
|
||||
new (GeomFill_DraftTrihedron) (B,myAngle-M_PI/2);
|
||||
copy->SetCurve(myCurve);
|
||||
return copy;
|
||||
}
|
||||
|
@@ -631,8 +631,8 @@ Standard_Boolean GeomFill_Frenet::DoSingular(const Standard_Real U,
|
||||
|
||||
D0(U + h, T, N, BN);
|
||||
|
||||
if(Tangent.Angle(T) > PI/2) TFlag = -1;
|
||||
if(BiNormal.Angle(BN) > PI/2) BNFlag = -1;
|
||||
if(Tangent.Angle(T) > M_PI/2) TFlag = -1;
|
||||
if(BiNormal.Angle(BN) > M_PI/2) BNFlag = -1;
|
||||
|
||||
return Standard_True;
|
||||
}
|
||||
|
@@ -558,7 +558,7 @@ void GeomFill_GuideTrihedronPlan::SetInterval(const Standard_Real First,
|
||||
(myGuide->GetType() == GeomAbs_Line)) {
|
||||
Standard_Real Angle;
|
||||
Angle = myCurve->Line().Angle(myGuide->Line());
|
||||
if ((Angle<1.e-12) || ((2*PI-Angle)<1.e-12) )
|
||||
if ((Angle<1.e-12) || ((2*M_PI-Angle)<1.e-12) )
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
|
@@ -264,8 +264,8 @@ static void InGoodPeriod(const Standard_Real Prec,
|
||||
Inf(1) = myGuide->FirstParameter() - Delta/10;
|
||||
Sup(1) = myGuide->LastParameter() + Delta/10;
|
||||
|
||||
Inf(2) = -PI;
|
||||
Sup(2) = 3*PI;
|
||||
Inf(2) = -M_PI;
|
||||
Sup(2) = 3*M_PI;
|
||||
|
||||
Delta = Ul - Uf;
|
||||
Inf(3) = Uf - Delta/10;
|
||||
@@ -371,11 +371,11 @@ static void InGoodPeriod(const Standard_Real Prec,
|
||||
// d'angle le plus proche de P
|
||||
PInt = Int.Point(1);
|
||||
a1 = PInt.U();
|
||||
InGoodPeriod (CurAngle, 2*PI, a1);
|
||||
InGoodPeriod (CurAngle, 2*M_PI, a1);
|
||||
Standard_Real Dmin = Abs(a1-CurAngle);
|
||||
for (Standard_Integer jj=2;jj<=Int.NbPoints();jj++) {
|
||||
a2 = Int.Point(jj).U();
|
||||
InGoodPeriod (CurAngle, 2*PI, a2);
|
||||
InGoodPeriod (CurAngle, 2*M_PI, a2);
|
||||
if (Abs(a2-CurAngle) < Dmin) {
|
||||
PInt = Int.Point(jj);
|
||||
Dmin = Abs(a2-CurAngle);
|
||||
@@ -406,12 +406,12 @@ static void InGoodPeriod(const Standard_Real Prec,
|
||||
Angle = PInt.U();
|
||||
if (ii > 1) {
|
||||
Diff = Angle - OldAngle;
|
||||
if (Abs(Diff) > PI) {
|
||||
InGoodPeriod (OldAngle, 2*PI, Angle);
|
||||
if (Abs(Diff) > M_PI) {
|
||||
InGoodPeriod (OldAngle, 2*M_PI, Angle);
|
||||
Diff = Angle - OldAngle;
|
||||
}
|
||||
#if DEB
|
||||
if (Abs(Diff) > PI/4) {
|
||||
if (Abs(Diff) > M_PI/4) {
|
||||
cout << "Diff d'angle trop grand !!" << endl;
|
||||
}
|
||||
#endif
|
||||
@@ -1419,7 +1419,7 @@ void GeomFill_LocationGuide::InitX(const Standard_Real Param) const
|
||||
X(1) = ElCLib::InPeriod(X(1), myGuide->FirstParameter(),
|
||||
myGuide->LastParameter());
|
||||
}
|
||||
X(2) = ElCLib::InPeriod(X(2), 0, 2*PI);
|
||||
X(2) = ElCLib::InPeriod(X(2), 0, 2*M_PI);
|
||||
if (mySec->IsUPeriodic()) {
|
||||
X(3) = ElCLib::InPeriod(X(3), Uf, Ul);
|
||||
}
|
||||
|
@@ -446,7 +446,7 @@ void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path,
|
||||
// Nouvelle methode
|
||||
myAdpPath = new (GeomAdaptor_HCurve) (Path);
|
||||
Handle(Geom_Circle) C = new (Geom_Circle) (gp::XOY(), Radius);
|
||||
C->Rotate(gp::OZ(),PI/2.);
|
||||
C->Rotate(gp::OZ(),M_PI/2.);
|
||||
|
||||
mySec = new (GeomFill_UniformSection) (C, Path->FirstParameter(),
|
||||
Path->LastParameter());
|
||||
@@ -964,14 +964,14 @@ Standard_Boolean GeomFill_Pipe::KPartT4()
|
||||
Axis.YReverse();
|
||||
|
||||
// rotate the surface to set the iso U = 0 not in the result.
|
||||
Axis.Rotate(gp_Ax1(P0,ZRef),-PI/2.);
|
||||
Axis.Rotate(gp_Ax1(P0,ZRef),-M_PI/2.);
|
||||
|
||||
mySurface = new Geom_CylindricalSurface( Axis, myRadius);
|
||||
Standard_Real Alpha = V1.AngleWithRef(V2,ZRef);
|
||||
mySurface =
|
||||
new Geom_RectangularTrimmedSurface(mySurface,
|
||||
PI/2. ,
|
||||
PI/2. + Alpha,
|
||||
M_PI/2. ,
|
||||
M_PI/2. + Alpha,
|
||||
myAdpPath->FirstParameter(),
|
||||
myAdpPath->LastParameter());
|
||||
Ok = Standard_True; //C'est bien un cylindre
|
||||
@@ -1030,7 +1030,7 @@ Standard_Boolean GeomFill_Pipe::KPartT4()
|
||||
if (deltaV < 0.) {
|
||||
T.VReverse();
|
||||
VV1 = -VV1;
|
||||
VV2 = 2*PI + VV1 - deltaV;
|
||||
VV2 = 2*M_PI + VV1 - deltaV;
|
||||
}
|
||||
mySurface = new Geom_RectangularTrimmedSurface
|
||||
(new Geom_ToroidalSurface(T),
|
||||
|
@@ -145,7 +145,7 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt,
|
||||
beta5 = beta3*beta2;
|
||||
beta6 = beta3*beta3;
|
||||
|
||||
if ((PI/2 - beta)> NullAngle) {
|
||||
if ((M_PI/2 - beta)> NullAngle) {
|
||||
if (Abs(beta) < NullAngle) {
|
||||
Standard_Real cf = 2.0/(3*5*7);
|
||||
b = - (0.2+cf*beta2) / (1+ 0.2*beta2);
|
||||
@@ -273,7 +273,7 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt,
|
||||
else {
|
||||
b = ((Standard_Real) -1)/beta2;
|
||||
bpr = (2*betaprim) / beta3;
|
||||
if ((PI/2 - beta)> NullAngle) {
|
||||
if ((M_PI/2 - beta)> NullAngle) {
|
||||
tan_b = Tan(beta);
|
||||
dtan_b = betaprim * (1 + tan_b*tan_b);
|
||||
b2 = tan_b - beta;
|
||||
@@ -473,7 +473,7 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt,
|
||||
b = ((Standard_Real) -1)/beta2;
|
||||
bpr = (2*betaprim) / beta3;
|
||||
bsc = (2*betasecn - 6*betaprim*(betaprim/beta)) / beta3;
|
||||
if ((PI/2 - beta)> NullAngle) {
|
||||
if ((M_PI/2 - beta)> NullAngle) {
|
||||
tan_b = Tan(beta);
|
||||
dtan_b = betaprim * (1 + tan_b*tan_b);
|
||||
d2tan_b = betasecn * (1 + tan_b*tan_b)
|
||||
|
@@ -72,7 +72,7 @@ static Standard_Real Penalite(const Standard_Real angle,
|
||||
penal = dist + 2;
|
||||
|
||||
if (angle > 1.e-3) {
|
||||
penal += 1./angle -2./PI;
|
||||
penal += 1./angle -2./M_PI;
|
||||
}
|
||||
else {
|
||||
penal += 1.e3;
|
||||
@@ -86,7 +86,7 @@ static Standard_Real EvalAngle(const gp_Vec& V1,
|
||||
{
|
||||
Standard_Real angle;
|
||||
angle = V1.Angle(V2);
|
||||
if (angle > PI/2) angle = PI - angle;
|
||||
if (angle > M_PI/2) angle = M_PI - angle;
|
||||
return angle;
|
||||
}
|
||||
|
||||
@@ -393,7 +393,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path,
|
||||
{
|
||||
Extrema_ExtPC Projector(myPoint, Path->Curve(), Precision::Confusion());
|
||||
DistMini( Projector, Path->Curve(), Dist, PathParam );
|
||||
AngleMax = PI/2;
|
||||
AngleMax = M_PI/2;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -416,7 +416,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path,
|
||||
}
|
||||
}
|
||||
AngleMax = EvalAngle(VRef, dp1);
|
||||
if (isplan) AngleMax = PI/2 - AngleMax;
|
||||
if (isplan) AngleMax = M_PI/2 - AngleMax;
|
||||
|
||||
Standard_Boolean Trouve = Standard_False;
|
||||
Standard_Integer ii;
|
||||
@@ -498,7 +498,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path,
|
||||
}
|
||||
}
|
||||
AngleMax = EvalAngle(VRef, dp1);
|
||||
AngleMax = PI/2 - AngleMax;
|
||||
AngleMax = M_PI/2 - AngleMax;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -513,7 +513,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path,
|
||||
Tangente(Path->Curve(), Path->LastParameter(), P, dp1);
|
||||
V1.SetXYZ(TheAxe.Location().XYZ()-P.XYZ());
|
||||
if (Abs(V1.Dot(VRef)) <= DistPlan ) { // On prend l'autre extremite
|
||||
alpha = PI/2 - EvalAngle(VRef, dp1);
|
||||
alpha = M_PI/2 - EvalAngle(VRef, dp1);
|
||||
distaux = PonPath.Distance(PonSec);
|
||||
if (distaux > Tol) {
|
||||
myExt.Perform(P);
|
||||
@@ -545,7 +545,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path,
|
||||
w = Intersector.Point(ii).W();
|
||||
//(1.3) test d'angle
|
||||
Tangente( Path->Curve(), w, P, V);
|
||||
alpha = PI/2 - EvalAngle(V, VRef);
|
||||
alpha = M_PI/2 - EvalAngle(V, VRef);
|
||||
//(1.4) Test de distance Point-Courbe
|
||||
myExt.Perform(P);
|
||||
if ( myExt.IsDone() ) {
|
||||
@@ -683,7 +683,7 @@ void GeomFill_SectionPlacement::Perform(const Standard_Real Param,
|
||||
{
|
||||
gp_Pnt PonPath = Path->Value( PathParam );
|
||||
Dist = PonPath.Distance(myPoint);
|
||||
AngleMax = PI/2;
|
||||
AngleMax = M_PI/2;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -706,7 +706,7 @@ void GeomFill_SectionPlacement::Perform(const Standard_Real Param,
|
||||
}
|
||||
}
|
||||
AngleMax = EvalAngle(VRef, dp1);
|
||||
if (isplan) AngleMax = PI/2 - AngleMax;
|
||||
if (isplan) AngleMax = M_PI/2 - AngleMax;
|
||||
}
|
||||
|
||||
done = Standard_True;
|
||||
|
@@ -596,8 +596,8 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
|
||||
IsOpposite(axe.Direction(), 0.1) ) {
|
||||
Standard_Real f, l;
|
||||
// L'orientation parametrique est inversee
|
||||
l = 2*PI - UFirst;
|
||||
f = 2*PI - ULast;
|
||||
l = 2*M_PI - UFirst;
|
||||
f = 2*M_PI - ULast;
|
||||
UFirst = f;
|
||||
ULast = l;
|
||||
isUReversed = Standard_True;
|
||||
@@ -665,7 +665,7 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
|
||||
gp_Vec L(P1, P2), Dir(Centre1,Centre2);
|
||||
|
||||
Angle = L.Angle(Dir);
|
||||
if ((Angle > 0.01) && (Angle < PI/2-0.01)) {
|
||||
if ((Angle > 0.01) && (Angle < M_PI/2-0.01)) {
|
||||
if (R2<R1) Angle = -Angle;
|
||||
SError = error;
|
||||
gp_Ax3 Axis(Centre0, Dir, N);
|
||||
@@ -686,8 +686,8 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
|
||||
if (isUReversed ) {
|
||||
Standard_Real f, l;
|
||||
// L'orientation parametrique est inversee
|
||||
l = 2*PI - UFirst;
|
||||
f = 2*PI - ULast;
|
||||
l = 2*M_PI - UFirst;
|
||||
f = 2*M_PI - ULast;
|
||||
UFirst = f;
|
||||
ULast = l;
|
||||
}
|
||||
@@ -703,7 +703,7 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
|
||||
if (mySec->IsConstant(error)) {
|
||||
// La trajectoire
|
||||
gp_Pnt Centre;
|
||||
isVPeriodic = (Abs(Last-First -2*PI) < 1.e-15);
|
||||
isVPeriodic = (Abs(Last-First -2*M_PI) < 1.e-15);
|
||||
Standard_Real RotRadius;
|
||||
gp_Vec DP, DS, DN;
|
||||
myLoc->D0(0.1, M, DS);
|
||||
@@ -784,8 +784,8 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
|
||||
if (C.Position().Direction().
|
||||
IsOpposite(AxisOfSphere.YDirection(), 0.1) ) {
|
||||
// L'orientation parametrique est inversee
|
||||
l = 2*PI - UFirst;
|
||||
f = 2*PI - ULast;
|
||||
l = 2*M_PI - UFirst;
|
||||
f = 2*M_PI - ULast;
|
||||
isUReversed = Standard_True;
|
||||
}
|
||||
// On calcul le "glissement" parametrique.
|
||||
@@ -795,7 +795,7 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
|
||||
f -= rot;
|
||||
l -= rot;
|
||||
|
||||
if ( (f >= -PI/2) && (l <= PI/2)) {
|
||||
if ( (f >= -M_PI/2) && (l <= M_PI/2)) {
|
||||
Ok = Standard_True;
|
||||
myExchUV = Standard_True;
|
||||
UFirst = f;
|
||||
@@ -823,8 +823,8 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
|
||||
IsOpposite(axeiso.Direction(), 0.1) ) {
|
||||
Standard_Real f, l;
|
||||
// L'orientation parametrique est inversee
|
||||
l = 2*PI - UFirst;
|
||||
f = 2*PI - ULast;
|
||||
l = 2*M_PI - UFirst;
|
||||
f = 2*M_PI - ULast;
|
||||
UFirst = f;
|
||||
ULast = l;
|
||||
isUReversed = Standard_True;
|
||||
@@ -887,13 +887,13 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
|
||||
else {
|
||||
// On evalue l'angle du cone
|
||||
Standard_Real Angle = Abs(Dir.Angle(L));
|
||||
if (Angle > PI/2) Angle = PI -Angle;
|
||||
if (Angle > M_PI/2) Angle = M_PI -Angle;
|
||||
if (reverse) Angle = -Angle;
|
||||
aux = DS.Dot(DL);
|
||||
if (aux < 0) {
|
||||
Angle = - Angle;
|
||||
}
|
||||
if (Abs(Abs(Angle) - PI/2) > 0.01) {
|
||||
if (Abs(Abs(Angle) - M_PI/2) > 0.01) {
|
||||
// (2.2.b) Cone
|
||||
// si les 2 droites ne sont pas orthogonales
|
||||
Standard_Real Radius = CentreOfSurf.Distance(L.Location());
|
||||
|
@@ -319,11 +319,11 @@ void GeomFill_SweepSectionGenerator::Perform(const Standard_Boolean Polynomial)
|
||||
myFirstSect = GeomConvert::CurveToBSplineCurve(Circ);
|
||||
// le cercle est segmente car AppBlend_AppSurf ne gere
|
||||
// pas les courbes periodiques.
|
||||
myFirstSect->Segment(0., 2.*PI);
|
||||
myFirstSect->Segment(0., 2.*M_PI);
|
||||
*/
|
||||
Handle(Geom_TrimmedCurve) Circ =
|
||||
new Geom_TrimmedCurve(new Geom_Circle( CircleAxis, myRadius),
|
||||
0., 2.*PI);
|
||||
0., 2.*M_PI);
|
||||
|
||||
myFirstSect = GeomConvert::CurveToBSplineCurve(Circ,Convert_QuasiAngular);
|
||||
}
|
||||
@@ -414,7 +414,7 @@ void GeomFill_SweepSectionGenerator::Knots(TColStd_Array1OfReal& TKnots) const
|
||||
{
|
||||
/*
|
||||
if (myType == 1) {
|
||||
Standard_Real U = 2.*PI/3.;
|
||||
Standard_Real U = 2.*M_PI/3.;
|
||||
for ( Standard_Integer i = 1; i <= 4; i++)
|
||||
TKnots(i) = ( i-1) * U;
|
||||
}
|
||||
|
Reference in New Issue
Block a user