clang-format -i -style=file $_
}
+ - name: Clean up duplicate includes
+ if: steps.changed-files.outputs.has_files == 'true'
+ shell: pwsh
+ run: |
+ $files = Get-Content "changed_files.txt" | Where-Object { Test-Path $_ }
+ $files | ForEach-Object {
+ python3 .github/actions/scripts/cleanup-includes.py --files "$_"
+ }
+
+ - name: Re-run clang-format after include cleanup
+ if: steps.changed-files.outputs.has_files == 'true'
+ shell: pwsh
+ run: |
+ $files = Get-Content "changed_files.txt" | Where-Object { Test-Path $_ }
+ $files | ForEach-Object -ThrottleLimit 8 -Parallel {
+ clang-format -i -style=file $_
+ }
+
- name: Remove empty lines after Standard_DEPRECATED
if: steps.changed-files.outputs.has_files == 'true'
shell: pwsh
--- /dev/null
+#!/usr/bin/env python3
+"""
+Script to clean up duplicate #include directives and self-includes in C++ source files.
+Removes:
+1. Duplicate #include statements (keeps only the first occurrence)
+2. Self-includes (e.g., Foo.hxx including "Foo.hxx")
+
+Processes: .cxx, .hxx, .pxx, .lxx, .gxx files
+"""
+
+import os
+import re
+from pathlib import Path
+from typing import List, Tuple
+
+
+def get_filename_without_extension(filepath: str) -> str:
+ """Get the filename without extension."""
+ return Path(filepath).stem
+
+
+def process_file(filepath: str, dry_run: bool = False) -> Tuple[bool, int, bool]:
+ """
+ Process a single file to remove duplicate includes and self-includes.
+
+ Returns:
+ Tuple of (modified, num_duplicates_removed, had_self_include)
+ """
+ try:
+ with open(filepath, 'r', encoding='utf-8', errors='ignore') as f:
+ lines = f.readlines()
+ except Exception as e:
+ print(f"Error reading {filepath}: {e}")
+ return False, 0, False
+
+ # Pattern to match #include directives and preprocessor directives
+ include_pattern = re.compile(r'^\s*#\s*include\s+[<"]([^>"]+)[>"]')
+ preprocessor_pattern = re.compile(r'^\s*#\s*(if|ifdef|ifndef|elif|else|endif)')
+
+ ifdef_stack = [set()] # Stack of tuples: (parent_scope_includes, current_branch_includes)
+ new_lines = []
+ duplicates_removed = 0
+ had_self_include = False
+ in_block_comment = False
+
+ base_filename = get_filename_without_extension(filepath)
+ file_extension = Path(filepath).suffix
+
+ for line in lines:
+ # Track multi-line comments
+ if '/*' in line:
+ in_block_comment = True
+ if '*/' in line:
+ in_block_comment = False
+ new_lines.append(line)
+ continue
+
+ # Skip lines in block comments or single-line comments
+ stripped = line.lstrip()
+ if in_block_comment or stripped.startswith('//'):
+ new_lines.append(line)
+ continue
+
+ # Track preprocessor scope changes
+ prep_match = preprocessor_pattern.match(line)
+ if prep_match:
+ directive = prep_match.group(1)
+ if directive in ('if', 'ifdef', 'ifndef'):
+ # Start new scope, inheriting parent scope's includes
+ parent_includes = ifdef_stack[-1].copy() if ifdef_stack else set()
+ ifdef_stack.append(parent_includes)
+ elif directive == 'endif':
+ # End scope
+ if len(ifdef_stack) > 1:
+ ifdef_stack.pop()
+ elif directive in ('elif', 'else'):
+ # Alternative branches - reset to empty scope (don't inherit sibling branch)
+ # Only keep includes from before the entire #if block started
+ if len(ifdef_stack) > 1:
+ # Get the scope from before this #if block (grandparent)
+ grandparent_includes = ifdef_stack[-2].copy() if len(ifdef_stack) > 1 else set()
+ ifdef_stack[-1] = grandparent_includes
+ else:
+ ifdef_stack[-1] = set()
+ new_lines.append(line)
+ continue
+
+ match = include_pattern.match(line)
+
+ if match:
+ included_file = match.group(1)
+
+ # Skip malformed includes (e.g., empty or just extension)
+ if not included_file or included_file.startswith('.') or len(included_file) <= 4:
+ new_lines.append(line)
+ continue
+
+ included_basename = Path(included_file).stem
+ included_extension = Path(included_file).suffix
+
+ # Skip .gxx includes from duplicate checking
+ if included_extension == '.gxx':
+ new_lines.append(line)
+ continue
+
+ # Check for self-include (same name AND same extension)
+ if included_basename == base_filename and included_extension == file_extension:
+ had_self_include = True
+ print(f" Removing self-include: {line.strip()}")
+ continue
+
+ # Check for duplicate only in current scope
+ current_scope = ifdef_stack[-1]
+ if included_file in current_scope:
+ duplicates_removed += 1
+ print(f" Removing duplicate: {line.strip()}")
+ continue
+
+ current_scope.add(included_file)
+
+ new_lines.append(line)
+
+ # Check if file was modified
+ modified = (len(new_lines) != len(lines))
+
+ if modified and not dry_run:
+ try:
+ with open(filepath, 'w', encoding='utf-8') as f:
+ f.writelines(new_lines)
+ except Exception as e:
+ print(f"Error writing {filepath}: {e}")
+ return False, 0, False
+
+ return modified, duplicates_removed, had_self_include
+
+
+def find_files(root_dir: str, extensions: List[str]) -> List[str]:
+ """Find all files with specified extensions in the directory tree."""
+ files = []
+ for ext in extensions:
+ files.extend(Path(root_dir).rglob(f"*{ext}"))
+ return [str(f) for f in files]
+
+
+def main():
+ import argparse
+
+ parser = argparse.ArgumentParser(
+ description='Clean up duplicate #include directives and self-includes in C++ files'
+ )
+ parser.add_argument(
+ 'path',
+ nargs='?',
+ default='src',
+ help='Root directory to process (default: src)'
+ )
+ parser.add_argument(
+ '--dry-run',
+ action='store_true',
+ help='Show what would be changed without modifying files'
+ )
+ parser.add_argument(
+ '--extensions',
+ nargs='+',
+ default=['.cxx', '.hxx', '.pxx', '.lxx', '.gxx'],
+ help='File extensions to process (default: .cxx .hxx .pxx .lxx .gxx)'
+ )
+ parser.add_argument(
+ '--files',
+ nargs='+',
+ help='Specific files to process (overrides path scanning)'
+ )
+
+ args = parser.parse_args()
+
+ if args.files:
+ # Process specific files (single file mode - minimal output)
+ files = [os.path.abspath(f) for f in args.files if os.path.isfile(f)]
+ else:
+ # Scan directory (batch mode - verbose output)
+ root_dir = os.path.abspath(args.path)
+
+ if not os.path.isdir(root_dir):
+ print(f"Error: {root_dir} is not a directory")
+ return 1
+
+ print(f"Scanning for files in: {root_dir}")
+ print(f"Extensions: {', '.join(args.extensions)}")
+ files = find_files(root_dir, args.extensions)
+ print(f"Found {len(files)} files to process")
+
+ if args.dry_run:
+ print("DRY RUN MODE - No files will be modified\n")
+
+ total_modified = 0
+ total_duplicates = 0
+ total_self_includes = 0
+ single_file_mode = len(files) == 1
+
+ for filepath in sorted(files):
+ modified, duplicates, self_include = process_file(filepath, args.dry_run)
+
+ if modified:
+ total_modified += 1
+ total_duplicates += duplicates
+ if self_include:
+ total_self_includes += 1
+
+ if not single_file_mode:
+ print(f"Modified: {filepath}")
+ if duplicates > 0:
+ print(f" - Removed {duplicates} duplicate include(s)")
+ if self_include:
+ print(f" - Removed self-include")
+ print()
+
+ # Only show summary in batch mode
+ if not single_file_mode:
+ print("\n" + "="*70)
+ print("SUMMARY")
+ print("="*70)
+ print(f"Files processed: {len(files)}")
+ print(f"Files modified: {total_modified}")
+ print(f"Duplicate includes removed: {total_duplicates}")
+ print(f"Files with self-includes fixed: {total_self_includes}")
+
+ if args.dry_run:
+ print("\nThis was a dry run. Use without --dry-run to apply changes.")
+
+ return 0
+
+
+if __name__ == '__main__':
+ exit(main())
#endif
#ifdef OCCT_DEBUG
#include <TCollection_AsciiString.hxx>
- #include <TDF_Tool.hxx>
- #include <BRepTools.hxx>
#endif
#ifdef OCCT_DEBUG
#include <TCollection_AsciiString.hxx>
- #include <TDF_Tool.hxx>
#include <TDF_ChildIterator.hxx>
#include <TDF_MapIteratorOfLabelMap.hxx>
#include <TDF_MapIteratorOfLabelMap.hxx>
#include <TCollection_AsciiString.hxx>
#include <TDF_Tool.hxx>
- #include <BRepTools.hxx>
- #include <TNaming_Tool.hxx>
- #include <TDF_Tool.hxx>
- #include <TDF_MapIteratorOfLabelMap.hxx>
-
- #include <TCollection_AsciiString.hxx>
- #include <BRepTools.hxx>
void Print_Entry(const TDF_Label& label)
{
#ifndef TDF_AttributeDoubleMap_HeaderFile
#define TDF_AttributeDoubleMap_HeaderFile
-#include <TDF_Attribute.hxx>
#include <TDF_Attribute.hxx>
#include <NCollection_DoubleMap.hxx>
#include <Standard_Type.hxx>
#include <IGESData_IGESEntity.hxx>
-#include <IGESData_FileRecognizer.hxx>
#include <Standard_NoSuchObject.hxx>
#include <IGESData_IGESType.hxx>
#include <IGESData_SpecificModule.hxx>
#include <IGESData_Protocol.hxx>
-#include <IGESData_GlobalNodeOfSpecificLib.hxx>
#include <IGESData_IGESEntity.hxx>
#include <IGESData_SpecificLib.hxx>
#include <IGESData_NodeOfSpecificLib.hxx>
#include <IGESData_ReadWriteModule.hxx>
#include <IGESData_Protocol.hxx>
-#include <IGESData_GlobalNodeOfWriterLib.hxx>
#include <IGESData_IGESEntity.hxx>
#include <IGESData_WriterLib.hxx>
#include <IGESData_NodeOfWriterLib.hxx>
#include <Standard_Type.hxx>
#include <IGESData_GlobalNodeOfSpecificLib.hxx>
-#include <IGESData_NodeOfSpecificLib.hxx>
#include <IGESData_IGESEntity.hxx>
#include <IGESData_SpecificModule.hxx>
#include <IGESData_Protocol.hxx>
#include <Standard_Type.hxx>
#include <IGESData_GlobalNodeOfWriterLib.hxx>
-#include <IGESData_NodeOfWriterLib.hxx>
#include <IGESData_IGESEntity.hxx>
#include <IGESData_ReadWriteModule.hxx>
#include <IGESData_Protocol.hxx>
#include <StepDimTol_CommonDatum.hxx>
#include <StepDimTol_DatumTarget.hxx>
#include <StepDimTol_PlacedDatumTargetFeature.hxx>
-#include <StepRepr_ValueRange.hxx>
-#include <StepRepr_CompositeShapeAspect.hxx>
-#include <StepRepr_DerivedShapeAspect.hxx>
-#include <StepRepr_Extension.hxx>
#include "../RWStepRepr/RWStepRepr_RWCompositeShapeAspect.pxx"
#include "../RWStepRepr/RWStepRepr_RWDerivedShapeAspect.pxx"
#include "../RWStepRepr/RWStepRepr_RWExtension.pxx"
return;
// --- own fields
-#include <StepVisual_PresentationLayerAssignment.hxx>
-#include <StepVisual_PresentationRepresentation.hxx>
Handle(StepVisual_PresentationLayerAssignment) pla;
Handle(StepVisual_PresentationRepresentation) pr;
#include <StepRepr_RealRepresentationItem.hxx>
#include <StepRepr_ValueRepresentationItem.hxx>
-#include <StepRepr_ShapeAspectRelationship.hxx>
-
#include <TColgp_HArray1OfXYZ.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <Transfer_ActorOfTransientProcess.hxx>
#include <XSControl_TransferWriter.hxx>
#include <XSControl_WorkSession.hxx>
#include <StepVisual_ContextDependentOverRidingStyledItem.hxx>
-#include <StepShape_ShapeRepresentation.hxx>
namespace
{
#include <STEPEdit.hxx>
#include <STEPEdit_EditContext.hxx>
#include <STEPEdit_EditSDR.hxx>
-#include <STEPControl_ActorRead.hxx>
-#include <StepData_StepModel.hxx>
#include <StepSelect_WorkLibrary.hxx>
#include <STEPSelections_SelectAssembly.hxx>
#include <STEPSelections_SelectDerived.hxx>
#include <Standard_Type.hxx>
#include <Standard_Transient.hxx>
-#include <StepData_FileRecognizer.hxx>
#include <Standard_NoSuchObject.hxx>
#include <TCollection_AsciiString.hxx>
#include <StepData_ReadWriteModule.hxx>
#include <StepData_Protocol.hxx>
-#include <StepData_GlobalNodeOfWriterLib.hxx>
#include <Standard_Transient.hxx>
#include <StepData_WriterLib.hxx>
#include <StepData_NodeOfWriterLib.hxx>
#include <Standard_Type.hxx>
#include <StepData_GlobalNodeOfWriterLib.hxx>
-#include <StepData_NodeOfWriterLib.hxx>
#include <Standard_Transient.hxx>
#include <StepData_ReadWriteModule.hxx>
#include <StepData_Protocol.hxx>
#ifndef _StepDimTol_RunoutZoneOrientation_HeaderFile
#define _StepDimTol_RunoutZoneOrientation_HeaderFile
-#include <StepDimTol_RunoutZoneOrientation.hxx>
-
#include <Standard_Transient.hxx>
#include <Standard.hxx>
#include <StepBasic_PlaneAngleMeasureWithUnit.hxx>
#ifndef _StepDimTol_ToleranceZoneForm_HeaderFile
#define _StepDimTol_ToleranceZoneForm_HeaderFile
-#include <StepDimTol_ToleranceZoneForm.hxx>
-
#include <Standard_Transient.hxx>
#include <Standard.hxx>
#include <TCollection_HAsciiString.hxx>
#ifndef _StepShape_ValueFormatTypeQualifier_HeaderFile
#define _StepShape_ValueFormatTypeQualifier_HeaderFile
-#include <StepShape_ValueFormatTypeQualifier.hxx>
-
#include <Standard_Transient.hxx>
#include <Standard.hxx>
#include <TCollection_HAsciiString.hxx>
#include <NCollection_Vector.hxx>
#include <NCollection_Handle.hxx>
-#include <StepVisual_CoordinatesList.hxx>
#include <TColStd_HSequenceOfInteger.hxx>
typedef NCollection_Vector<Handle(TColStd_HSequenceOfInteger)>
#include <XCAFDoc_GeomTolerance.hxx>
#include <XCAFDoc_Datum.hxx>
#include <XCAFDoc_DimTol.hxx>
-#include <XCAFDoc_DimTolTool.hxx>
#include <XCAFDoc_DocumentTool.hxx>
#include <XCAFDoc_GraphNode.hxx>
#include <XCAFDoc_ShapeTool.hxx>
#include <Standard_Type.hxx>
#include <IFSelect_SelectExtract.hxx>
-#include <Standard_Type.hxx>
#include <Standard_Integer.hxx>
class Standard_Transient;
class Interface_InterfaceModel;
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <Standard_Type.hxx>
#include <IFSelect_SelectAnyType.hxx>
class TCollection_AsciiString;
#include <Interface_GeneralModule.hxx>
#include <Interface_Protocol.hxx>
-#include <Interface_GlobalNodeOfGeneralLib.hxx>
#include <Standard_Transient.hxx>
#include <Interface_GeneralLib.hxx>
#include <Interface_NodeOfGeneralLib.hxx>
#include <Interface_ReaderModule.hxx>
#include <Interface_Protocol.hxx>
-#include <Interface_GlobalNodeOfReaderLib.hxx>
#include <Standard_Transient.hxx>
#include <Interface_ReaderLib.hxx>
#include <Interface_NodeOfReaderLib.hxx>
#include <Standard_Type.hxx>
#include <Interface_GlobalNodeOfGeneralLib.hxx>
-#include <Interface_NodeOfGeneralLib.hxx>
#include <Standard_Transient.hxx>
#include <Interface_GeneralModule.hxx>
#include <Interface_Protocol.hxx>
#include <Standard_Type.hxx>
#include <Interface_GlobalNodeOfReaderLib.hxx>
-#include <Interface_NodeOfReaderLib.hxx>
#include <Standard_Transient.hxx>
#include <Interface_ReaderModule.hxx>
#include <Interface_Protocol.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Type.hxx>
-#include <Transfer_ActorOfProcessForFinder.hxx>
#include <Transfer_Binder.hxx>
#include <Transfer_Finder.hxx>
#include <Transfer_FindHasher.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Type.hxx>
-#include <Transfer_ActorOfProcessForTransient.hxx>
#include <Transfer_Binder.hxx>
#include <Transfer_IteratorOfProcessForTransient.hxx>
#include <Transfer_ProcessForTransient.hxx>
#include <Message.hxx>
#include <Message_Messenger.hxx>
#include <Message_Msg.hxx>
-#include <Message_Msg.hxx>
#include <Message_ProgressScope.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
#include <Message.hxx>
#include <Message_Messenger.hxx>
#include <Message_Msg.hxx>
-#include <Message_Msg.hxx>
-#include <Message_Msg.hxx>
#include <Message_ProgressScope.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_MapIteratorOfMapOfInteger.hxx>
#include <Transfer_ActorOfProcessForTransient.hxx>
-#include <Transfer_ActorOfProcessForTransient.hxx>
#include <Transfer_Binder.hxx>
#include <Transfer_FindHasher.hxx>
#include <Transfer_IteratorOfProcessForTransient.hxx>
-#include <Transfer_IteratorOfProcessForTransient.hxx>
#include <Transfer_MultipleBinder.hxx>
#include <Transfer_SimpleBinderOfTransient.hxx>
#include <Transfer_StatusResult.hxx>
#include <Transfer_TransferDeadLoop.hxx>
#include <Transfer_TransferFailure.hxx>
#include <Transfer_TransferMapOfProcessForTransient.hxx>
-#include <Transfer_TransferMapOfProcessForTransient.hxx>
#include <Transfer_VoidBinder.hxx>
//=================================================================================================
}
#include <TDataStd_Relation.hxx>
-#include <TDataStd_Variable.hxx>
//=======================================================================
// function : SetRelation (DF, entry, expression, var1[, var2, ...])
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <TopoDS_Wire.hxx>
-#include <BRepBuilderAPI_MakeFace.hxx>
#include <Geom_Plane.hxx>
#include <gp_Pln.hxx>
#include <BRepPrimAPI_MakePrism.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
-#include <BRepBuilderAPI_MakeFace.hxx>
static Standard_Integer OCC297(Draw_Interpretor& di, Standard_Integer /*argc*/, const char** argv)
#include <DDocStd_DrawDocument.hxx>
#include <TDataStd_Name.hxx>
-#include <Draw.hxx>
#include <XCAFDoc_ShapeTool.hxx>
#include <XCAFDoc_DocumentTool.hxx>
#include <TDF_LabelSequence.hxx>
#include <DDF.hxx>
#include <TPrsStd_AISViewer.hxx>
-#include <TPrsStd_AISPresentation.hxx>
//=======================================================================
// function : OCC1029_AISTransparency
#include <Interface_Macros.hxx>
#include <Draw_ProgressIndicator.hxx>
-#include <XSControl_WorkSession.hxx>
#include <Message_ProgressScope.hxx>
#include <Geom_Plane.hxx>
return 0;
}
-#include <ExprIntrp_GenExp.hxx>
-
Standard_Integer CR23403(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
}
#include <BRepBndLib.hxx>
-#include <Draw.hxx>
//=================================================================================================
return 0;
}
-#include <gp_Ax1.hxx>
#include <Geom_Plane.hxx>
#include <Geom2d_Circle.hxx>
#include <BRepPrimAPI_MakeRevol.hxx>
return 0;
}
-#include <Draw.hxx>
-
//=================================================================================================
static Standard_Integer OCC23945(Draw_Interpretor& /*di*/, Standard_Integer n, const char** a)
//
#include <BRepAlgoAPI_Common.hxx>
#include <BRepAlgoAPI_Fuse.hxx>
-#include <BRepAlgoAPI_Cut.hxx>
#include <BRepAlgoAPI_Section.hxx>
//
#include <TopExp.hxx>
//=================================================================================================
-#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepMesh_IncrementalMesh.hxx>
#include <TCollection_AsciiString.hxx>
//=================================================================================================
-#include <BRepBuilderAPI_MakeWire.hxx>
-
static Standard_Integer OCC26553(Draw_Interpretor& theDI,
Standard_Integer theArgc,
const char** theArgv)
// function : OCC26525
// purpose : check number of intersection points
//=======================================================================
-#include <BRepAdaptor_Curve.hxx>
#include <IntCurveSurface_HInter.hxx>
Standard_Integer OCC26525(Draw_Interpretor& di, Standard_Integer n, const char** a)
return 0;
}
-#include <TopExp.hxx>
#include <BRepOffsetAPI_DraftAngle.hxx>
#include <vector>
#include <TDataStd_Integer.hxx>
#include <TDataStd_IntegerArray.hxx>
#include <TDataStd_IntegerList.hxx>
-#include <TDataStd_Name.hxx>
#include <TDataStd_Real.hxx>
#include <TDataStd_RealArray.hxx>
#include <TDataStd_RealList.hxx>
#include <QADraw.hxx>
#include <QABugs.hxx>
-#include <QADraw.hxx>
#include <QADNaming.hxx>
#include <AIS_InteractiveContext.hxx>
#include <Draw_Appli.hxx>
#include <Draw.hxx>
#include <DBRep.hxx>
-#include <BRepTest.hxx>
#include <LocalAnalysis_SurfaceContinuity.hxx>
#include <Geom_SphericalSurface.hxx>
#include <Geom_Surface.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <AIS_ListOfInteractive.hxx>
#include <AIS_ColoredShape.hxx>
-#include <AIS_DisplayMode.hxx>
-#include <AIS_Shape.hxx>
#include <AIS_InteractiveContext.hxx>
#include <Geom_Plane.hxx>
#include <Geom_Axis2Placement.hxx>
#include <Geom_Axis1Placement.hxx>
#include <AIS_Trihedron.hxx>
-#include <AIS_Axis.hxx>
#include <gp_Trsf.hxx>
#include <gp_Quaternion.hxx>
#include <TopLoc_Location.hxx>
#include <AIS_MultipleConnectedInteractive.hxx>
#include <AIS_ConnectedInteractive.hxx>
#include <AIS_TextLabel.hxx>
-#include <TopLoc_Location.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <Select3D_SensitivePrimitiveArray.hxx>
#include <Select3D_SensitivePoint.hxx>
#include <Select3D_SensitivePoly.hxx>
-#include <BRepAdaptor_Curve.hxx>
#include <StdPrs_Curve.hxx>
#include <BRepExtrema_ExtPC.hxx>
// Draw arg : vaxis AxisName Xa Ya Za Xb Yb Zb
//==============================================================================
#include <TopoDS_Edge.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopExp.hxx>
#include <Geom_Line.hxx>
static int VAxisBuilder(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
//=================================================================================================
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopExp.hxx>
#include <AIS_Point.hxx>
#include <Geom_CartesianPoint.hxx>
// Draw arg : vline LineName [AIS_PointName] [AIS_PointName]
// [Xa] [Ya] [Za] [Xb] [Yb] [Zb]
//==============================================================================
-#include <Geom_CartesianPoint.hxx>
#include <AIS_Line.hxx>
static int VLineBuilder(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
#include <math.h>
#include <gp_Pnt.hxx>
-#include <Graphic3d_ArrayOfPoints.hxx>
#include <Graphic3d_ArrayOfPrimitives.hxx>
-#include <Graphic3d_ArrayOfTriangles.hxx>
#include <Poly_Array1OfTriangle.hxx>
#include <Poly_Triangle.hxx>
#include <Poly_Triangulation.hxx>
#include <Graphic3d_AspectFillArea3d.hxx>
#include <BRepPrimAPI_MakeCylinder.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopExp_Explorer.hxx>
-#include <TopAbs.hxx>
#include <AIS_InteractiveObject.hxx>
//===============================================================================================
friend class IteratorOfLink;
};
-#include <Poly_CoherentTriangulation.hxx>
-
#endif
gp_Ax3 pos;
};
-#include <gp_Lin.hxx>
-
//=================================================================================================
inline void gp_Pln::Coefficients(Standard_Real& theA,
#include <gp_Trsf.hxx>
#include <gp_Vec.hxx>
-#include <gp_XYZ.hxx>
//=================================================================================================
#include <Standard_NotImplemented.hxx>
#include <Standard_OutOfRange.hxx>
-#include <NCollection_BasePointerVector.hxx>
#include <NCollection_DefineAlloc.hxx>
-#include <NCollection_Allocator.hxx>
#include <NCollection_Iterator.hxx>
#include <NCollection_OccAllocator.hxx>
#include <StdFail_NotDone.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
+#include <OSD_FileIterator.hxx>
+
+#include <OSD_Path.hxx>
+#include <TCollection_AsciiString.hxx>
+
#ifndef _WIN32
#include <OSD_File.hxx>
- #include <OSD_FileIterator.hxx>
#include <OSD_OSDError.hxx>
- #include <OSD_Path.hxx>
#include <OSD_WhoAmI.hxx>
- #include <TCollection_AsciiString.hxx>
#include <dirent.h>
#include <stdio.h>
#include <windows.h>
- #include <OSD_FileIterator.hxx>
- #include <OSD_Path.hxx>
- #include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#define _FD ((PWIN32_FIND_DATAW)myData)
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
+#include <OSD_FileNode.hxx>
+
+#include <OSD_Protection.hxx>
+#include <Quantity_Date.hxx>
+#include <Standard_ProgramError.hxx>
+
#ifndef _WIN32
//----------------------------------------------------------------------------
//------------------- Linux Sources of OSD_FileNode --------------------------
//----------------------------------------------------------------------------
- #include <OSD_FileNode.hxx>
#include <OSD_OSDError.hxx>
#include <OSD_Path.hxx>
- #include <OSD_Protection.hxx>
#include <OSD_WhoAmI.hxx>
- #include <Quantity_Date.hxx>
#include <Standard_NullObject.hxx>
- #include <Standard_ProgramError.hxx>
#include <errno.h>
#include <fcntl.h>
#endif
#include <windows.h>
- #include <OSD_FileNode.hxx>
- #include <OSD_Protection.hxx>
- #include <Quantity_Date.hxx>
- #include <Standard_ProgramError.hxx>
#include <TCollection_ExtendedString.hxx>
#include <OSD_WNT.hxx>
#include <Standard_NumericError.hxx>
#include <Standard_NullObject.hxx>
#include <Standard_ProgramError.hxx>
- #include <Standard_ConstructionError.hxx>
#include <OSD_WhoAmI.hxx>
OSD_Path::OSD_Path()
#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>
#include <TopOpeBRepTool_SC.hxx>
#ifdef OCCT_DEBUG
- #include <TopOpeBRep_FFDumper.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom_Line.hxx>
extern Standard_Boolean TopOpeBRep_GettraceBIPS();
#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>
#ifdef OCCT_DEBUG
extern Standard_Boolean TopOpeBRepTool_GettraceVC();
#include <TopOpeBRepBuild_Builder.hxx>
- #include <gp_Pnt.hxx>
#endif
//=================================================================================================
// 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);
#define CurveImprovement
#ifdef DRAW
#include <DrawTrSurf.hxx>
- #include <Geom2d_Curve.hxx>
static Standard_Integer NbCalls = 0;
#endif
//=================================================================================================
#include <Geom_TrimmedCurve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_TrimmedCurve.hxx>
- #include <BRep_Tool.hxx>
#include <TopExp_Explorer.hxx>
#include <TopOpeBRepTool_DRAW.hxx>
#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,
// 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>
#ifdef DRAW
#include <DrawTrSurf.hxx>
- #include <Geom_Curve.hxx>
#include <Geom_BSplineCurve.hxx>
static Standard_Integer NumSec = 0;
static Standard_Boolean Affich = 0;
static Standard_Integer Affich = 0;
#include <Approx_Curve3d.hxx>
#include <DrawTrSurf.hxx>
- #include <GeomFill_TrihedronWithGuide.hxx>
#endif
//=======================================================================
#ifdef OCCT_DEBUG
#ifdef DRAW
#include <DrawTrSurf.hxx>
- #include <Geom_Curve.hxx>
#endif
static Standard_Boolean Affich = 0;
static Standard_Integer NbSurf = 0;
#ifdef DRAW
#include <DrawTrSurf.hxx>
- #include <Geom_Curve.hxx>
#endif
static Standard_Boolean CheckSense(const TColGeom_SequenceOfCurve& Seq1,
#ifdef DRAW
#include <DrawTrSurf.hxx>
- #include <Geom_Curve.hxx>
- #include <Geom_BSplineCurve.hxx>
static Standard_Integer NumSec = 0;
static Standard_Boolean Affich = 0;
#endif
#ifdef OCCT_DEBUG
#include <OSD_Chronometer.hxx>
- #include <Geom_Surface.hxx>
static Standard_Integer Affich = 0;
#endif
#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>
#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>
#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>
#include <gp_Dir.hxx>
#include <gp_Cylinder.hxx>
#include <gp_Ax1.hxx>
-#include <gp_Lin.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_Surface.hxx>
// 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>
#include <IntRes2d_TypeTrans.hxx>
#include <IntRes2d_Position.hxx>
-#include <IntRes2d_IntersectionPoint.hxx>
#include <IntRes2d_Transition.hxx>
static long unsigned Mask32[32] = {
#include <Geom_BSplineCurve.hxx>
#include <HelixGeom_BuilderHelixCoil.hxx>
#include <HelixGeom_HelixCurve.hxx>
-#include <HelixGeom_HelixCurve.hxx>
#include <HelixGeom_Tools.hxx>
//=================================================================================================
// 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>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_Curve.hxx>
-#include <Adaptor3d_CurveOnSurface.hxx>
#include <BRep_GCurve.hxx>
#include <BRepLib_ValidateEdge.hxx>
#include <BRep_PolygonOnTriangulation.hxx>
#include <Standard_Type.hxx>
-#include <MAT_TListNodeOfListOfBisector.hxx>
#include <MAT_Bisector.hxx>
#include <MAT_ListOfBisector.hxx>
#include <Standard_Type.hxx>
-#include <MAT_TListNodeOfListOfEdge.hxx>
#include <MAT_Edge.hxx>
#include <MAT_ListOfEdge.hxx>
#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
#include <Adaptor3d_Curve.hxx>
#include <gp_Ax3.hxx>
-#include <GeomAdaptor_SurfaceOfLinearExtrusion.hxx>
#include <GeomEvaluator_SurfaceOfExtrusion.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Adaptor3d_Curve.hxx>
#include <ElCLib.hxx>
-#include <GeomAdaptor_SurfaceOfRevolution.hxx>
#include <GeomEvaluator_SurfaceOfRevolution.hxx>
#include <Standard_NoSuchObject.hxx>
#include <AppParCurves_MultiPoint.hxx>
#include <StdFail_NotDone.hxx>
#include <Standard_NoSuchObject.hxx>
-#include <TColStd_Array1OfReal.hxx>
#include <math_Recipes.hxx>
-#include <math_Crout.hxx>
static int FlatLength(const TColStd_Array1OfInteger& Mults)
{
// Modified by skv - Fri Aug 27 12:29:04 2004 OCC6503
-#include <Adaptor3d_Surface.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Bnd_Box.hxx>
#include <BndLib.hxx>
#include <Geom_ToroidalSurface.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_Surface.hxx>
-#include <GeomAdaptor_Surface.hxx>
#include <GeomLib_IsPlanarSurface.hxx>
#include <gp_Ax3.hxx>
#include <gp_Circ.hxx>
#include <gp_Dir.hxx>
#include <GeomAbs_CurveType.hxx>
#include <GeomAdaptor_Curve.hxx>
-#include <Adaptor3d_Curve.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <SelectMgr_StateOfSelection.hxx>
#include <SelectMgr_ToleranceMap.hxx>
#include <SelectMgr_TypeOfDepthTolerance.hxx>
-#include <SelectMgr_ViewerSelector.hxx>
#include <Standard_OStream.hxx>
#include <Standard_Transient.hxx>
#include <StdSelect_TypeOfSelectionImage.hxx>