mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -39,11 +39,11 @@
|
||||
//=======================================================================
|
||||
Handle(Geom_Surface) BRepOffset::Surface(const Handle(Geom_Surface)& Surface,
|
||||
const Standard_Real Offset,
|
||||
BRepOffset_Status& Status)
|
||||
BRepOffset_Status& theStatus)
|
||||
{
|
||||
Standard_Real Tol = Precision::Confusion();
|
||||
|
||||
Status = BRepOffset_Good;
|
||||
theStatus = BRepOffset_Good;
|
||||
Handle(Geom_Surface) Result;
|
||||
|
||||
Handle(Standard_Type) TheType = Surface->DynamicType();
|
||||
@@ -70,10 +70,10 @@ Handle(Geom_Surface) BRepOffset::Surface(const Handle(Geom_Surface)& Surface,
|
||||
else if ( Radius <= -Tol ){
|
||||
Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),M_PI);
|
||||
Result = new Geom_CylindricalSurface( Axis, Abs(Radius));
|
||||
Status = BRepOffset_Reversed;
|
||||
theStatus = BRepOffset_Reversed;
|
||||
}
|
||||
else {
|
||||
Status = BRepOffset_Degenerated;
|
||||
theStatus = BRepOffset_Degenerated;
|
||||
}
|
||||
}
|
||||
else if (TheType == STANDARD_TYPE(Geom_ConicalSurface)) {
|
||||
@@ -113,10 +113,10 @@ Handle(Geom_Surface) BRepOffset::Surface(const Handle(Geom_Surface)& Surface,
|
||||
Axis.Rotate(gp_Ax1(Axis.Location(),Axis.Direction()),M_PI);
|
||||
Axis.ZReverse();
|
||||
Result = new Geom_SphericalSurface(Axis, -Radius);
|
||||
Status = BRepOffset_Reversed;
|
||||
theStatus = BRepOffset_Reversed;
|
||||
}
|
||||
else {
|
||||
Status = BRepOffset_Degenerated;
|
||||
theStatus = BRepOffset_Degenerated;
|
||||
}
|
||||
}
|
||||
else if (TheType == STANDARD_TYPE(Geom_ToroidalSurface)) {
|
||||
@@ -134,10 +134,10 @@ Handle(Geom_Surface) BRepOffset::Surface(const Handle(Geom_Surface)& Surface,
|
||||
Result = new Geom_ToroidalSurface(Axis,MajorRadius,MinorRadius);
|
||||
}
|
||||
else if (MinorRadius <= -Tol) {
|
||||
Status = BRepOffset_Reversed;
|
||||
theStatus = BRepOffset_Reversed;
|
||||
}
|
||||
else {
|
||||
Status = BRepOffset_Degenerated;
|
||||
theStatus = BRepOffset_Degenerated;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -152,8 +152,7 @@ Handle(Geom_Surface) BRepOffset::Surface(const Handle(Geom_Surface)& Surface,
|
||||
Handle(Geom_RectangularTrimmedSurface)::DownCast(Surface);
|
||||
Standard_Real U1,U2,V1,V2;
|
||||
S->Bounds(U1,U2,V1,V2);
|
||||
Handle(Geom_Surface) Off =
|
||||
BRepOffset::Surface(S->BasisSurface(),Offset,Status);
|
||||
Handle(Geom_Surface) Off = BRepOffset::Surface (S->BasisSurface(), Offset, theStatus);
|
||||
Result = new Geom_RectangularTrimmedSurface (Off,U1,U2,V1,V2);
|
||||
}
|
||||
else if (TheType == STANDARD_TYPE(Geom_OffsetSurface)) {
|
||||
|
@@ -50,7 +50,7 @@ public:
|
||||
//!
|
||||
//! If no particular case is detected, the returned
|
||||
//! surface will have the Type Geom_OffsetSurface.
|
||||
Standard_EXPORT static Handle(Geom_Surface) Surface (const Handle(Geom_Surface)& Surface, const Standard_Real Offset, BRepOffset_Status& Status);
|
||||
Standard_EXPORT static Handle(Geom_Surface) Surface (const Handle(Geom_Surface)& Surface, const Standard_Real Offset, BRepOffset_Status& theStatus);
|
||||
|
||||
|
||||
|
||||
|
@@ -21,20 +21,19 @@
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <BRepOffset_Status.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <GeomAbs_JoinType.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
class TopoDS_Face;
|
||||
class TopoDS_Edge;
|
||||
class TopoDS_Vertex;
|
||||
class TopoDS_Shape;
|
||||
|
||||
// resolve name collisions with X11 headers
|
||||
#ifdef Status
|
||||
#undef Status
|
||||
#endif
|
||||
|
||||
//! This class compute elemenary offset surface.
|
||||
//! Evaluate the offset generated :
|
||||
|
Reference in New Issue
Block a user