Salome HOME
This commit was generated by cvs2git to create tag 'StableState1'.
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_WESCorrector.hxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 //
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
8 //
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19
20 #ifndef _GEOMAlgo_WESCorrector_HeaderFile
21 #define _GEOMAlgo_WESCorrector_HeaderFile
22
23 #ifndef _GEOMAlgo_PWireEdgeSet_HeaderFile
24 #include <GEOMAlgo_PWireEdgeSet.hxx>
25 #endif
26 #ifndef _GEOMAlgo_WireEdgeSet_HeaderFile
27 #include <GEOMAlgo_WireEdgeSet.hxx>
28 #endif
29 #ifndef _BOP_ListOfConnexityBlock_HeaderFile
30 #include <BOP_ListOfConnexityBlock.hxx>
31 #endif
32 #ifndef _GEOMAlgo_Algo_HeaderFile
33 #include <GEOMAlgo_Algo.hxx>
34 #endif
35 class GEOMAlgo_WireEdgeSet;
36
37
38 #ifndef _Standard_HeaderFile
39 #include <Standard.hxx>
40 #endif
41 #ifndef _Standard_Macro_HeaderFile
42 #include <Standard_Macro.hxx>
43 #endif
44
45
46 //!  The algorithm to change the Wire Edges Set (WES) contents. <br>
47 //!   The NewWES will contain only wires instead of wires and edges. <br>
48 class GEOMAlgo_WESCorrector  : public GEOMAlgo_Algo {
49
50 public:
51
52     void* operator new(size_t,void* anAddress) 
53       {
54         return anAddress;
55       }
56     void* operator new(size_t size) 
57       { 
58         return Standard::Allocate(size); 
59       }
60     void  operator delete(void *anAddress) 
61       { 
62         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
63       }
64  // Methods PUBLIC
65  // 
66
67
68 //! Empty constructor; <br>
69 //! <br>
70 Standard_EXPORT GEOMAlgo_WESCorrector();
71 Standard_EXPORT virtual ~GEOMAlgo_WESCorrector();
72
73
74 //! Modifier <br>
75 Standard_EXPORT   void SetWES(const GEOMAlgo_WireEdgeSet& aWES) ;
76
77
78 //! Performs the algorithm that  consists  of  two  steps <br>
79 //! 1. Make conexity blocks (  DoConnexityBlocks()  ) <br>
80 //! 2. Make corrections     (  DoCorrections()  ) <br>
81 Standard_EXPORT virtual  void Perform() ;
82
83
84 //! Selector <br>
85 Standard_EXPORT   GEOMAlgo_WireEdgeSet& WES() ;
86
87
88 //! Selector <br>
89 Standard_EXPORT   GEOMAlgo_WireEdgeSet& NewWES() ;
90
91
92
93
94
95 protected:
96
97  // Methods PROTECTED
98  // 
99
100
101 Standard_EXPORT   void DoConnexityBlocks() ;
102
103
104 Standard_EXPORT   void DoCorrections() ;
105
106
107  // Fields PROTECTED
108  //
109 GEOMAlgo_PWireEdgeSet myWES;
110 GEOMAlgo_WireEdgeSet myNewWES;
111 BOP_ListOfConnexityBlock myConnexityBlocks;
112
113
114 private: 
115
116  // Methods PRIVATE
117  // 
118
119
120  // Fields PRIVATE
121  //
122
123
124 };
125
126
127
128
129
130 // other Inline functions and methods (like "C++: function call" methods)
131 //
132
133
134 #endif