1 // Created by: Peter KURNEV
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 #ifndef _BOPAlgo_BOP_HeaderFile
16 #define _BOPAlgo_BOP_HeaderFile
18 #include <Standard.hxx>
19 #include <Standard_DefineAlloc.hxx>
20 #include <Standard_Handle.hxx>
22 #include <BOPAlgo_Operation.hxx>
23 #include <Standard_Integer.hxx>
24 #include <TopoDS_Shape.hxx>
25 #include <BOPCol_ListOfShape.hxx>
26 #include <BOPCol_MapOfShape.hxx>
27 #include <BOPAlgo_Builder.hxx>
28 #include <BOPCol_BaseAllocator.hxx>
29 #include <TopAbs_ShapeEnum.hxx>
30 #include <Standard_Boolean.hxx>
31 #include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
33 class BOPAlgo_PaveFiller;
37 class BOPAlgo_BOP : public BOPAlgo_Builder
45 Standard_EXPORT BOPAlgo_BOP();
46 Standard_EXPORT virtual ~BOPAlgo_BOP();
48 Standard_EXPORT BOPAlgo_BOP(const BOPCol_BaseAllocator& theAllocator);
50 //! Clears internal fields and arguments
51 Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
53 //! Adds Tool argument of the operation
54 Standard_EXPORT virtual void AddTool (const TopoDS_Shape& theShape);
56 Standard_EXPORT virtual void SetTools (const BOPCol_ListOfShape& theShapes);
58 Standard_EXPORT void SetOperation (const BOPAlgo_Operation theOperation);
60 Standard_EXPORT BOPAlgo_Operation Operation() const;
62 Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
70 Standard_EXPORT virtual void CheckData() Standard_OVERRIDE;
72 //! Provides preparing actions
73 Standard_EXPORT virtual void Prepare() Standard_OVERRIDE;
75 //! Performs calculations using prepared Filler
77 Standard_EXPORT virtual void PerformInternal1 (const BOPAlgo_PaveFiller& thePF) Standard_OVERRIDE;
79 Standard_EXPORT virtual void BuildResult (const TopAbs_ShapeEnum theType) Standard_OVERRIDE;
81 Standard_EXPORT void BuildShape();
83 Standard_EXPORT void BuildRC();
85 Standard_EXPORT void BuildSolid();
87 Standard_EXPORT Standard_Boolean IsBoundSplits (const TopoDS_Shape& theS, BOPCol_IndexedDataMapOfShapeListOfShape& theMEF);
90 BOPAlgo_Operation myOperation;
91 Standard_Integer myDims[2];
93 BOPCol_ListOfShape myTools;
94 BOPCol_MapOfShape myMapTools;
111 #endif // _BOPAlgo_BOP_HeaderFile