Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-23 09:16:48

0001 // Created by: Peter KURNEV
0002 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014 
0015 #ifndef _BOPAlgo_Section_HeaderFile
0016 #define _BOPAlgo_Section_HeaderFile
0017 
0018 #include <Standard.hxx>
0019 #include <Standard_DefineAlloc.hxx>
0020 #include <Standard_Handle.hxx>
0021 
0022 #include <BOPAlgo_Builder.hxx>
0023 #include <NCollection_BaseAllocator.hxx>
0024 class BOPAlgo_PaveFiller;
0025 
0026 //! The algorithm to build a Section between the arguments.
0027 //! The Section consists of vertices and edges.
0028 //! The Section contains:
0029 //! 1. new vertices that are subjects of V/V, E/E, E/F, F/F interferences
0030 //! 2. vertices that are subjects of V/E, V/F interferences
0031 //! 3. new edges that are subjects of F/F interferences
0032 //! 4. edges that are Common Blocks
0033 class BOPAlgo_Section : public BOPAlgo_Builder
0034 {
0035 public:
0036   DEFINE_STANDARD_ALLOC
0037 
0038   //! Empty constructor
0039   Standard_EXPORT BOPAlgo_Section();
0040   Standard_EXPORT ~BOPAlgo_Section() override;
0041 
0042   //! Constructor with allocator
0043   Standard_EXPORT BOPAlgo_Section(const occ::handle<NCollection_BaseAllocator>& theAllocator);
0044 
0045 protected:
0046   //! Checks the data before performing the operation
0047   Standard_EXPORT void CheckData() override;
0048 
0049   //! Combine the result of section operation
0050   Standard_EXPORT virtual void BuildSection(const Message_ProgressRange& theRange);
0051 
0052   //! Performs calculations using prepared Filler object <thePF>
0053   Standard_EXPORT void PerformInternal1(const BOPAlgo_PaveFiller&    thePF,
0054                                         const Message_ProgressRange& theRange) override;
0055 
0056 protected:
0057   //! List of operations to be supported by the Progress Indicator.
0058   //! Override the whole enumeration here since the constant operations are also
0059   //! going to be overridden.
0060   enum BOPAlgo_PIOperation
0061   {
0062     PIOperation_TreatVertices = 0,
0063     PIOperation_TreatEdges,
0064     PIOperation_BuildSection,
0065     PIOperation_FillHistory,
0066     PIOperation_PostTreat,
0067     PIOperation_Last
0068   };
0069 
0070   //! Filling steps for constant operations
0071   Standard_EXPORT void fillPIConstants(const double     theWhole,
0072                                        BOPAlgo_PISteps& theSteps) const override;
0073 
0074   //! Filling steps for all other operations
0075   Standard_EXPORT void fillPISteps(BOPAlgo_PISteps& theSteps) const override;
0076 };
0077 
0078 #endif // _BOPAlgo_Section_HeaderFile