Coding - Remove duplicate and self-referencing include directives (#739)

- Removal of self-referencing includes where files include themselves
- Elimination of duplicate include statements within the same file
- Cleanup of redundant includes in conditional compilation blocks
- Adding CI validation for validation PRs
This commit is contained in:
Pasukhin Dmitry
2025-10-08 18:04:28 +01:00
committed by dpasukhi
parent 76b05809d0
commit 775454b75a
81 changed files with 263 additions and 150 deletions
@@ -60,8 +60,6 @@
#include <TopTools_ListOfShape.hxx>
#include <Standard_Real.hxx>
#include <NCollection_BaseAllocator.hxx>
#include <gp_Pnt.hxx>
#include <gp_Ax2.hxx>
#include <gp_Dir.hxx>
#include <cmath>
@@ -39,7 +39,6 @@
#include <TopOpeBRepTool_SC.hxx>
#ifdef OCCT_DEBUG
#include <TopOpeBRep_FFDumper.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom_Line.hxx>
extern Standard_Boolean TopOpeBRep_GettraceBIPS();
@@ -37,7 +37,6 @@
#include <TopoDS.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom_Plane.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <ElCLib.hxx>
#include <ElSLib.hxx>
@@ -28,7 +28,6 @@
#ifdef OCCT_DEBUG
extern Standard_Boolean TopOpeBRepTool_GettraceVC();
#include <TopOpeBRepBuild_Builder.hxx>
#include <gp_Pnt.hxx>
#endif
//=================================================================================================
@@ -58,7 +58,6 @@
// includes especially needed by the static Project function
#ifdef DRAW
#include <TopOpeBRepDS_DRAW.hxx>
#include <Geom2d_Curve.hxx>
#endif
Standard_EXPORT Handle(Geom2d_Curve) BASISCURVE2D(const Handle(Geom2d_Curve)& C);
@@ -70,7 +70,6 @@ extern Standard_Boolean TopOpeBRepTool_GettraceCHKBSPL();
#define CurveImprovement
#ifdef DRAW
#include <DrawTrSurf.hxx>
#include <Geom2d_Curve.hxx>
static Standard_Integer NbCalls = 0;
#endif
//=================================================================================================
@@ -33,7 +33,6 @@
#include <Geom_TrimmedCurve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <BRep_Tool.hxx>
#include <TopExp_Explorer.hxx>
#include <TopOpeBRepTool_DRAW.hxx>
@@ -26,7 +26,6 @@
#include <TopOpeBRepTool_define.hxx>
#include <Geom_Curve.hxx>
#include <Geom2d_Curve.hxx>
#include <TopOpeBRepTool_define.hxx>
Standard_EXPORT void TopOpeBRepTool_DrawPoint(const gp_Pnt& P,
const Draw_MarkerShape T,
@@ -14,7 +14,6 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <BRep_Tool.hxx>
#include <BRepBlend_Line.hxx>
@@ -33,7 +33,6 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_EvolvedSection, GeomFill_SectionLaw)
#ifdef DRAW
#include <DrawTrSurf.hxx>
#include <Geom_Curve.hxx>
#include <Geom_BSplineCurve.hxx>
static Standard_Integer NumSec = 0;
static Standard_Boolean Affich = 0;
@@ -59,7 +59,6 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_LocationGuide, GeomFill_LocationLaw)
static Standard_Integer Affich = 0;
#include <Approx_Curve3d.hxx>
#include <DrawTrSurf.hxx>
#include <GeomFill_TrihedronWithGuide.hxx>
#endif
//=======================================================================
@@ -49,7 +49,6 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_NSections, GeomFill_SectionLaw)
#ifdef OCCT_DEBUG
#ifdef DRAW
#include <DrawTrSurf.hxx>
#include <Geom_Curve.hxx>
#endif
static Standard_Boolean Affich = 0;
static Standard_Integer NbSurf = 0;
@@ -77,7 +77,6 @@ static Standard_Integer NbSections = 0;
#ifdef DRAW
#include <DrawTrSurf.hxx>
#include <Geom_Curve.hxx>
#endif
static Standard_Boolean CheckSense(const TColGeom_SequenceOfCurve& Seq1,
@@ -34,8 +34,6 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_UniformSection, GeomFill_SectionLaw)
#ifdef DRAW
#include <DrawTrSurf.hxx>
#include <Geom_Curve.hxx>
#include <Geom_BSplineCurve.hxx>
static Standard_Integer NumSec = 0;
static Standard_Boolean Affich = 0;
#endif
@@ -83,7 +83,6 @@ static Standard_Integer NbProj = 0;
#ifdef OCCT_DEBUG
#include <OSD_Chronometer.hxx>
#include <Geom_Surface.hxx>
static Standard_Integer Affich = 0;
#endif
@@ -61,7 +61,6 @@
#include <IntAna2d_IntPoint.hxx>
#include <gp_Parab2d.hxx>
#include <IntAna2d_Conic.hxx>
#include <IntAna2d_AnaIntersection.hxx>
#include <gp_Hypr2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
@@ -234,8 +234,6 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_Surface)& S1,
#include <Extrema_POnSurf.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2dAPI_InterCurveCurve.hxx>
#include <Geom_Plane.hxx>
#include <ProjLib_ProjectOnPlane.hxx>
#include <GeomProjLib.hxx>
#include <ElCLib.hxx>
#include <Geom_TrimmedCurve.hxx>
@@ -19,7 +19,6 @@
#include <BRepAdaptor_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <GeomAbs_SurfaceType.hxx>
#include <BRep_Tool.hxx>
#include <Geom_Line.hxx>
@@ -33,7 +32,6 @@
#include <gp_Dir.hxx>
#include <gp_Cylinder.hxx>
#include <gp_Ax1.hxx>
#include <gp_Lin.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_Surface.hxx>
@@ -49,7 +47,6 @@
// Modified by skv - Tue Aug 31 12:13:51 2004 OCC569
#include <Precision.hxx>
#include <IntSurf_Quadric.hxx>
#include <math_Function.hxx>
#include <math_BrentMinimum.hxx>
@@ -64,7 +64,6 @@ static const Standard_Real DERIVEE_PREMIERE_NULLE = 0.000000000001;
#include <IntRes2d_TypeTrans.hxx>
#include <IntRes2d_Position.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <IntRes2d_Transition.hxx>
static long unsigned Mask32[32] = {
@@ -14,7 +14,6 @@
#include <Geom_BSplineCurve.hxx>
#include <HelixGeom_BuilderHelixCoil.hxx>
#include <HelixGeom_HelixCurve.hxx>
#include <HelixGeom_HelixCurve.hxx>
#include <HelixGeom_Tools.hxx>
//=================================================================================================
@@ -14,7 +14,6 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <GeomAdaptor_SurfaceOfLinearExtrusion.hxx>
#include <Approx_CurveOnSurface.hxx>
@@ -16,7 +16,6 @@
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <BRep_GCurve.hxx>
#include <BRepLib_ValidateEdge.hxx>
#include <BRep_PolygonOnTriangulation.hxx>
@@ -18,7 +18,6 @@
#include <Standard_Type.hxx>
#include <MAT_TListNodeOfListOfBisector.hxx>
#include <MAT_Bisector.hxx>
#include <MAT_ListOfBisector.hxx>
@@ -18,7 +18,6 @@
#include <Standard_Type.hxx>
#include <MAT_TListNodeOfListOfEdge.hxx>
#include <MAT_Edge.hxx>
#include <MAT_ListOfEdge.hxx>
@@ -39,8 +39,6 @@ IMPLEMENT_STANDARD_RTTIEXT(MAT2d_Circuit, Standard_Transient)
#include <Geom2d_Curve.hxx>
#include <Geom2d_Parabola.hxx>
#include <Geom2d_Hyperbola.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2d_CartesianPoint.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_Circle.hxx>
#endif