mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0028838: Configuration - undefine macros coming from X11 headers in place of collision
The macros Status, Convex, Opposite, FillSolid (coming from X11 headers) are now undefined in place of definition of methods with same name in OCCT headers. The usage of variables with name Status is now avoided. GL_GLEXT_LEGACY is now defined only if not already defined. The macros AddPrinter (coming from WinAPI headers) is now undefined within Message_Messenger class definition having method with the same name. CurrentDirectory macro is now undefined in OSD_Process.hxx.
This commit is contained in:
@@ -50,7 +50,7 @@ void CSLib::Normal (
|
||||
const gp_Vec& D1U,
|
||||
const gp_Vec& D1V,
|
||||
const Standard_Real SinTol,
|
||||
CSLib_DerivativeStatus& Status,
|
||||
CSLib_DerivativeStatus& theStatus,
|
||||
gp_Dir& Normal
|
||||
) {
|
||||
|
||||
@@ -61,18 +61,18 @@ gp_Dir& Normal
|
||||
gp_Vec D1UvD1V = D1U.Crossed(D1V);
|
||||
|
||||
if (D1UMag <= gp::Resolution() && D1VMag <= gp::Resolution()) {
|
||||
Status = D1IsNull;
|
||||
theStatus = D1IsNull;
|
||||
}
|
||||
else if (D1UMag <= gp::Resolution()) Status = D1uIsNull;
|
||||
else if (D1VMag <= gp::Resolution()) Status = D1vIsNull;
|
||||
// else if ((D1VMag / D1UMag) <= RealEpsilon()) Status = D1vD1uRatioIsNull;
|
||||
// else if ((D1UMag / D1VMag) <= RealEpsilon()) Status = D1uD1vRatioIsNull;
|
||||
else if (D1UMag <= gp::Resolution()) theStatus = D1uIsNull;
|
||||
else if (D1VMag <= gp::Resolution()) theStatus = D1vIsNull;
|
||||
// else if ((D1VMag / D1UMag) <= RealEpsilon()) theStatus = D1vD1uRatioIsNull;
|
||||
// else if ((D1UMag / D1VMag) <= RealEpsilon()) theStatus = D1uD1vRatioIsNull;
|
||||
else {
|
||||
Standard_Real Sin2 =
|
||||
D1UvD1V.SquareMagnitude() / (D1UMag * D1VMag);
|
||||
|
||||
if (Sin2 < (SinTol * SinTol)) { Status = D1uIsParallelD1v; }
|
||||
else { Normal = gp_Dir (D1UvD1V); Status = Done; }
|
||||
if (Sin2 < (SinTol * SinTol)) { theStatus = D1uIsParallelD1v; }
|
||||
else { Normal = gp_Dir (D1UvD1V); theStatus = Done; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ const gp_Vec& D2V,
|
||||
const gp_Vec& DUV,
|
||||
const Standard_Real SinTol,
|
||||
Standard_Boolean& Done,
|
||||
CSLib_NormalStatus& Status,
|
||||
CSLib_NormalStatus& theStatus,
|
||||
gp_Dir& Normal
|
||||
) {
|
||||
|
||||
@@ -107,25 +107,25 @@ gp_Dir& Normal
|
||||
|
||||
|
||||
if (LD1Nu <= RealEpsilon() && LD1Nv <= RealEpsilon()) {
|
||||
Status = D1NIsNull;
|
||||
theStatus = D1NIsNull;
|
||||
Done = Standard_False;
|
||||
}
|
||||
else if (LD1Nu < RealEpsilon()) {
|
||||
Status = D1NuIsNull;
|
||||
theStatus = D1NuIsNull;
|
||||
Done = Standard_True;
|
||||
Normal = gp_Dir (D1Nv);
|
||||
}
|
||||
else if (LD1Nv < RealEpsilon()) {
|
||||
Status = D1NvIsNull;
|
||||
theStatus = D1NvIsNull;
|
||||
Done = Standard_True;
|
||||
Normal = gp_Dir (D1Nu);
|
||||
}
|
||||
else if ((LD1Nv / LD1Nu) <= RealEpsilon()) {
|
||||
Status = D1NvNuRatioIsNull;
|
||||
theStatus = D1NvNuRatioIsNull;
|
||||
Done = Standard_False;
|
||||
}
|
||||
else if ((LD1Nu / LD1Nv) <= RealEpsilon()) {
|
||||
Status = D1NuNvRatioIsNull;
|
||||
theStatus = D1NuNvRatioIsNull;
|
||||
Done = Standard_False;
|
||||
}
|
||||
else {
|
||||
@@ -133,12 +133,12 @@ gp_Dir& Normal
|
||||
Standard_Real Sin2 = D1NCross.SquareMagnitude() / (LD1Nu * LD1Nv);
|
||||
|
||||
if (Sin2 < (SinTol * SinTol)) {
|
||||
Status = D1NuIsParallelD1Nv;
|
||||
theStatus = D1NuIsParallelD1Nv;
|
||||
Done = Standard_True;
|
||||
Normal = gp_Dir (D1Nu);
|
||||
}
|
||||
else {
|
||||
Status = InfinityOfSolutions;
|
||||
theStatus = InfinityOfSolutions;
|
||||
Done = Standard_False;
|
||||
}
|
||||
}
|
||||
@@ -149,7 +149,7 @@ void CSLib::Normal (
|
||||
const gp_Vec& D1U,
|
||||
const gp_Vec& D1V,
|
||||
const Standard_Real MagTol,
|
||||
CSLib_NormalStatus& Status,
|
||||
CSLib_NormalStatus& theStatus,
|
||||
gp_Dir& Normal
|
||||
) {
|
||||
// Function: Calculate the normal from tangents by u and by v.
|
||||
@@ -161,7 +161,7 @@ gp_Dir& Normal
|
||||
|
||||
if (NMag <= MagTol || D1UMag <= MagTol || D1VMag <= MagTol ) {
|
||||
|
||||
Status = Singular;
|
||||
theStatus = Singular;
|
||||
// if (D1UMag <= MagTol || D1VMag <= MagTol && NMag > MagTol) MagTol = 2* NMag;
|
||||
}
|
||||
else
|
||||
@@ -170,7 +170,7 @@ gp_Dir& Normal
|
||||
gp_Dir aD1U(D1U);
|
||||
gp_Dir aD1V(D1V);
|
||||
Normal = gp_Dir(aD1U.Crossed(aD1V));
|
||||
Status = Defined;
|
||||
theStatus = Defined;
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ void CSLib::Normal(const Standard_Integer MaxOrder,
|
||||
const Standard_Real Umax,
|
||||
const Standard_Real Vmin,
|
||||
const Standard_Real Vmax,
|
||||
CSLib_NormalStatus& Status,
|
||||
CSLib_NormalStatus& theStatus,
|
||||
gp_Dir& Normal,
|
||||
Standard_Integer& OrderU,
|
||||
Standard_Integer& OrderV)
|
||||
@@ -194,7 +194,7 @@ void CSLib::Normal(const Standard_Integer MaxOrder,
|
||||
// Standard_Integer i,l,Order=-1;
|
||||
Standard_Integer i=0,Order=-1;
|
||||
Standard_Boolean Trouve=Standard_False;
|
||||
// Status = Singular;
|
||||
// theStatus = Singular;
|
||||
Standard_Real Norme;
|
||||
gp_Vec D;
|
||||
//Find k0 such that all derivatives N=dS/du ^ dS/dv are null
|
||||
@@ -219,7 +219,7 @@ void CSLib::Normal(const Standard_Integer MaxOrder,
|
||||
{
|
||||
if(Order == 0)
|
||||
{
|
||||
Status = Defined;
|
||||
theStatus = Defined;
|
||||
Normal=D.Normalized();
|
||||
}
|
||||
else
|
||||
@@ -373,16 +373,16 @@ void CSLib::Normal(const Standard_Integer MaxOrder,
|
||||
//Polynom is always negative
|
||||
SP=-1;
|
||||
if(SP==0)
|
||||
Status = InfinityOfSolutions;
|
||||
theStatus = InfinityOfSolutions;
|
||||
else
|
||||
{
|
||||
Status = Defined;
|
||||
theStatus = Defined;
|
||||
Normal=SP*Vk0.Normalized();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Status = Defined;
|
||||
theStatus = Defined;
|
||||
Normal=D.Normalized();
|
||||
}
|
||||
}
|
||||
|
@@ -55,9 +55,9 @@ public:
|
||||
//! parallel the normal is undefined.
|
||||
//! To check that D1U and D1V are colinear the sinus of the angle
|
||||
//! between D1U and D1V is computed and compared with SinTol.
|
||||
//! The normal is computed if Status == Done else the Status gives the
|
||||
//! The normal is computed if theStatus == Done else the theStatus gives the
|
||||
//! reason why the computation has failed.
|
||||
Standard_EXPORT static void Normal (const gp_Vec& D1U, const gp_Vec& D1V, const Standard_Real SinTol, CSLib_DerivativeStatus& Status, gp_Dir& Normal);
|
||||
Standard_EXPORT static void Normal (const gp_Vec& D1U, const gp_Vec& D1V, const Standard_Real SinTol, CSLib_DerivativeStatus& theStatus, gp_Dir& Normal);
|
||||
|
||||
|
||||
//! If there is a singularity on the surface the previous method
|
||||
@@ -87,19 +87,19 @@ public:
|
||||
//! order 2 (it means that we cannot omit Eps).
|
||||
//! . if DNu Is not Null and DNv Is not Null Done = False, there are
|
||||
//! an infinity of normals at the considered point on the surface.
|
||||
Standard_EXPORT static void Normal (const gp_Vec& D1U, const gp_Vec& D1V, const gp_Vec& D2U, const gp_Vec& D2V, const gp_Vec& D2UV, const Standard_Real SinTol, Standard_Boolean& Done, CSLib_NormalStatus& Status, gp_Dir& Normal);
|
||||
Standard_EXPORT static void Normal (const gp_Vec& D1U, const gp_Vec& D1V, const gp_Vec& D2U, const gp_Vec& D2V, const gp_Vec& D2UV, const Standard_Real SinTol, Standard_Boolean& Done, CSLib_NormalStatus& theStatus, gp_Dir& Normal);
|
||||
|
||||
|
||||
//! Computes the normal direction of a surface as the cross product
|
||||
//! between D1U and D1V.
|
||||
Standard_EXPORT static void Normal (const gp_Vec& D1U, const gp_Vec& D1V, const Standard_Real MagTol, CSLib_NormalStatus& Status, gp_Dir& Normal);
|
||||
Standard_EXPORT static void Normal (const gp_Vec& D1U, const gp_Vec& D1V, const Standard_Real MagTol, CSLib_NormalStatus& theStatus, gp_Dir& Normal);
|
||||
|
||||
//! find the first order k0 of deriviative of NUV
|
||||
//! where: foreach order < k0 all the derivatives of NUV are
|
||||
//! null all the derivatives of NUV corresponding to the order
|
||||
//! k0 are collinear and have the same sens.
|
||||
//! In this case, normal at U,V is unique.
|
||||
Standard_EXPORT static void Normal (const Standard_Integer MaxOrder, const TColgp_Array2OfVec& DerNUV, const Standard_Real MagTol, const Standard_Real U, const Standard_Real V, const Standard_Real Umin, const Standard_Real Umax, const Standard_Real Vmin, const Standard_Real Vmax, CSLib_NormalStatus& Status, gp_Dir& Normal, Standard_Integer& OrderU, Standard_Integer& OrderV);
|
||||
Standard_EXPORT static void Normal (const Standard_Integer MaxOrder, const TColgp_Array2OfVec& DerNUV, const Standard_Real MagTol, const Standard_Real U, const Standard_Real V, const Standard_Real Umin, const Standard_Real Umax, const Standard_Real Vmin, const Standard_Real Vmax, CSLib_NormalStatus& theStatus, gp_Dir& Normal, Standard_Integer& OrderU, Standard_Integer& OrderV);
|
||||
|
||||
//! -- Computes the derivative of order Nu in the --
|
||||
//! direction U and Nv in the direction V of the not --
|
||||
|
Reference in New Issue
Block a user