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