56b0cc643599b5b10b3b7d3b78915131cd600fa3
[occt.git] / src / BRepAlgoAPI / BRepAlgoAPI_Splitter.hxx
1 // Created by: Eugeny MALTCHIKOV
2 // Copyright (c) 2017 OPEN CASCADE SAS
3 //
4 // This file is part of Open CASCADE Technology software library.
5 //
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.
11 //
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
14
15 #ifndef _BRepAlgoAPI_Splitter_HeaderFile
16 #define _BRepAlgoAPI_Splitter_HeaderFile
17
18 #include <Standard.hxx>
19 #include <Standard_DefineAlloc.hxx>
20 #include <Standard_Handle.hxx>
21
22 #include <BRepAlgoAPI_BuilderAlgo.hxx>
23
24 //! The class contains API level of the **Splitter** algorithm,
25 //! which allows splitting a group of arbitrary shapes by the
26 //! other group of arbitrary shapes.<br>
27 //! The arguments of the operation are divided on two groups:<br>
28 //! *Objects* - shapes that will be split;<br>
29 //! *Tools*   - shapes by which the *Objects* will be split.<br>
30 //! The result of the operation contains only the split parts
31 //! of the shapes from the group of *Objects*.<br>
32 //! The split parts of the shapes from the group of *Tools* are excluded
33 //! from the result.<br>
34 //! The shapes can be split by the other shapes from the same group
35 //! (in case these shapes are interfering).
36 //!
37 //! The class is a General Fuse based algorithm. Thus, all options
38 //! of the General Fuse algorithm such as Fuzzy mode, safe processing mode,
39 //! parallel processing mode, gluing mode and history support are also
40 //! available in this algorithm.<br>
41 //! There is no requirement on the existence of the *Tools* shapes.
42 //! And if there are no *Tools* shapes, the result of the splitting
43 //! operation will be equivalent to the General Fuse result.
44 //!
45 //! The algorithm returns the following Error statuses:<br>
46 //! - 0 - in case of success;<br>
47 //! - 1 - in case there is no enough arguments for the operation;<br>
48 //! - 2 - in case the Intersection of the arguments has failed;<br>
49 //! - 3 - in case the Building of the result has failed.
50 class BRepAlgoAPI_Splitter : public BRepAlgoAPI_BuilderAlgo
51 {
52 public:
53
54   DEFINE_STANDARD_ALLOC
55
56   //! Empty constructor
57   Standard_EXPORT BRepAlgoAPI_Splitter();
58   Standard_EXPORT virtual ~BRepAlgoAPI_Splitter();
59
60   //! Constructor with already filled PaveFiller
61   Standard_EXPORT BRepAlgoAPI_Splitter(const BOPAlgo_PaveFiller& thePF);
62
63   //! Performs the algorithm.<br>
64   //! Performs the intersection of the objects with tools and build the result of the operation.
65   Standard_EXPORT virtual void Build() Standard_OVERRIDE;
66
67   //! Sets the tools
68   Standard_EXPORT void SetTools (const TopTools_ListOfShape& theLS);
69   
70   //! Gets the tools
71   Standard_EXPORT const TopTools_ListOfShape& Tools() const;
72
73 protected:
74
75   //! Tools arguments of the operation
76   TopTools_ListOfShape myTools;
77
78 private:
79
80 };
81
82 #endif // _BRepAlgoAPI_BuilderAlgo_HeaderFile