42cf5bc1 |
1 | // Created by: Peter KURNEV |
2 | // Copyright (c) 2014 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_BuilderAlgo_HeaderFile |
16 | #define _BRepAlgoAPI_BuilderAlgo_HeaderFile |
17 | |
18 | #include <Standard.hxx> |
19 | #include <Standard_DefineAlloc.hxx> |
20 | #include <Standard_Handle.hxx> |
21 | |
22 | #include <Standard_Integer.hxx> |
23 | #include <BOPAlgo_PPaveFiller.hxx> |
24 | #include <BOPAlgo_PBuilder.hxx> |
483ce1bd |
25 | #include <BOPAlgo_GlueEnum.hxx> |
42cf5bc1 |
26 | #include <Standard_Real.hxx> |
27 | #include <TopTools_ListOfShape.hxx> |
28 | #include <BRepAlgoAPI_Algo.hxx> |
29 | #include <Standard_Boolean.hxx> |
30 | class BOPAlgo_PaveFiller; |
31 | class TopoDS_Shape; |
32 | |
33 | |
34 | |
35 | //! The clsss contains API level of General Fuse algorithm |
36 | class BRepAlgoAPI_BuilderAlgo : public BRepAlgoAPI_Algo |
37 | { |
38 | public: |
39 | |
40 | DEFINE_STANDARD_ALLOC |
41 | |
42 | |
43 | //! Empty constructor |
44 | Standard_EXPORT BRepAlgoAPI_BuilderAlgo(); |
45 | Standard_EXPORT virtual ~BRepAlgoAPI_BuilderAlgo(); |
46 | |
47 | //! Empty constructor |
48 | Standard_EXPORT BRepAlgoAPI_BuilderAlgo(const BOPAlgo_PaveFiller& thePF); |
49 | |
50 | //! Sets the additional tolerance |
51 | Standard_EXPORT void SetFuzzyValue (const Standard_Real theFuzz); |
52 | |
53 | //! Returns the additional tolerance |
54 | Standard_EXPORT Standard_Real FuzzyValue() const; |
3510db62 |
55 | |
56 | //! Sets the flag that defines the mode of treatment. |
57 | //! In non-destructive mode the argument shapes are not modified. Instead |
58 | //! a copy of a sub-shape is created in the result if it is needed to be updated. |
59 | Standard_EXPORT void SetNonDestructive(const Standard_Boolean theFlag); |
60 | |
61 | //! Returns the flag that defines the mode of treatment. |
62 | //! In non-destructive mode the argument shapes are not modified. Instead |
63 | //! a copy of a sub-shape is created in the result if it is needed to be updated. |
64 | Standard_EXPORT Standard_Boolean NonDestructive() const; |
65 | |
483ce1bd |
66 | //! Sets the glue option for the algorithm |
67 | Standard_EXPORT void SetGlue(const BOPAlgo_GlueEnum theGlue); |
68 | |
69 | //! Returns the glue option of the algorithm |
70 | Standard_EXPORT BOPAlgo_GlueEnum Glue() const; |
71 | |
42cf5bc1 |
72 | //! Sets the arguments |
73 | Standard_EXPORT void SetArguments (const TopTools_ListOfShape& theLS); |
74 | |
75 | //! Gets the arguments |
76 | Standard_EXPORT const TopTools_ListOfShape& Arguments() const; |
77 | |
78 | //! Performs the algorithm |
79 | //! |
80 | //! H I S T O R Y |
81 | Standard_EXPORT virtual void Build() Standard_OVERRIDE; |
82 | |
83 | //! Returns the list of shapes modified from the shape <S>. |
84 | Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& aS) Standard_OVERRIDE; |
85 | |
86 | //! Returns true if the shape S has been deleted. The |
87 | //! result shape of the operation does not contain the shape S. |
88 | Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& aS) Standard_OVERRIDE; |
89 | |
90 | //! Returns the list of shapes generated from the shape <S>. |
91 | //! For use in BRepNaming. |
92 | Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE; |
93 | |
94 | //! Returns true if there is at least one modified shape. |
95 | //! For use in BRepNaming. |
96 | Standard_EXPORT virtual Standard_Boolean HasModified() const; |
97 | |
98 | //! Returns true if there is at least one generated shape. |
99 | //! For use in BRepNaming. |
100 | Standard_EXPORT virtual Standard_Boolean HasGenerated() const; |
101 | |
102 | //! Returns true if there is at least one deleted shape. |
103 | //! For use in BRepNaming. |
104 | //! |
105 | //! protected methods |
106 | Standard_EXPORT virtual Standard_Boolean HasDeleted() const; |
107 | |
108 | |
109 | |
110 | |
111 | protected: |
112 | |
113 | |
114 | Standard_EXPORT virtual void Clear() Standard_OVERRIDE; |
115 | |
116 | |
117 | Standard_Integer myEntryType; |
118 | BOPAlgo_PPaveFiller myDSFiller; |
119 | BOPAlgo_PBuilder myBuilder; |
120 | Standard_Real myFuzzyValue; |
3510db62 |
121 | Standard_Boolean myNonDestructive; |
42cf5bc1 |
122 | TopTools_ListOfShape myArguments; |
483ce1bd |
123 | BOPAlgo_GlueEnum myGlue; |
42cf5bc1 |
124 | |
125 | |
126 | private: |
127 | |
128 | |
129 | |
130 | |
131 | |
132 | }; |
133 | |
134 | |
135 | |
136 | |
137 | |
138 | |
139 | |
140 | #endif // _BRepAlgoAPI_BuilderAlgo_HeaderFile |